Commit Graph

1358 Commits

Author SHA1 Message Date
kmillikin@chromium.org
d30bc90b9c Inline the inobject property case for named property loads.
Review URL: http://codereview.chromium.org/99120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 10:40:36 +00:00
yurys@chromium.org
c56b22c72a 1. Send 'afterCompile' event to the debug message handler.2. Process messages from the debugger command queue on each event not only break and exception.3. auto_continue is always true for compilation events.
Review URL: http://codereview.chromium.org/100034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 12:38:20 +00:00
lrn@chromium.org
889eac7f13 Fix Issue 326. Handle sorting of non-array objects correctly.
Change handling of sorting to be the same for all JS-arrays.
Collect undefined values as well while removing holes.

Review URL: http://codereview.chromium.org/92123


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 11:16:59 +00:00
erik.corry@gmail.com
b1d09b32f9 Remove dependency on libstdc++ from test framework.
Review URL: http://codereview.chromium.org/99051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 10:52:44 +00:00
erik.corry@gmail.com
22d6cc9d4b Lint.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 09:27:18 +00:00
ager@chromium.org
f6bafbfb09 Prepare push of version 1.2.1 to trunk. The main reason for this push
is to get the chromium V8-latest builder working again and to move the
gyp file used for the chromium build to V8 to make it easier to roll
V8 DEPS.
Review URL: http://codereview.chromium.org/99049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 09:14:19 +00:00
erik.corry@gmail.com
f08b2a8898 Fix bugs 145 and 323, preemption and apply on ARM.
Review URL: http://codereview.chromium.org/93121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 07:03:10 +00:00
christian.plesner.hansen@gmail.com
4a909a7a62 - When cloning maps to set the 'lazy loading' bit remember to clone
the properties as well.  This fixes some failing tests.
- Moved json parsing into native code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:45:29 +00:00
sgjesse@chromium.org
8fefc769f5 Removed the debug message thread.
The debug message thread was introduced to make it possible to have the message handler callback be called from a different thread than the thread running V8 where the debug event occoured, but it never had any practical use, and prevents providing information to the message handler which is only available from the V8 thread.

In the future any thread decoupling will have do be done by the embedder.

This also removes the queue used for outbound messages.

Renamed the class Message to CommandMessage as it is only used for debugger commands from the client. Related message queue classes has also been renamed.
Review URL: http://codereview.chromium.org/93118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:05:40 +00:00
kmillikin@chromium.org
cc0c8d178f Materializing a frame element on the stack by pushing it can cause the
stack pointer to change by more than one in a corner case.  If we push
a constant smi larger than 16 bits, we push it via a temporary
register.  Allocating the temporary can cause a register to be spilled
from the frame somewhere above the stack pointer.

As a fix, do not use pushes to materialize ranges of elements of size
larger than one.

Review URL: http://codereview.chromium.org/92121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 11:26:49 +00:00
christian.plesner.hansen@gmail.com
1f7e96743d - Extended lazy loading to general objects, not just functions.
- Added lazily loaded JSON object.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 08:13:09 +00:00
lrn@chromium.org
a4d756a1c8 Move backend specific files to separate directories.
Move ia32 and arm specific files to subdirectories to make it easier to add more backends.

Review URL: http://codereview.chromium.org/92068


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 12:06:38 +00:00
erik.corry@gmail.com
e5a1973d3c 2nd try at fixing coverage of inline keyed access on IA32.
Review URL: http://codereview.chromium.org/92067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 07:52:38 +00:00
ager@chromium.org
35e78919eb Prepare to push version 1.2.0 to trunk. Now worker on version 1.2.1.
Review URL: http://codereview.chromium.org/92066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 07:32:25 +00:00
erik.corry@gmail.com
9425b17b8e Remove if inside contradictory if.
Review URL: http://codereview.chromium.org/93059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 05:45:40 +00:00
pfeldman@chromium.org
a3a0d64305 DevTools: Add support for eventless host message dispatching.
Review URL: http://codereview.chromium.org/87026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:16:50 +00:00
sgjesse@chromium.org
60f13875f1 Use CollectAllGarbage for the gc() extension.
Review URL: http://codereview.chromium.org/5666

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:00:12 +00:00
sgjesse@chromium.org
7fd0da52e7 Add setting break points by using handles.
Extend the D8 break command to handle script names with :line[:column] position specification and handles using #<id>#.
Review URL: http://codereview.chromium.org/92011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:59:48 +00:00
erik.corry@gmail.com
befbeba831 Small changes to improve test coverage in codegen-ia32.cc.
Review URL: http://codereview.chromium.org/92008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:34:35 +00:00
kmillikin@chromium.org
b39f4383dc When merging a frame to an expected on at block entry, the static type
of elements is set to a safe lower bound.  Move the setting of the
static type out of VirtualFrame::MergeTo (which is not necessarily run
for all frames) and into VirtualFrame::PrepareMergeTo (which is).
Review URL: http://codereview.chromium.org/92009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:19:38 +00:00
yurys@chromium.org
344d68a938 This issue was introduced by http://codereview.chromium.org/67266
Review URL: http://codereview.chromium.org/93014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:04:19 +00:00
lrn@chromium.org
bfb33b1e2f Fix for Issue 317 - bug in string.replace(string, "$foo").
Fix for Issue 317. Replace string with something containing dollar now works.

Review URL: http://codereview.chromium.org/94002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 11:43:05 +00:00
erik.corry@gmail.com
f78fbf0c56 Abolish kDebug and use ifdef DEBUG throughout for consistency.
Review URL: http://codereview.chromium.org/94001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 09:25:41 +00:00
ager@chromium.org
7d4fed590f Adding hidden values always turned the object slow case because the
hidden symbol is not an identifier.  Make sure to keep objects fast
case when adding hidden values if possible.
Review URL: http://codereview.chromium.org/93004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 07:38:08 +00:00
sgjesse@chromium.org
5b394bf4d1 Handle breaks on keyed IC loads which can have an inlined version.
For keyed IC loads setting a break point now ensures that the inlined code is not used. When the break point is set the inlined map check is changed to fail causing the inlined code not to be used but the IC to be called. As long at the break point is set the map check will stay invalid.
Review URL: http://codereview.chromium.org/87025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:48:54 +00:00
yurys@chromium.org
7fc551ecc3 As long as all debugger messages are handled by a single static method we need a way to identify request sender to route the response to the right handler. To accomplish this clients can send some additional data along with command text and debugger will later pass this data to the message handler along with the response text.
Review URL: http://codereview.chromium.org/67266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:06:48 +00:00
erik.corry@gmail.com
0efd83c916 * Add code to check coverage of generated code on IA32 port.
* Move ARM coverage code to ARM-specific file and add missing
file to cover.
Review URL: http://codereview.chromium.org/88025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:42:12 +00:00
christian.plesner.hansen@gmail.com
0d21e7b3b0 review
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:34 +00:00
christian.plesner.hansen@gmail.com
d26e6dd0b4 force-set
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:11 +00:00
lrn@chromium.org
97427d86e0 Add ES5 Array methods reduce and reduceRight, with test.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 09:57:30 +00:00
sgjesse@chromium.org
b8dc312b25 Make it possible to add a user data object to each script compiled.
Review URL: http://codereview.chromium.org/90003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 07:22:06 +00:00
feng@chromium.org
19c95ff39a Fix style issues caught by presubmit script.
TBR = erikcorry

Review URL: http://codereview.chromium.org/83004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 17:44:39 +00:00
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

Review URL: http://codereview.chromium.org/77035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36:13 +00:00
sgjesse@chromium.org
f5eb2cbe65 Remove unused runtime function.
The CompileScript runtime function is not used by any builtins any more.
Review URL: http://codereview.chromium.org/80003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 12:15:27 +00:00
iposva@chromium.org
8775634598 Add a "read" extension to the shell programs. This global function
reads the contents of a file into a string and returns it.

Review URL: http://codereview.chromium.org/67262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 21:04:34 +00:00
erik.corry@gmail.com
413bd7a91c Lint.
Review URL: http://codereview.chromium.org/77026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 13:57:15 +00:00
erik.corry@gmail.com
8f911a2f5d * Remove unused code from codegen-arm.cc
* Fix fp ops on pre-EABI ARM targets.
* Fix missing TIMEVAL_TO_TIMESPEC on Android.
Review URL: http://codereview.chromium.org/77025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 13:27:36 +00:00
ager@chromium.org
59d4539f38 If an external string enters the symbol table, make sure to set the
resource to NULL when removing it from the symbol table.  This makes
sure that the debugger can recognize the external string as being
"deleted".  Now, whenever an external resource is deleted, the
resource pointer is set to NULL.

This is really a workaround of a debugger problem.  We need to make
sure that the debugger only finds scripts in the heap that are
actually live.
Review URL: http://codereview.chromium.org/69029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 09:17:04 +00:00
iposva@chromium.org
82ac3f3031 - Fix buffer overflow in the pre-allocated memory thread.
Review URL: http://codereview.chromium.org/67248

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 00:57:21 +00:00
iposva@chromium.org
7dece760ad - Fix delta time calculation in LinuxSemaphore::Wait.
Review URL: http://codereview.chromium.org/69024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 00:56:52 +00:00
iposva@chromium.org
e05c2e3693 Start addressing massive arrays on the stack. There is hardly ever
a reason to stack allocate large chunks of stack space.
- Runtime_GetCFrames used to allocate a frame size of 52040 bytes.
- PreallocatedMemoryThread::Run used to allocate 32784 bytes.
- Fixed StringStream overflow conditions.

Review URL: http://codereview.chromium.org/67197

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 21:01:05 +00:00
mikhail.naganov@gmail.com
4ff39b7a7d Remove unused CodeRegion class and corresponding logging functions.
Review URL: http://codereview.chromium.org/67221

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 17:30:27 +00:00
mikhail.naganov@gmail.com
7aacf00933 Allow multiple function literals to be assigned to the same var / property.
In such a case all functions get the same name. I think it's a good performance / usability tradeoff. In case a developer wants more clarity, it's up to him to give names to functions.

Review URL: http://codereview.chromium.org/67168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 16:34:24 +00:00
ager@chromium.org
4cfdb57104 Fix lint. Accidentally commited a reindentation of a parameter list
that introduced line that was too long.

Review URL: http://codereview.chromium.org/67214

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 12:58:14 +00:00
erik.corry@gmail.com
4db9cb3a7f Don't blindly use blx instruction without knowing whether the CPU supports it.
Review URL: http://codereview.chromium.org/67213

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 12:12:47 +00:00
ager@chromium.org
72294ca735 Change the enumeration order for unsigned integer keys to always be
numerical order independently of the representation of the object.

Exchanged the order of enumeration of integer and string keys so
integer keys are first instead of string keys to better match
WebKit/JSC behavior.

Added test cases that document our enumeration order choice.
Review URL: http://codereview.chromium.org/75035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 11:30:55 +00:00
kmillikin@chromium.org
5d8a34e0c8 Remove some unused macros from objects.cc.
Review URL: http://codereview.chromium.org/67211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 11:30:00 +00:00
erik.corry@gmail.com
4d18959446 Avoid a call to the runtime system when doing binary fp ops on ARM
(at the moment only if we do not need to allocate a heap number).
Find a few more oportunities to avoid heap number allocation on IA32.
Add some infrastructure to test coverage of generated ARM code in our
tests.
Review URL: http://codereview.chromium.org/67163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 09:30:23 +00:00
yurys@chromium.org
b92740bf44 Lookup can now be performed for several handles.
Review URL: http://codereview.chromium.org/67155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 06:03:17 +00:00
sgjesse@chromium.org
9f7ccacf86 Add debug command break flag for debugger host dispatch.
Ensure that debugger host dispatch is processed even though there are no debugger commands in the queue.
Review URL: http://codereview.chromium.org/67180

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 19:09:38 +00:00
kasperl@chromium.org
e97c387ec8 Prepare a push to trunk (version 1.1.10).
Review URL: http://codereview.chromium.org/67167

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 13:16:51 +00:00
kmillikin@chromium.org
22896c8304 Change the function name collector to tolerate expressions that contain
multiple anonymous function literals as subexpressions.

Choose the rightmost one the one to attach a name to.
Review URL: http://codereview.chromium.org/67165

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 13:14:23 +00:00
ager@chromium.org
0de8a28ea7 Fix crash bug when loading const variable in the presence of eval.
The problem was a missing 'uninitialized' check.
Review URL: http://codereview.chromium.org/73076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 10:47:23 +00:00
kmillikin@chromium.org
2f0013ebbf A few small changes to --print-ast behavior:
* Remove two horizontal spaces per indent
* Don't print an extra space between "VAR" and "(" for parameters
* Call the name on named property accesses "NAME"

Review URL: http://codereview.chromium.org/67124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 07:41:04 +00:00
erik.corry@gmail.com
93132e1b5d Timeout of os.system() in d8 was timing out too soon.
Review URL: http://codereview.chromium.org/63062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 07:15:41 +00:00
kasperl@chromium.org
3b7f631e86 Allow using with and eval in JS extensions in debug mode by
getting rid of bogus assertion error.
Review URL: http://codereview.chromium.org/73072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 06:28:07 +00:00
yurys@chromium.org
a6e3d992ba To resolve functions from the call stack we need at least ids for the scripts of those functions. The information on the scripts is now included into the response.
Review URL: http://codereview.chromium.org/65006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 01:17:00 +00:00
sgjesse@chromium.org
be7f110adf Remove definition of _HAS_EXCEPTIONS from source files.
The define _HAS_EXCEPTIONS=0 is only required on Windows and is already set in the SCons build file and Visual Studio project files.
Review URL: http://codereview.chromium.org/67116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 14:58:23 +00:00
sgjesse@chromium.org
8b4cfc3768 Fix the source position recorded for funtion return
Record the function return position as the end of the function source. Don't record function entry and return positions as statement positions.

Added a test for source position for break at function return.
Review URL: http://codereview.chromium.org/67109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 14:56:03 +00:00
sgjesse@chromium.org
0668a2a355 Fix VirtualFrame::is_used for ARM
Caused a compiler warning when compiling on Windows.
Review URL: http://codereview.chromium.org/67108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 14:54:41 +00:00
kasperl@chromium.org
66f7a367f7 Fix build issue on Mac.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 14:01:00 +00:00
kasperl@chromium.org
383821854b Prepare a push to trunk (version 1.1.9).
Review URL: http://codereview.chromium.org/73031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 13:29:23 +00:00
kasperl@chromium.org
5decd39b51 Move STATIC_ASSERT to IsShortcutCandidate to fix the
broken build.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/67126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 12:10:32 +00:00
kasperl@chromium.org
bca37da6af Verify the symbol table contents before and after all
GCs (not just mark-compacts) and make the mark-compact
shortcutting of cons-strings identical to the scavenge
version.
Review URL: http://codereview.chromium.org/67125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 12:00:56 +00:00
kasperl@chromium.org
850d5ed380 Fixed issue 303 by not shortcutting cons-symbols and added
symbol table verification after mark-compact GCs.
Review URL: http://codereview.chromium.org/73029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 09:58:42 +00:00
mikhail.naganov@gmail.com
c77875113c Fixed presubmit errors.
TBR=sgjesse@chromium.org

Review URL: http://codereview.chromium.org/73025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 01:33:15 +00:00
mikhail.naganov@gmail.com
3c2a7bdf21 Add name inference for anonymous functions to facilitate debugging and profiling of JS code.
Currently function name inference is wired with AST optimization pass to avoid introducing another pass over AST. A better solution would be to rewrite AST visitors so they can be naturally combined together in a single pass, as their current implementation doesn't allow it.

For examples of cases where function names can be inferred, see the tests file.

Review URL: http://codereview.chromium.org/62146

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 00:51:59 +00:00
davemoore@chromium.org
69bdfe255b Reenable d8 stats timers, using the histogram mechanism
Review URL: http://codereview.chromium.org/67100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 00:30:44 +00:00
mikhail.naganov@gmail.com
0eb4dea12d Implemented "no heap access" mode for JSFrame which is used for stack sampling in profiler.
As I discovered that JSFrame accesses SharedFunctionInfo only to calculate caller SP and the latter is not used in profiler's stack sampling, I disabled accessing heap objects in JSFrame when doing stack sampling. This finally made V8's profiling stable when used from Chrome on a real web app.

Review URL: http://codereview.chromium.org/73020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-13 23:12:04 +00:00
mikhail.naganov@gmail.com
ce6d2916b8 Added another check in SafeStackFrameIterator.
While playing with profiling in debug version of Chrome, I encontered a
case when assertion in StackHandlerIterator failed.

Review URL: http://codereview.chromium.org/65005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-13 14:42:01 +00:00
kasperl@chromium.org
3b80ddac19 Prepare a push to trunk (version 1.1.8).
Review URL: http://codereview.chromium.org/71001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-11 09:01:45 +00:00
iposva@chromium.org
8ce3aae482 Workaround for http://crbug.com/9746:
- Added special cutouts if a Vector has NULL data, which will now happen
  if an external string's resource has been deleted.
- Added an verification phase before old gen GC to verify that all real
  entries in the SymbolTable are valid symbols.
- Added test that verifies the correct behaviour of the workaround.

Review URL: http://codereview.chromium.org/66011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-09 23:04:00 +00:00
asargent@chromium.org
144cca7d3d Fix v8::Object::DeleteHiddenValue to not bail when there are no hidden properties.
Review URL: http://codereview.chromium.org/58016


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-08 21:05:29 +00:00
erik.corry@gmail.com
59d3cf8403 Fix profiling on Android.
Review URL: http://codereview.chromium.org/62102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 13:33:39 +00:00
sgjesse@chromium.org
835b89b727 Fixed step in handling for function.call.
For function.call debug step in did not work as execution did not break in the function called. This has now been fixed using the same means as for function.apply in CL http://codereview.chromium.org/63055.
Review URL: http://codereview.chromium.org/63058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 12:11:43 +00:00
sgjesse@chromium.org
a74fcf458c Fixed the step in handling for function.apply.
The generic step-in mechanism floods the function called with break points to ensure a break is hit when entering the function. This generic mechanism was also used for function.apply. The code for function.apply contains a keyed load IC which was patched when stepping into function.apply. However function.apply enteres an internal frame not a JavaScript frame. This caused the logic for returning from the break in function.apply to fail as it forced a jump to the IC on the top JavaScript frame. The top JavaScript frame was the frame for the function calling function.apply not the frame for the apply function. Now returning from the break point in the keyed load IC in the apply code caused a jump to the code for the call IC for the function calling function.apply in the first place. Not a pretty sight.

Step-in now handles function.apply as a separate case where the actual JavaScript function called through apply is flodded with breakpoints instead of the function.apply function.

BUG=269
BUG=8210@chromium.org
Review URL: http://codereview.chromium.org/63055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 09:54:53 +00:00
kasperl@chromium.org
9c8b187658 Prepare a push to trunk (version 1.1.7).
Review URL: http://codereview.chromium.org/62091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 06:00:21 +00:00
davemoore@chromium.org
500281afde Put back compilation cache
Review URL: http://codereview.chromium.org/56185

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-06 18:08:06 +00:00
whesse@chromium.org
5ccfe93c9e Fix crash with indexed setter on objects without corresponding getter.
Review URL: http://codereview.chromium.org/63010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-06 14:55:01 +00:00
whesse@chromium.org
20a6e7e5e9 Rewrite of VisitCountOperation that should speed it up
Review URL: http://codereview.chromium.org/56151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 13:27:14 +00:00
lrn@chromium.org
5dc51480c5 Quick pointer comparison, removed undetectable tests.
Special case for NaN in equality test.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 12:44:45 +00:00
lrn@chromium.org
3e55df5a57 Tracks static type of strings in frame elements and results.
Uses static string type to optimize string additions.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 12:01:56 +00:00
kmillikin@chromium.org
339e2e5244 Add two more invocations of ENTER_V8 to places where we need to write
to V8's heap.
Review URL: http://codereview.chromium.org/60089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 10:30:21 +00:00
kmillikin@chromium.org
2c5ce41876 Move some more ENTER_V8 invocations. The biggest one is to move the
one in v8::V8::Initialize to after the early bailout.
Review URL: http://codereview.chromium.org/60083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 08:18:24 +00:00
kmillikin@chromium.org
35d6c8fb03 Remove ENTER_V8 from small API functions that do not need access to
V8's heap or only need read access.

This means that IsDeadCeck and EnsureInitialized could sometimes be
called without having already entered the VM.  To simplify things,
this is made always the case.  A couple of error callbacks do not need
to leave V8 because they haven't entered.

Consistently enter V8 after LOG_API (since LOG_API is sometimes before
EnsureInitialized or IsDeadCheck).

This all should have no effect unless V8 is built with
ENABLE_HEAP_PROTECTION and run with --protect-heap.

Review URL: http://codereview.chromium.org/56211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 07:49:20 +00:00
kmillikin@chromium.org
8389e4f9f8 When computing pairwise merges of frame elements, we should allow
constants and copies below the watermark on backward jump targets
(that's the whole point!).
Review URL: http://codereview.chromium.org/60044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 12:23:49 +00:00
kmillikin@chromium.org
06860982a9 Clean up return statements in the code generator by explicitly
counting the reference to the return value and passing it to the
return label.  This requires threading it through try/catch and
try/finally.  The return value is loaded into eax more lazily than
before.

Also, perform some related refactoring of jump targets.
Review URL: http://codereview.chromium.org/56172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 08:58:18 +00:00
ager@chromium.org
9bc64e657a Prepare another push to trunk (version 1.1.6). We pushed an unsafe
compiler optimization which has now been reverted.
Review URL: http://codereview.chromium.org/60011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 10:41:37 +00:00
ager@chromium.org
deb0d4cc37 Revert change 1656 which was unsafe until it can be properly fixed.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/60010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 10:35:20 +00:00
ager@chromium.org
185aa082c4 Prepare to push version 1.1.5 to trunk. This version contains a
number of bug fixes.
Review URL: http://codereview.chromium.org/60004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 06:39:18 +00:00
ager@chromium.org
aacd90314f Reland exception propagation fix.
Fix exception propagation problem where undefined was returned instead
of an empty handle in case of an exception.  This problem can break
C++ programs that are not interested in catching exceptions and just
want to propagate them out by testing for empty handles.

The issue is that exceptions are not rescheduled if they are
externally caught.  Externally caught exceptions have to be
rescheduled if there is a JavaScript frame on the way to the C++ frame
that holds the external handler.

A couple of tests will fail on the ARM simulator because the simulator
has separate stacks for C++ and JavaScript.  I have marked the tests
as failing only on the simulator.
Review URL: http://codereview.chromium.org/56105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 15:23:58 +00:00
whesse@chromium.org
e2ed40a1eb Keep the result of postfix increment and decrement in a register.
Review URL: http://codereview.chromium.org/56106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 15:03:02 +00:00
kmillikin@chromium.org
c80b013999 Fix issue 294 by ensuring that we don't lose the copy flag on memory
frame elements when allocating them to a register as a result of
popping one of their copies.
Review URL: http://codereview.chromium.org/57053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 14:01:25 +00:00
erik.corry@gmail.com
c7925142e6 * Add rmdir, mkdir -p and umask to d8 on Unix.
* Remove the non-working methods from the os object on d8 on Windows
so you can test for their presence with if (os.system).
* Add a test (not run by default since it only works on d8).
* Fix incorrect use of wait that left defunct processes (zombies).
Review URL: http://codereview.chromium.org/56107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 12:45:33 +00:00
sgjesse@chromium.org
745cccdcba Fix developer shell build on Windows.
Fixed the OS check in the SCons build. Moved SetEnvironment to platform file as Windows does not have setenv. Added the d8-windows.cc to the Visual Studio project.
Review URL: http://codereview.chromium.org/57050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 11:45:20 +00:00
sgjesse@chromium.org
1f7a7d9c58 Change handling of debugger unloading.
Add a semaphore for accessing debugger varaibles which can be changed from a different thread. This is mainly the debug message handler which can be set to NULL to disconnect the debugger.

Control the unloading of the debugger from the V8 thread. Before the debugger unload was called from the thread setting the debug message handler to NULL. This was not safe as this involves calling into V8. This change handles the unloading of the debugger either when entering a debugger event and the debugger was disconnected while the debugger was not active or when leaving the debugger and the debugger was disconnected while the debugger was active.

Add a flag to avoid unloading the debugger if debugger code is used by the application for other purposes than debugging.

Added tests for clearing the debug message handler.
Review URL: http://codereview.chromium.org/56102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 11:24:59 +00:00
kmillikin@chromium.org
87d8bcf7ee Mark a bunch of places where we enter or leave V8 through the API.
Indiscriminately mark every place with EnsureInitialized, ON_BAILOUT,
or IsDeadCheck (even if they cannot write to V8's heap).  Also mark
callbacks, and one other place (Function::SetName) hit in Chromium.
Review URL: http://codereview.chromium.org/57049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:07:57 +00:00
mikhail.naganov@gmail.com
e88d1e475e Fixed numerous issues that were causing errors in profiler log processing
on a real web application loaded in the test shell.

Also implemented output of JSON-encoded call stacks for profiler
prototype.

Review URL: http://codereview.chromium.org/56064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:06:37 +00:00
kmillikin@chromium.org
d0b7f84ec0 Use the AST optimizer on the bodies of function literals. Notify the
oprofile agent when we compile the body of a function literal.
Review URL: http://codereview.chromium.org/57048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:02:40 +00:00
erik.corry@gmail.com
b9c5232c1d Add os.chdir and os.setenv to d8. Move system() to os.system().
Protect os.chdir, os.setenv, os.system against string conversion
failures.  Add comment about the issue to include/v8.h.
Review URL: http://codereview.chromium.org/57005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 06:51:25 +00:00
kmillikin@chromium.org
d3ee29a7f6 Add just enough state changes from EXTERNAL (outside V8) to OTHER
(generic state inside V8) in the API to allow the V8 shell to run all
the mjsunit tests with heap protection on.

These state changes are only taken when built with
ENABLE_HEAP_PROTECTION.  The two states OTHER and EXTERNAL are treated
the same because we will not properly reenter OTHER through the API.
Review URL: http://codereview.chromium.org/56060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 13:32:28 +00:00
whesse@chromium.org
0f9253b537 Initialize list of frame elements to proper size.
Review URL: http://codereview.chromium.org/57006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 13:03:32 +00:00
ager@chromium.org
ab845fd829 Prepare to push version 1.1.4 to trunk.
Review URL: http://codereview.chromium.org/56059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 12:58:45 +00:00
yurys@chromium.org
9a9194584c When devtools window is opening it requests all scripts parsed by the moment. Currently 'scripts' response contains only first 80 chars of the scripts sources. I added an argument to the protocol that allows to include full source text into the response.
Review URL: http://codereview.chromium.org/55011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 11:50:17 +00:00
sgjesse@chromium.org
d97a72c606 Correct debugger active check.
With r1627 (http://code.google.com/p/v8/source/detail?r=1627) the use of the debugger message thread was made optional. However the check for active debugger still included a check for the message thread. This is fixed by this change.
Review URL: http://codereview.chromium.org/58001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 08:16:14 +00:00
whesse@chromium.org
952179e323 Formatting changes and some slight improvements to revision 1621, issue 42006.
Review URL: http://codereview.chromium.org/51007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 14:35:24 +00:00
erik.corry@gmail.com
a038698ead Add a system() call to the d8 shell (Unix only).
Review URL: http://codereview.chromium.org/42641

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 13:50:26 +00:00
kmillikin@chromium.org
99ba650f71 Mark some of the places we leave V8 via callbacks as transitions to
state EXTERNAL rather than OTHER.
Review URL: http://codereview.chromium.org/55007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 12:32:28 +00:00
mikhail.naganov@gmail.com
d3c4a658f9 Fix issue 289: check external source strings validity in Runtime_DebugGetLoadedScripts
Review URL: http://codereview.chromium.org/56002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 11:22:52 +00:00
kmillikin@chromium.org
b8af68b03f Make VirtualFrame::CallStub on IA32 responsible for moving arguments
into the appropriate registers for the stub call.  Since stubs that
take arguments in registers do not (currently) take any arguments on
the stack, the unused generality has been removed (it's easy to put
back in later).
Review URL: http://codereview.chromium.org/55003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 10:29:37 +00:00
sgjesse@chromium.org
6feb0d9a8f Fixed lint.
Removed one space added by Visual Studio.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/55006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 10:17:50 +00:00
sgjesse@chromium.org
8b7a288e48 Debugger message handler can be called from V8 thread.
The message handler function set through the debugger API is normally called in a different thread than the V8 thread where execution is stopped due to debugger event. This change adds an option to the API for specifying that the message handler should be called directly from the V8 thread. For an application like Chrome where thread dispatching is already in place this makes more sense.

Add an option to the message handler debugger API to process messages in the thread where V8 is running instead of posting it to a queue for processing on a additional thread.
Review URL: http://codereview.chromium.org/42643

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 09:56:53 +00:00
sgjesse@chromium.org
8e34544bd1 Moved stdio and string functions to POSIX platform file.
Review URL: http://codereview.chromium.org/45063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 08:38:02 +00:00
christian.plesner.hansen@gmail.com
9142c42df2 Fixed a bunch of memory leaks in tests, including:
- String traversal test data (now in a zone)
 - Debug message thread (now joined on exit)
 - Threading test threads (now joined on exit)
 - Changed message tests framework to cope with valgrind
Also, fixed a bug where we'd try to delete stack-allocated objects
when tearing down v8.  Good times.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 00:24:49 +00:00
whesse@chromium.org
d970e04e04 Optimize binary operations in which one or both operands is a constant smi.
Review URL: http://codereview.chromium.org/42006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 13:14:10 +00:00
kmillikin@chromium.org
f8bf152c89 Change the arguments access stub to take both arguments in registers
rathern than one in a register and one on the stack.

Fix a stack height bug in the case that the arguments access stub hit
its slow case.
Review URL: http://codereview.chromium.org/49037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 13:02:00 +00:00
kmillikin@chromium.org
4dceb3c87f In the IA32 code genrator, handle call ICs and constructor calls the
same as load and store ICs.  Eliminate the general function used to
call any IC.
Review URL: http://codereview.chromium.org/42638

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 13:00:03 +00:00
whesse@chromium.org
7d23b48a02 Inline part of RawSyncElementAt, split the rest into two
functions.  Improve PrepareForCall, SyncRange, and SyncElementAt.

Review URL: http://codereview.chromium.org/49029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 10:25:49 +00:00
sgjesse@chromium.org
dedd811806 Set svn:eol-style for platform-posix.cc to native.
The svn:eol-style property for platform-posix.cc is now set to native. This should get rid of the CR characters in the file added by comitting from Windows and make file lint again.

TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/42639

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 09:43:14 +00:00
sgjesse@chromium.org
0e5999efae Move time related functions to POSIX platform file.
The functions getrusage, gettimeofday and localtime are in POSIX.1-2001.
Review URL: http://codereview.chromium.org/53045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 09:28:27 +00:00
feng@chromium.org
0a5a8e8854 Fix and cleanup ARM port:
1) removed unused function, PcStoreOffset;
2) use macro instruction, Jump, when branching from JS code to C code.

This CL replaces http://codereview.chromium.org/53039/show, per our discussion.

Review URL: http://codereview.chromium.org/42610

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 18:23:04 +00:00
kmillikin@chromium.org
03419c8369 Simplify the way the code generator handles calls to IC stubs. Before
we dispatched on the IC stub kind in a generic CallCodeObject
function.  Now, we have special functions for the load and store IC
stubs.

We also (for the load and store ICs) handle moving register arguments
into place only after the stack is prepared for the call.  This
replaces some memory-to-memory moves (for copies whose backing store
is occupied by a register needed for the arguments) with
memory-to-register moves.
Review URL: http://codereview.chromium.org/42602

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 14:08:41 +00:00
mikhail.naganov@gmail.com
49af176623 Add another check in profiler's stack iterator to ensure stability.
I made a test run of benchmarks and found another weak point. After
fixing it, benchmarks are able to run for a 100 times in a row
successfully in both builds.

Review URL: http://codereview.chromium.org/53050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 14:07:52 +00:00
mikhail.naganov@gmail.com
9f5de7d9da Added more checks to SafeStackFrameIterator to prevent crashes when profiling.
Tested by profiling 3d-morph.js a 100 times both in debug and release builds.

Review URL: http://codereview.chromium.org/42600

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:59:25 +00:00
lrn@chromium.org
eb3bf2083c Move reference to variable that isn't used on ARM.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:37:49 +00:00
lrn@chromium.org
bd8816efb0 Moved String.prototype.match implementation to C++.
Some extra runtime assertions added.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:14:10 +00:00
kmillikin@chromium.org
7c35a5d820 The code generator doesn't need to put the argument count in eax for
call ICs.  Refactor CallRuntime on ARM to match the structure of IA32.
Update some comments.
Review URL: http://codereview.chromium.org/42598

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 11:05:36 +00:00
kasperl@chromium.org
4d8ea7143f Make sure to generate a CodeCreateEvent for the CPU features
probe code object, and really raise an exception if SplayTree.Remove
is called with a key that cannot be found. 
Review URL: http://codereview.chromium.org/42597

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 10:29:22 +00:00
whesse@chromium.org
36853c83d1 Remove register counts from VirtualFrame, use register indices instead.
Review URL: http://codereview.chromium.org/42565

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 10:00:52 +00:00
mikhail.naganov@gmail.com
68d9782c01 Use OpenThread instead of DuplicateHandle in Win32 profiler implementation.
OpenThread doesn't fail in Chrome sandbox, while DuplicateHandle does.

Review URL: http://codereview.chromium.org/49028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 09:35:11 +00:00
kasperl@chromium.org
898297b0b7 Preparing push of version 1.1.3 to trunk.
Review URL: http://codereview.chromium.org/53012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:42:35 +00:00
erik.corry@gmail.com
62a7f913a2 Strcmp thinko and SConstruct improvement for d8 on Android.
Review URL: http://codereview.chromium.org/42560

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:29:49 +00:00
kmillikin@chromium.org
f38dc917b0 Make the "has function literal" default value for loops conservative.
It defaults to true so that if the analysis is not run we get a safe
analysis result.

Review URL: http://codereview.chromium.org/42562

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:25:22 +00:00
erik.corry@gmail.com
944258f979 Remove stl dependencies from d8.
Review URL: http://codereview.chromium.org/42559

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:33:54 +00:00
kmillikin@chromium.org
89a43b8f18 Fix ARM simulator. Unless building for the actual ARM hardware,
inline assembler in C++ code should be IA32 assembly, not ARM.

TBR=erik.corry@gmail.com

Review URL: http://codereview.chromium.org/53011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:21:34 +00:00
whesse@chromium.org
1d5f94c71e Fix ARM build for changes to VirtualFrame
Review URL: http://codereview.chromium.org/53009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:11:34 +00:00
kmillikin@chromium.org
bc3fb11881 Add basic infrastructure for protecting V8's heap when leaving the VM
and unprotecting it when (re)entering.  The functionality is enabled
by the flag --protect-heap and requires V8 to be built with
ENABLE_HEAP_PROTECTION and ENABLE_LOGGING_AND_PROFILING defined.

Implemented on Linux and Windows but not yet for other platforms.

Review URL: http://codereview.chromium.org/53004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 12:47:53 +00:00
kmillikin@chromium.org
1ba34bf86b Fix issue 286. Ensure frame elements are invalidated by
InvalidateFrameSlotAt.

Review URL: http://codereview.chromium.org/53008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 12:42:28 +00:00
whesse@chromium.org
bbd21a59fd Add pointers to a VirtualFrame that keep track of the indexes of register
frame elements.
Review URL: http://codereview.chromium.org/53005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 11:52:33 +00:00
ager@chromium.org
efba01b86f Preparing push of version 1.1.2 to trunk.
Review URL: http://codereview.chromium.org/42556

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 11:07:09 +00:00
lrn@chromium.org
c8c5d9820d Test a few assertions that should hold.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:16:30 +00:00
sgjesse@chromium.org
cf8c7cc3e4 Change the debugger agent protocol to be RFC-822 compilant.
All headers are now terminated with CRLF and not jusr LF. The beginning of the body is indicated by an empty header (just CRLF).
Review URL: http://codereview.chromium.org/42553

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:15:02 +00:00
kasperl@chromium.org
70aa1fde83 Fix ARM performance regression on constructing array
and object literals by using the same logic as we use
on IA-32.
Review URL: http://codereview.chromium.org/53001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:55:11 +00:00
kmillikin@chromium.org
5e2f3adfd0 Fix issue 284.
The problem was continuing out of the body of a for/in (where we do
register allocation) to the loop update (where we do not).  Variables
allocated to registers where not preserved.

Review URL: http://codereview.chromium.org/53002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:29:24 +00:00
ager@chromium.org
d4e6613760 Fix bug in context stores, where the store was ignored if there was a
read-only property in the prototype chain.  Stores should only be
ignored if there is a read-only property on the object itself.
Review URL: http://codereview.chromium.org/42508

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:27:43 +00:00
sgjesse@chromium.org
96088babe7 Add a new "pseudo" platform for POSIX. It it will contain code shared by the platforms supporting POSIX. Currently Linux, Mac OS and FreeBSD are considered POSIX platforms using the POSIX implementation.
Initially the platform socket implementation has been moved from the Linux, Mac OS and FreeBSD platforms to the POSIX platform.

If implementation which ends up in the POSIX platform at some point cannot be the same across POSIX platforms the implementation can easily be moved back into the individual POSIX "complient" platforms.
Review URL: http://codereview.chromium.org/51001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 06:32:00 +00:00
sgjesse@chromium.org
b5d265a3a2 Fixed Linux compiler warning.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/49010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 22:35:01 +00:00
sgjesse@chromium.org
d8e53cf150 Extend debugger agent protocol with a connect message.Added a name of the embedding application when enabeling the debugger agent.Send a connection message from the debugger agent to the remote debugger when connecting. This message contains the V8 version, the protcol version (currently 1) and the name of the embedding application. Currently this information is just printed raw as received.
Review URL: http://codereview.chromium.org/52012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 22:23:39 +00:00
iposva@chromium.org
7b50c072f9 Add a new C++ pointer wrapping API to External to not dilute the
External::Cast.

Review URL: http://codereview.chromium.org/52021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 19:51:10 +00:00
whesse@chromium.org
34f71b1149 Fix flaw in VirtualFrame::SetElementAt handling multiple copies of elements.
Review URL: http://codereview.chromium.org/47006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 15:03:39 +00:00
whesse@chromium.org
010443b985 Fix build
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/52013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 13:51:41 +00:00
whesse@chromium.org
ba16099e40 Change VirtualFrame::AdjustCopies to mark target as invalid.
Change its name to VirtualFrame::InvalidateFrameSlot
Review URL: http://codereview.chromium.org/50012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 13:37:55 +00:00
erik.corry@gmail.com
aa81281b3d Reapply portability fixes, this time without 64 bit system bug.
Review URL: http://codereview.chromium.org/52010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 12:37:53 +00:00
erik.corry@gmail.com
5fb08f90f7 Profiler ticks every 1ms instead of every 10ms.
Review URL: http://codereview.chromium.org/42498

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 10:06:20 +00:00
lrn@chromium.org
9ca7c8af2c Fix bug in regexp the breaks interpreter.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 08:44:33 +00:00
olehougaard
a8c50151fc Reapply revisions 1432, 1433, 1469 and 1472 while fixing issue 279.
Review URL: http://codereview.chromium.org/48006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 07:27:47 +00:00
iposva@chromium.org
1db91bee34 - Do not allocate proxy objects if the pointer can be wrapped in a Smi representation.
Review URL: http://codereview.chromium.org/42466

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 22:13:50 +00:00
erik.corry@gmail.com
80ce1b2500 Reverse latest build tweaks since they fail on some 64 bit systems
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 17:01:15 +00:00
erik.corry@gmail.com
77b963ca04 More compatibility changes.
Review URL: http://codereview.chromium.org/47004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 16:37:18 +00:00
mikhail.naganov@gmail.com
3bd4c93d07 Support profiler stack sampling in any situation. After this change, almost all profiler ticks (except GC ones) have a stack sample data associated.
Tested under Linux, OS X, and Windows.

Review URL: http://codereview.chromium.org/50052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 14:49:12 +00:00
lrn@chromium.org
c35bacb2dc Now compiles when not in debug mode. Whoops.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 14:09:48 +00:00
lrn@chromium.org
6fa2f4f0c9 RegExps now restart if their input string changes representation during preemption.
Cleaned up the handling of strings moving, so strings moved by GC and strings changing representation are handled equivalently.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 13:26:16 +00:00
kmillikin@chromium.org
6565243504 Inline the Result::Unuse member function and change the Result
destructor to no longer invalidate the result.

Review URL: http://codereview.chromium.org/50051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 12:58:14 +00:00
kmillikin@chromium.org
9752bf90b5 Remove a bunch of unnecessary includes from header files in favor of
forward declarations.

Review URL: http://codereview.chromium.org/42389

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 09:35:31 +00:00
sgjesse@chromium.org
32de098ef6 Allow the debugger agent to reuse ports stuck in TIME_WAIT for listening.
When the debugger agent terminates the used port can be stuck in TIME_WAIT for some time depending on the OS and the state of the socket. With this change will allow the debug agent to start listening on a port still in TIME_WAIT. During development of both V8 and embedding applications this makes it much easier to restart an application using the debugger agent.

This also makes it possible to run the tests involving the debugger agent multiple times without failure.
Review URL: http://codereview.chromium.org/50050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 09:03:36 +00:00
sgjesse@chromium.org
83111deb97 Add support for setting the SO_REUSEADDR option for sockets.
Review URL: http://codereview.chromium.org/50036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 08:53:57 +00:00
mike@belshe.com
318c9eed21 Add a public API for using an empty sring.
v8::String::Empty()


Review URL: http://codereview.chromium.org/42423

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 23:35:09 +00:00
ager@chromium.org
29e3ae8dfb Make sure that the d8 shell calls OnExit in case of exceptions.
Review URL: http://codereview.chromium.org/42415

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 22:09:14 +00:00
sgjesse@chromium.org
b3a4e60957 Better handling of startup and shutdown of the debugger agent.
During bind and listen socket errors are now handled. If the listen socket is occoupied the agent will retry its bind operation until success or shutdown.

Added orderly shutdown of the debugger agent both with and without a client connected.
Review URL: http://codereview.chromium.org/50007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 21:07:07 +00:00
ager@chromium.org
4d6b3a54ad Fix lint.
TBR=iposva
Review URL: http://codereview.chromium.org/50026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 19:29:23 +00:00
iposva@chromium.org
ea653021fc - Allow hidden properties to be set on any JSObject through the V8 C++ API.
- Use the hidden properties to expose a IdentityHash accessor.

Review URL: http://codereview.chromium.org/50016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 18:50:00 +00:00
ager@chromium.org
2fcad0aec1 Revert change 1509 that flush ICs when adding setters on an object or
when setting a __proto__ to an object that holds a setter.

This seems to cause a major page load regression, so we need to tune
the clearing.
Review URL: http://codereview.chromium.org/50011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 15:06:00 +00:00
kmillikin@chromium.org
cd296924b6 Add a copied flag to virtual frame elements that tells if a copy has
been made of the element.  Set it when copying an element, clear it
when writing to an element marked copied and discovering that it is
not copied.

The copied flags on entry frames are exact.  Preparing a frame for
merging set the copied flags to be exact (to increase the likelihood
of matching the entry frame or another frame).
Review URL: http://codereview.chromium.org/50005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 11:57:18 +00:00
sgjesse@chromium.org
881e01b245 Change the socket close to shutdown.
Removed the close method for socket and added shutdown instead. The shutdown method is the one to use when terminating socket communication. The close call is in the destructor.
Review URL: http://codereview.chromium.org/42387

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 11:55:09 +00:00
lrn@chromium.org
c918bec9df Reuse output array instead of creating a new one for each call in Date.parse
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 09:40:38 +00:00
erik.corry@gmail.com
b37b9af182 Spolling.
Review URL: http://codereview.chromium.org/42327

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 09:12:24 +00:00
ager@chromium.org
2ff097e17f Minor build and code style issues.
Review URL: http://codereview.chromium.org/42354

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 21:14:46 +00:00
mike@belshe.com
c5d777338a Expose Cloning through API.
Review URL: http://codereview.chromium.org/42339

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 19:24:15 +00:00
ager@chromium.org
4b928a492b Inline the fast path for handle creation.
Simplify the interceptor IC code by using raw pointers instead of handles.
Review URL: http://codereview.chromium.org/49001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 18:50:35 +00:00
erik.corry@gmail.com
2d4dd93bdd Misc. portability fixes.
Review URL: http://codereview.chromium.org/42337

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 15:20:26 +00:00
sgjesse@chromium.org
b6640ad0b5 Fixed memory leaks in socket implementation.
Fixed memory leaks reported by valgring in the socket implementation and socket tests.

BUG=276
Review URL: http://codereview.chromium.org/42331

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:32:22 +00:00
sgjesse@chromium.org
b226f1242e Add a close method to sockets.
Now the destructor is not the only way of closing a socket, which was a bit to limited.
Review URL: http://codereview.chromium.org/42330

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:11:43 +00:00
olehougaard
74ebdf896c Getting rid of OS::StrDup and OS::StrNDup which were sometimes misused.
Review URL: http://codereview.chromium.org/42329

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:50:13 +00:00
kmillikin@chromium.org
a41b28bb03 Revert r1529, which failed on some of the benchmarks.
Review URL: http://codereview.chromium.org/48128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:35:42 +00:00
olehougaard
427ba8ec40 Introducing a new StrNDup function that uses new[] for when we dispose the result using delete[].
Review URL: http://codereview.chromium.org/48127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:27:37 +00:00
olehougaard
c2e2d59ed9 Fixing potentially problematic usage of OS::StrDup that caused some strings to be allocated with malloc() but freed with delete[].
Review URL: http://codereview.chromium.org/48126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 11:55:40 +00:00
sgjesse@chromium.org
75bfe56832 Circumvent a bug in older glibc.
In glibc prior to 2.3.4 the return value from sem_timedwait is not -1
when it fails, but the actual error code.

Turned out that our ARM setup uses glibc 2.3.2.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 10:48:06 +00:00
kmillikin@chromium.org
a0a3388363 Add a bit to a virtual frame element telling if it's been copied. Set
it when a copy is made, clear it when the element is next written.
Review URL: http://codereview.chromium.org/42324

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 10:37:37 +00:00
whesse@chromium.org
10be4f7ffd Speed up the inner loop of free register allocation.
Review URL: http://codereview.chromium.org/42296

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 10:31:31 +00:00
kmillikin@chromium.org
22f9dbf651 Fix static overrun.
Review URL: http://codereview.chromium.org/48124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 09:49:11 +00:00
sgjesse@chromium.org
d7f9992442 Added a wait with timeout to the platform semaphore class.
The code has been compiled and tested on Windows, Linux and Mac OS.

The FreeBSD version is a copy of the Linux version which should work on FreeBSD as well. According to the FreeBSD documentation clock_gettime is part of the standard C library so the assumption is that no additional link libraries is required for FreeBSD.
Review URL: http://codereview.chromium.org/48123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 09:04:24 +00:00
lrn@chromium.org
89f466659c Flatten strings before parsing them as Date strings, and work on Vector of chars instead.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 13:27:21 +00:00
lrn@chromium.org
eb656c723b Moved subject and index before matches in RegExp lastMatchInfo.
Some minor changes, and removed the new handlescope in the inner loop of replace. Only really affects replaces on extremely long strings.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 12:44:20 +00:00
sgjesse@chromium.org
37d7dcd20c Add thread information to the debugger.
Each thread running V8 code is assigned an id in thread local storage the first time V8 code is run in it. The thread information returned to the debugger contains the number of threads, the id of each of these threads and which one is the current thread.

Added a threads command to the developer shell debugger for showing information on threads.
Review URL: http://codereview.chromium.org/48009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 11:40:47 +00:00
erik.corry@gmail.com
223ea84e56 Lint...
Review URL: http://codereview.chromium.org/42276

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 10:46:53 +00:00
erik.corry@gmail.com
608a99a90c Remove all uses of StringShape variables, since that has proven
to be error-prone and of little benefit in terms of performance.
Review URL: http://codereview.chromium.org/45010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 09:33:06 +00:00
sgjesse@chromium.org
f060eb3293 Changed preemption related stuff in debugger entry.
Fixed an assertion which did not hold when the debugger was recursively entered.

Removed the clearing of the preemption flag in debugger entry as there was no need for it. The handling of preemption by the stack guard takes care of the in debugger situation anyway.
Review URL: http://codereview.chromium.org/48004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 09:28:01 +00:00
kmillikin@chromium.org
21d97bca55 Simplify the construction of virtual frame elements in preparation for
switching to a linked representation of copied elements.  This change
avoids initializing frame elements to invalid unless they need to be.

Review URL: http://codereview.chromium.org/48008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 14:49:55 +00:00
sgjesse@chromium.org
2ca478f9fa The method yield is now available in the context created for threads in the developer shell.
Added options --preemption/--no-preemption and --preemption-interval to control preemption in the developer shell when running several threads. Default is still to enable preemption with interval 1ms if threads are created.
Review URL: http://codereview.chromium.org/48001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 10:08:59 +00:00
lrn@chromium.org
014f0fd841 ReplaceRegExpWithString: Avoid extending handle scope by adding scope inside loop.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 09:49:14 +00:00
sgjesse@chromium.org
6a9d16f40f Missed a few comment changes in r1508.
Review URL: http://codereview.chromium.org/42175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 07:36:52 +00:00
erik.corry@gmail.com
99063fe0f8 Fix GC related crash bug in search-replace.
Review URL: http://codereview.chromium.org/42214

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 22:28:26 +00:00
erik.corry@gmail.com
3aa57f7f65 Revert 1432, 1433, 1469 and 1472 due to a bug with literal objects.
Review URL: http://codereview.chromium.org/46088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 16:18:20 +00:00
davemoore@chromium.org
46f753a184 - Added ability to call histograms from within v8
- Changed the StatsRates to use the new HistogramTimers

Review URL: http://codereview.chromium.org/42020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 16:06:31 +00:00
christian.plesner.hansen@gmail.com
8dffcb9efa Flush ICs when adding setters to an object or setting a __proto__ to
an object that holds a setter.  If there are no store ics then no
flushing is done.  The implementation has been tweaked so that no ICs
are cleared during normal context creation.
This may cost us some performance but I'm submitting it as it is and
if there are problems we can either decide to be smarter about when,
what and/or how we clear, or back this change out altogether.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:43:07 +00:00
sgjesse@chromium.org
17b498c957 A new stack guard break flag DEBUGCOMMAND has been introduced. This is used to signal debug break due to debugger commands available in the queue for processing. If a stack guard break happens with this flag and not the DEBUGBREAK flag the no debug break event is generated and execution is resumed automatically when all debugger commands in the queue has been processed.
This makes it possible to remote debuggers to just add commands to the queue without having to request a break as well. As soon as any JavaScript executes the debugger commands will be processed and the response send to the remote debugger.

Currently hide this behind a flag (--debugger-auto-break) as the current command line debugger in Chrome is not designed for this new behaviour, whereas the new Chrome developer tools will use it.
Review URL: http://codereview.chromium.org/42173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:26:21 +00:00
olehougaard
74722e199f Implementing __defineSetter__ and __defineGetter__ with an array index as argument as described in issue 242. For performance reasons, the change is not applied to arrays. This conforms to the behavior of Safari.
Review URL: http://codereview.chromium.org/46030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 11:40:09 +00:00
lrn@chromium.org
e2af4529c3 String.replace implemented in C++.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 10:22:38 +00:00
kmillikin@chromium.org
30af089bc5 Fix a test in the IA32 code generator for whether loop conditions
contain function literals.  The test was not conservative enough.

Review URL: http://codereview.chromium.org/42138

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 19:49:19 +00:00
kmillikin@chromium.org
03d7c6bd1d Reenable the duplicated test at the bottom of for and while loops. It
is enabled for a loop by the absence of function literal
subexpressions in the condition expression.

Review URL: http://codereview.chromium.org/42127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 15:44:05 +00:00
kmillikin@chromium.org
d0e76971a6 Change the way we handle backward jumps in the code generator. Keep
the frame states of all the forward-entering frames that had merge
code generated.  At a backward branch, check if there is no merge code
or if we can reuse an existing merge block.
Review URL: http://codereview.chromium.org/40169

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:55:17 +00:00
ager@chromium.org
a4d60dd463 Prepare to push V8 version 1.1.1 to trunk.
Review URL: http://codereview.chromium.org/42122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:10:44 +00:00
sgjesse@chromium.org
79aae815dd During the refactoring in r1461 and adding of script ids in r1468 the propagation of a boolean flag was missing. This caused the line numbers retreived through ScriptMirror objects to ignore the resource line offset information in the script.
Added an explicit false parameter where the parameter was previously left out.

Added a test case for this.


Review URL: http://codereview.chromium.org/43130

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:03:05 +00:00
kmillikin@chromium.org
c7f2458912 Tweak an assertion in the jump target destructor so that it only
applies to initialized jump targets, and not in the case of a stack
overflow.
Review URL: http://codereview.chromium.org/42118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 12:30:45 +00:00
ager@chromium.org
04cc9cfffd Revert the exception propagation fix. It leads to crashes because
Top::external_caught_exception_ and Top::try_catch_handler_ are no
longer in sync.  Pulling it out until I have the time to fix it.
Review URL: http://codereview.chromium.org/42117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 12:29:17 +00:00
erik.corry@gmail.com
60d83a789b 8-byte align C stack on Linux and Windows.
Review URL: http://codereview.chromium.org/42116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 10:20:32 +00:00
kasperl@chromium.org
765a3804a9 Prepare push to trunk. Now working on version 1.1.1.
Review URL: http://codereview.chromium.org/43123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 07:11:15 +00:00
erik.corry@gmail.com
912c8eb03a * Reapply revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge, reverted in 1429.
* Fix of $1 accessor on sliced strings.
* Fix of lastParen method when last parenthesis did not match.
Review URL: http://codereview.chromium.org/43075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 14:00:55 +00:00
kmillikin@chromium.org
3c41aab15d Ensure deallocation of the dynamically allocated shadow targets used
for compilation of try/finally, even in the case where control cannot
reach the end of the finally block.

Review URL: http://codereview.chromium.org/43071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 13:14:27 +00:00
kmillikin@chromium.org
1a7359fb9d Deallocate the dynamically-allocated shadow targets that we use for
compilation of try/catch and try/finally.
Review URL: http://codereview.chromium.org/42068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 12:08:28 +00:00
ager@chromium.org
90093ea868 Fix exception propagation problem where undefined was returned instead
of an empty handle in case of an exception.  This problem can break
C++ programs that are not interested in catching exceptions and just
want to propagate them out by testing for empty handles.

The issue is that exceptions are not rescheduled if they are
externally caught.  Externally caught exceptions have to be
rescheduled if there is a JavaScript frame on the way to the C++ frame
that holds the external handler.
Review URL: http://codereview.chromium.org/43070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 11:13:15 +00:00
kmillikin@chromium.org
82df32b78c Fix issue 268 by explicitly calling Unuse (to deallocate all contained
virtual frames) on zone-allocated jump targets.  These include jump
targets in AST nodes and the entry and exit targets of deferred code.

See http://code.google.com/p/v8/issues/detail?id=268

Review URL: http://codereview.chromium.org/42067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 10:25:48 +00:00
kmillikin@chromium.org
8d622ac4ac Fix formatting problem.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 06:31:21 +00:00
kmillikin@chromium.org
0e60cf38dc Fix issue 265 by handling extra statement state on the frame based on
the expectation at the break, continue, and return labels (including
shadowed ones) instead of based on the AST nodes.

See http://code.google.com/p/v8/issues/detail?id=265

Review URL: http://codereview.chromium.org/42017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 06:17:19 +00:00
kasperl@chromium.org
1a9dc2d002 Move InitLineEnds and GetLineNumber to handles.cc to avoid
issues with a raw this pointer and GC.

Fix issue with FlattenString where we may keep a StringShape
alive across a GC.
Review URL: http://codereview.chromium.org/43020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 15:08:45 +00:00
christian.plesner.hansen@gmail.com
feb2594f8a Tweaked semantics of error prototype.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 13:15:24 +00:00
sgjesse@chromium.org
b1729e6c39 Remove spaces to satisfy linter
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/43012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:41:11 +00:00
lrn@chromium.org
34db0ff86c Issue 267: Calls to arguments in eval-tainted function scope uses global object as receiver.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:28:34 +00:00
kmillikin@chromium.org
773843b62e Introduce a BreakTarget subclass of JumpTarget used to represent the
blocks labeled by "break", "continue", and "return".  BreakTargets are
the only jump targets that appear in the AST, the only ones that can
be uninitialized, and the only ones that can be shadowed.
Review URL: http://codereview.chromium.org/42008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:11:56 +00:00
sgjesse@chromium.org
b74c5b1e39 Moved the storage of the last script id into the heap to make it part of the serialized data when starting V8 on a snapshot.
Currently the script ids wrap when positive smi value is exhausted.
Review URL: http://codereview.chromium.org/43008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:05:20 +00:00
christian.plesner.hansen@gmail.com
c1c5a09ebd Made the Error prototype into an error. Allow \c at the end of
regexps.  Throw a type error when calling regexp methods on
non-regexps.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 11:32:19 +00:00
olehougaard
4703382b3e Fixed whitespace.
Review URL: http://codereview.chromium.org/43006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 09:30:10 +00:00
christian.plesner.hansen@gmail.com
782b53799d Implemented invalid UTF8 detection in decodeURI. That is, detection
of invalid utf8 not invalid utf8-detection.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 09:08:05 +00:00
erik.corry@gmail.com
5718547ab9 Fix probably harmless thinko in StringCharAt (causes
slow-case code to be run).
Review URL: http://codereview.chromium.org/43005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 09:00:04 +00:00
olehougaard
860508f3e2 Optimizing generation of nested literals for both object and array literals.
Review URL: http://codereview.chromium.org/40295

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:59:00 +00:00
sgjesse@chromium.org
9d17b0d4c8 Whenever a script object is created it is assigned a unique id. Currently this id is assigned from an 32 bit integer counter.
Changed the script break points to be able to handle both break points based on script names and script ids. When break points are set through a script id the position is relative to the script itself. This is different from the script break points set through script names where the line/coulmn offset is taken into account.

This has the side effect that function break points are not converted into script break points for named scripts.

Show the script id in the D8 shell debugger when listing all scripts using the 'scripts' command.
Review URL: http://codereview.chromium.org/40317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:10:50 +00:00
sgjesse@chromium.org
994ea00dfe Changed a function in the internal debugger JavaScript to return the full source location instead of only the position.
Added an optional parameter to exclude/include the source line offset in source location.

Extended a message test to include a test with source offset.
Review URL: http://codereview.chromium.org/39342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 17:59:25 +00:00
whesse@chromium.org
7977c6c680 Fix garbage collection of unused maps. Null descriptors, created
by map collection, are now handled correctly everywhere.  The 
map-collect flag is now true by default.
Review URL: http://codereview.chromium.org/40218

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 16:24:46 +00:00
olehougaard
2185cbaf49 Allocate getters and setters in old space to avoid failing assertion in TransformToFastProperties.
Review URL: http://codereview.chromium.org/39344

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 15:52:56 +00:00
kmillikin@chromium.org
1984f54a78 Assert in debug mode that we do not try to compile a function literal
more than once.

Review URL: http://codereview.chromium.org/39339

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 14:48:34 +00:00
bak@chromium.org
eb816ae54a Fixed the disassembler to cope with cmpb.
Review URL: http://codereview.chromium.org/40296

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 14:41:40 +00:00
bak@chromium.org
e2028632eb Added a space to satisfy presubmit.py.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 14:13:57 +00:00
kmillikin@chromium.org
34af9f2ecf Work around issue 260 for now by disabling duplication of the loop
condition for while and for loops.

http://code.google.com/p/v8/issues/detail?id=260

Review URL: http://codereview.chromium.org/40294

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 14:12:20 +00:00
bak@chromium.org
9c96c68ab4 Reduced the code sequence for testing for object type.
We now use cmpb instead of movzx_b and cmp.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 14:00:51 +00:00
christian.plesner.hansen@gmail.com
36dd91c562 Added .message accessor to messages. This gives you the same
descriptive message as is used to construct the toString() for an
error object.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 12:50:32 +00:00
kmillikin@chromium.org
ee2601dc3b Change the CALL_HEAP_FUNCTION macro so that it is no longer a cpplint
exception.
Review URL: http://codereview.chromium.org/39334

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 12:03:38 +00:00
kmillikin@chromium.org
ece2c03160 Fix issue 263:
http://code.google.com/p/v8/issues/detail?id=263

Sharing the code to unlink the exception handler for a try/finally
causes us to try to merge virtual frames with different heights (due
to statements that keep state on the stack) at the entry to the unlink
code.

Avoid this by unlinking the handler separately for each exit from the
try block.
Review URL: http://codereview.chromium.org/39331

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 10:51:57 +00:00
ager@chromium.org
5b1ae4a070 cpplint does not like multiple semicolons on the same line. Do not
lint that line.

TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/39330

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 08:54:16 +00:00
sgjesse@chromium.org
747e20c449 Mark the empty script object, the script for the empty function and the D8 utility script as native scripts.
This is mainly to avoid these scripts showing up in the debugger when showing normal scripts.

Removed the check for the empty script in the debugger function returning loaded scripts as this check only filtered out the empty script from the debugger context and not empty scripts in all other contexts. Also this filter did not take the script for the empty function into account.
Review URL: http://codereview.chromium.org/39322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 08:44:59 +00:00
ager@chromium.org
2e34b0354e Minor changes to allow V8 to build on Ubuntu Jaunty.
Review URL: http://codereview.chromium.org/40289

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 08:42:21 +00:00
kmillikin@chromium.org
182c3ebb2d Reapply r1434 and port to ARM.
Review URL: http://codereview.chromium.org/40220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 14:18:03 +00:00
mikhail.naganov@gmail.com
cd71a2792c Get rid or heap allocation in stack sampler to avoid deadlocks.
Review URL: http://codereview.chromium.org/40219

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 13:07:57 +00:00
sgjesse@chromium.org
9ea5fe3d9e Fix lint errors
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/39253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 12:08:55 +00:00
christian.plesner.hansen@gmail.com
2a2c9381ea Reverted r1434
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 11:59:53 +00:00
sgjesse@chromium.org
22d6605f2f All preemption requests are now ignored while in the debugger. This ensures that no change of V8 thread happenes while in the debugger. The only thing that happens is that a flag is set to indicate that preemption happened. When the debugger is left preemption is requested if it occourred while in the debugger.
Moved the debugger related global variables from Top to thread local in Debug.
Review URL: http://codereview.chromium.org/39124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 11:03:14 +00:00
kmillikin@chromium.org
ef2069631e Fix minor formatting issue.
Review URL: http://codereview.chromium.org/40215

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 10:39:39 +00:00
kmillikin@chromium.org
b638d5c613 Fix issue 259.
http://code.google.com/p/v8/issues/detail?id=259

Due to constant folding of loop conditions, it is possible to have a
try/finally with no exits from the try block (eg, an infinite loop in
the try block).  In that case the code to unlink the try handler is
dead and should not be emitted.

Review URL: http://codereview.chromium.org/39251

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 10:18:33 +00:00
olehougaard
3d9c24c8a4 Fixed ARM build by remembering to apply object literal optimazation to ARM code.
Review URL: http://codereview.chromium.org/40214

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 09:56:59 +00:00
olehougaard
d46a9900ee Optimizing nested, constant object literals (like JSON objects) by building one large object template for the entire object instead of one for each sub-object.
Review URL: http://codereview.chromium.org/39184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 09:38:17 +00:00
kasperl@chromium.org
e9e8628380 Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge until we have a fix
for the crashers we see on the distributed test infra-
structure.

We know that revision 1383 is causing issues, but I 
had to revert some of the other recent RegExp changes
in order to get this part out.
Review URL: http://codereview.chromium.org/39186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 15:23:17 +00:00
erik.corry@gmail.com
cf3c1a8c18 Arrays created with new Array(n) are not assumed to be sparse unless the given
size is truly huge.  A test had to be modified slightly so as not to be too slow.
Review URL: http://codereview.chromium.org/40163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 12:45:47 +00:00
mikhail.naganov@gmail.com
0554042907 Fixed projects after adding oprofile-agent* sources.
Review URL: http://codereview.chromium.org/40159

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 11:35:44 +00:00
mikhail.naganov@gmail.com
c013397399 Adding support for reporting addresses of JIT compiled code to OProfile.
Please be warned that current gHardy versions have OProfile 0.9.3
which doesn't have JIT API. You need to install OProfile 0.9.4
with a 32-bit version of opagent library. Instructions are on the
internal Wiki page: http://wiki/Main/V8UsingOProfile

Review URL: http://codereview.chromium.org/39179


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 10:53:08 +00:00
kmillikin@chromium.org
e37f6087c6 In List::Add, correctly handle the case of adding a reference to a
preexisting list element to a list, and to not return anything (we
never used the return value).  Remove List::Insert, it is not
currently used or needed.  Change List::AddBlock to take a copy of
the element to be replicated rather than a reference.

Review URL: http://codereview.chromium.org/39148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 08:10:42 +00:00
kasperl@chromium.org
567d9a603e Tweak the context disposal GC heuristic: If the garbage collector
interface is exposed through the global gc() function, we avoid 
being clever about forcing GCs when contexts are disposed and leave 
it to the embedder to make informed decisions about when to force 
a collection.
Review URL: http://codereview.chromium.org/40154

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 07:44:13 +00:00
erik.corry@gmail.com
a85e72c1d1 Put 'this' in a handle in EnsureSize to avoid crash caused by GC at
unlucky moment.
Review URL: http://codereview.chromium.org/40108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 13:23:39 +00:00
lrn@chromium.org
21fb24e0b2 Issue 254 - now correctly updates lastIndexof when using the test method.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 12:29:37 +00:00
olehougaard
7bd50d046d Fixed issue 253. No longer assuming that the target of a property lookup is a JSObject.
Review URL: http://codereview.chromium.org/39126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 11:57:24 +00:00
kmillikin@chromium.org
9331d358c9 Add an insert function to our list utility class.
Review URL: http://codereview.chromium.org/40105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:34:36 +00:00
sgjesse@chromium.org
f87d1530e6 The SendAll method on Socket was a helper method that did not really belong in platform.
Review URL: http://codereview.chromium.org/40104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:33:00 +00:00
kmillikin@chromium.org
870b6c46fa Fix a few indentation issues.
Review URL: http://codereview.chromium.org/40102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:13:17 +00:00
lrn@chromium.org
4852bef23d Issue 246 - wait until regexp is parsed to detect whether it's simple.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 09:52:01 +00:00
sgjesse@chromium.org
6ef7ef657e Add remote debugging front end to developer shell.
D8 now supports demote debuggign of a V8 instance with the debugger agent enabled. Running D8 with the option --remote-debugger will try to connect to a V8 debugger agent and process the debugging protocol. The command line UI is the same as for the D8 in-process debugger as the same code is used for processing the debugger JSON. 
Review URL: http://codereview.chromium.org/40011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 09:42:51 +00:00
kmillikin@chromium.org
fa5bc7ea0b Streamline CodeGenerator::Comparison in the IA32 code generator. When
doing constant folding, handle only the cases that actually arise.
This avoids some complicated logic, some extra comparisons, and fixes
issue 247:

http://code.google.com/p/v8/issues/detail?id=247

Review URL: http://codereview.chromium.org/40023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 08:50:38 +00:00
ager@chromium.org
6e78598d77 Fix the 64-bit build. Implicit conversion from string constant to
char* gives a warning.  Using const char* instead.
Review URL: http://codereview.chromium.org/40100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 07:42:39 +00:00
iposva@chromium.org
be0c1e26e9 Add a meaningful name when disassembling code. This makes it easier
to match generated code to the originating source.

Review URL: http://codereview.chromium.org/39014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 06:14:34 +00:00
kasperl@chromium.org
9f78714717 Disable the compilation caching for scripts to make it
possible to start generating code specific to a global
object. We should start caching scripts but make the
mechanism local to a specific global context inspired
by the way we handle eval-caching. 
Review URL: http://codereview.chromium.org/40007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 13:35:05 +00:00
sgjesse@chromium.org
92aa4ab36c Add V8 debugger agent.
The debugger agent listens on a TCP/IP port for a remote debugger connection. When such a connection is established the debuger JSON protocol is communicated between the agent the the remote debugger. The messages containing the JSON protocol has a RFC-822 like header with a Content-Length field and with the body containing the JSON in UTF-8 encoding.

The D8 shell has option --debugger-agent to start the debugger agent.
Review URL: http://codereview.chromium.org/27355

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 12:23:45 +00:00
mikhail.naganov@gmail.com
3db607a3c4 Dump more stack frames to perf log when executing a C++ function.
JavaScriptFrameIterator is templatized on the iterator type and renamed to JavaScriptFrameIteratorTemp.
The original JSFI is now a typedef for JavaScriptFrameIteratorTemp<StackFrameIterator>. Because of templatizing, JSFI code is moved to frames-inl.h

StackTraceFrameIterator moved to frames.*

Implemented SafeStackFrameIterator which wraps StackFrameIterator and have the same interface. It performs additional checks of stack addresses prior to delegating to StackFrameIterator. SafeSFI is used in an another specialization of JavaScriptFrameIteratorTemp template to perform safe JS frames iteration on sampler ticks.

I haven't took an advantage of having multiple stack frames in tickprocessor yet.

Review URL: http://codereview.chromium.org/39009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 11:56:44 +00:00
kmillikin@chromium.org
47b20ddf89 Before emitting code to merge frames, forget the sync flag (telling
that an element is mirrored in memory) for elements whose target is a
register.  This avoids generating some duplicate merge blocks.

Review URL: http://codereview.chromium.org/40005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 11:51:59 +00:00
lrn@chromium.org
265715d90c Optimized regexp.test. No longer creates an intermediate string array.
Removed some handler code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 10:54:12 +00:00
lrn@chromium.org
55e57ec1b7 Validation of flattened regexps on ARM now doesn't expect a native code.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 09:11:09 +00:00
sgjesse@chromium.org
3d8a5f1a75 Unify the handling of the event and response JSON in developer shell debugger.
Formatting of both debugger events and debugger responses are now unified into one function. This is mainly in preparation for the upcomming remote debugging support where having it a one function simplify things.
Review URL: http://codereview.chromium.org/27330

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 19:02:27 +00:00
lrn@chromium.org
50e042dfcd All RegExp data are set on a single FixedArray instead of nesting them three deep.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 13:58:37 +00:00
kmillikin@chromium.org
4678719d24 Simplify the way that we compile slow-case switch statements. Compile
all the reachable tests first, and then all the reachable bodies.
Review URL: http://codereview.chromium.org/28296

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 11:30:17 +00:00
christian.plesner.hansen@gmail.com
a4d8eadc69 all-in-one
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 09:09:07 +00:00
ager@chromium.org
de5b4605b6 Check the return value of fwrite.
Newer versions of glib stdio mark fwrite() with war_unused_result.

Commiting for estade@chromium.org.

See http://codereview.chromium.org/27305


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-28 13:59:55 +00:00
erik.corry@gmail.com
367e9b5d08 Fix regression in regexp-caching.html
Review URL: http://codereview.chromium.org/27273

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 14:02:00 +00:00
kmillikin@chromium.org
f4735247cf Merge from experimental code generator branch to bleeding edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:00:32 +00:00
kasperl@chromium.org
d77a0468cb Prepare push to trunk. Now working on version 1.0.4.
Review URL: http://codereview.chromium.org/31015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 11:55:57 +00:00
iposva@chromium.org
f5966c3815 Align code entry points to 32 bytes.
Review URL: http://codereview.chromium.org/27269

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 11:19:31 +00:00
erik.corry@gmail.com
5b8c63f9d5 Avoids allocating a JSArray of capture information on each non-global
regular expression match.
Also moves all last-match information into one place where it can be
updated from C++ code (this will be used in another afsnit).
Review URL: http://codereview.chromium.org/28184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 10:04:34 +00:00
mikhail.naganov@gmail.com
0864b2d646 Two small changes regarding GC ticks.
1) Don't try to sample the stack if VM is in 'GC' state
2) Show GC ticks in profiler statistics

Review URL: http://codereview.chromium.org/27213

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 15:48:32 +00:00
kasperl@chromium.org
c7c959632a Experimental (somewhat): Force GCs when disposing contexts, but
make sure not to do it repeatedly for bursts of context 
disposals.
Review URL: http://codereview.chromium.org/27201

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 12:40:50 +00:00
sgjesse@chromium.org
20a9e9b013 Change the D8 JavaScript debugger to fully use the JSON protocol.
The D8 debugger frontend now only processes JSON messages. Before the debugger events was passed as objects.

Changed the debugger events JSON generation to use the same serailizer as the responses to requests. This provides correct serialization of mirror objects in debugger events. Renamed ResponsePacket to ProtocolMessage as it is not only used for responses.
Review URL: http://codereview.chromium.org/27202

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 11:55:35 +00:00
iposva@chromium.org
c81043b259 Follow on to r1368: Remove unnecessary HandleScope in the StubCompilers.
Review URL: http://codereview.chromium.org/27156

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 08:05:03 +00:00
olehougaard
e3c0ae62af Go into slow case when encountering object initialization on the top level to optimize performance of code like
C.prototype.x = ...;
C.prototype.y = ...;
...
C.prototype.z = ...;
Review URL: http://codereview.chromium.org/27128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:54:22 +00:00
ager@chromium.org
411b7d18f6 Fix lint issues found by tools/presubmit.py.
TBR=mikhail.naganov
Review URL: http://codereview.chromium.org/28178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:05:53 +00:00
iposva@chromium.org
c093e94546 - Pass the knowledge whether the old GC is compacting to the GC prologue and epilogue. This allows us to skip frame cooking and uncooking when doing a mark-sweep GC.
- Add the ability for the code to refer to its code object by adding a handle to the code object in the MacroAssembler.

Review URL: http://codereview.chromium.org/27133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:52:15 +00:00
mikhail.naganov@gmail.com
632d4e4f3d Adding unit tests for profiler's stack tracer.
The testing is a bit tricky because we need to obtain a frame
pointer (EBP on IA-32) from inside of a function. This is especially
interesting in case of a compiled JavaScript function.

Review URL: http://codereview.chromium.org/28112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:00:21 +00:00
kasperl@chromium.org
1e42e70021 Use SSE3 instructions - if available - for faster To(U)Int32
conversion in bit operation stubs. Disable serialization
support by default to allow us to use SSE3 instructions and
faster write barrier code when running without snapshot.
Review URL: http://codereview.chromium.org/27046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 14:57:46 +00:00
ager@chromium.org
539a29cbd3 Prepare push to trunk. Now working on version 1.0.3.
Review URL: http://codereview.chromium.org/27129

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 12:46:23 +00:00
erik.corry@gmail.com
bbc2a73f31 Remove JSCRE
Review URL: http://codereview.chromium.org/21504

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 08:08:01 +00:00
sgjesse@chromium.org
57dfd336db Remove obsolete function NewArrayLiteral.
This function (which creates a tenured JS array) was not use by any code.
Review URL: http://codereview.chromium.org/28070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 20:55:11 +00:00
mikhail.naganov@gmail.com
1338c33eed A refinement of cl 28068.
Review URL: http://codereview.chromium.org/28069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 14:58:48 +00:00
sgjesse@chromium.org
ad7ad5cfe0 Fixed lint errors.
The previous commit (r1349) resulted in a number of lint errors - extra whitespace and a missing explicit on a constructor in the test. These has been fixed.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/27089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 14:22:42 +00:00
mikhail.naganov@gmail.com
1d843bfa3d Fixed regression http://code.google.com/p/v8/issues/detail?id=236.
The problem was that the case of 'undefined' script source wasn't
handled in Script::InitLineEnds.

Review URL: http://codereview.chromium.org/28068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:33:49 +00:00
sgjesse@chromium.org
be059966c1 Add socket support to platform code.
The new Socket class is an encapsulation of the standard BSD socket API. As it depends on platform specific include files and have some slight platform variations it is part of the platform code.

On Mac OS only the option SO_REUSEADDR is set to true for server sockets. Running the test required it as the bound listener socket would sometimes end up in TIME_WAIT. On Windows and Linux this has never been observed (given the client end of the socket is closed before the server end).

The code has been tested on Windows, Linux and Mac OS. The FreeBSD version is a copy of the Linux version but has not been compiled nor tested.

Missing Xcode project updates.
Review URL: http://codereview.chromium.org/27085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:32:01 +00:00
ager@chromium.org
0c7af39737 Speed up access to global variables from eval scopes. Traverse the
surrounding context to figure out if the variable could be global.  If
the variable could be global we check context extension objects at
runtime and use a global LoadIC if no variables have been introduced
by eval.

Fix crash bug when loading function arguments from inside eval.  The 
shadowed variable in the DYNAMIC_LOCAL case does not rewrite to a slot in 
that case.

Review URL: http://codereview.chromium.org/28027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:11:53 +00:00
kmillikin@chromium.org
0c1c8d1876 Cleanup the ARM code generator for try...catch and try...finally by
clarifying the comments and simplifying code.

Review URL: http://codereview.chromium.org/27047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-23 12:05:40 +00:00
kasperl@chromium.org
0e1819d0b8 Revert 1330:1331.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/24026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 17:42:04 +00:00
ager@chromium.org
b6a1cd6787 Simplify non-smi bit operation optimization. The explicit range
checks are not needed.  If we fail to store the float as a 64-bit
integer, we just go to the runtime system.  The only extra case in
which we enter the runtime system is for NaN which should not matter.

Review URL: http://codereview.chromium.org/21539

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 14:23:54 +00:00
kasperl@chromium.org
3afe470026 Improve generated code for non-smi bit operations by
converting the operands to 32-bit ints directly in the 
machine code stub instead of just checking if the heap 
numbers really just represent 32-bit ints and going
through the runtime system in that case.
Review URL: http://codereview.chromium.org/21536

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 13:30:32 +00:00
sgjesse@chromium.org
aeafc3bba4 Minor fix to fix building without ENABLE_LOGGING_AND_PROFILING defined.
Review URL: http://codereview.chromium.org/21534

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 13:21:41 +00:00
lrn@chromium.org
f8051275e0 Add test for GC during RegExp.
Fix bug found by test.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 13:03:54 +00:00
sgjesse@chromium.org
563287b02f Introduced a platform independent version of strchr, as the return value is const on Windows.
This fixes building of D8 on Windows.

Mac OS and FreeBSD changes have not been tested.
Review URL: http://codereview.chromium.org/20534

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 11:31:44 +00:00
ager@chromium.org
c86b47f414 Rearrange the code in Scope::ResolveVariable.
I find this clearer and it also enables the DYNAMIC_LOCAL optimization
for code executed by eval that itself uses eval:

 eval("(function() { var x = 2; eval('1'); do stuff with x...; })()")

Review URL: http://codereview.chromium.org/24023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 15:27:44 +00:00
sgjesse@chromium.org
bdaf8320e4 Fixed Linux build.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/20493

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 14:29:48 +00:00
sgjesse@chromium.org
44b83d3e77 Add host callback for debug break.
Add the ability to have the host embedding V8 receive a callback in the V8 thread while V8 is processing a debug callback. When V8 is processing a debug callback the thread where V8 is executing is sitting in a tight loop processing debug commands until the continue command has been executed. In some embedding situations it is beneficial to be able to call back into the embedding host from the thread where V8 is sitting. The might have functions which needs to be called to complement the JavaScript debugging.

Using the uint16_t array to pass a void* is a temporary hack.
Review URL: http://codereview.chromium.org/20491

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 14:02:42 +00:00
erik.corry@gmail.com
b1fbed8cca A little peephole optimization for the Irregexp bytecode interpreter.
Review URL: http://codereview.chromium.org/21481

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 10:03:27 +00:00
erik.corry@gmail.com
9c608b2c5a Limit how many places we generate code to flush the same actions. This gives a
13% code size reduction in the php regexp with no discernable performance loss.
Review URL: http://codereview.chromium.org/20457

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 08:24:28 +00:00
ager@chromium.org
195753ff7b Commit of eval changes left out because they were stuck in another changelist.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 07:22:53 +00:00
patrick@chromium.org
1c0ebb7e1c Update d8 preemption mode to support multiple files per line. Each line is run
in its own context.  Files are separated by spaces, and will be run in order,
left to right.

Also add support for comment lines, which start with '#'.
Review URL: http://codereview.chromium.org/20319

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 04:26:04 +00:00
erik.corry@gmail.com
3f962f0f9c Irregexp:
* Fix UC16 character classes on ASCII subjects.
* Fix sign problem in Irregexp interpreter.
* Make passes over text nodes more readable.
Review URL: http://codereview.chromium.org/21450

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 16:07:03 +00:00
ager@chromium.org
b4b5e3ca95 Not sure what happened, but my revert did not get everything out. Fixing the problem instead. The issue was using tmp instead of context in two places.
TBR=kasperl

Review URL: http://codereview.chromium.org/20459

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 15:55:24 +00:00
ager@chromium.org
19f04d16c7 Revert eval changes since there is a crash that I don't have the time
to fix now.

TBR=kasperl
Review URL: http://codereview.chromium.org/20458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 15:34:37 +00:00
ager@chromium.org
cafe25f258 ARM side of load optimization in the presence of eval.
Review URL: http://codereview.chromium.org/20453

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 13:54:13 +00:00
ager@chromium.org
74ac71d846 Fix lint errors because of long line.
Review URL: http://codereview.chromium.org/21449

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 13:17:40 +00:00
ager@chromium.org
a09832ab76 Optimize loads from variables that might be shadowed by variables
introduced by eval.

In the cases where calls to eval have not introduced any variables, we
do not need to perform a runtime call.  Instead, we verify that the
context extension objects have not been created and perform a direct
load.

Not implemented for ARM yet and the scope resolution code could use
some better abstractions.  I'd like to do that in a separate
changelist.
Review URL: http://codereview.chromium.org/20419

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 13:04:28 +00:00
sgjesse@chromium.org
98208125cb Include all the code in code creation log events. The code object header size is now added to the size Before ticks the last instructions of a JavaScript functions ended up as unaccounted in the profile.Include ticks in the the last created code object in the profile.Show the unaccounted ticks in the profile as a percentage together with the rest. Added an option to ignore unaccounted ticks in the percentage calculation.
Review URL: http://codereview.chromium.org/21410

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 10:29:56 +00:00
mikhail.naganov@gmail.com
a23fd3284a Added the simplest call stack sampling and call profile in tick processor output.
Currently only two stack frames are sampled (current function and its caller).

Output of tick processor looks like this:

 [Call profile]:
   total  call path
   15.2%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: montReduce crypto.js:583
    6.5%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpSquareTo crypto.js:431
    2.9%  Builtin: KeyedStoreIC_Generic  <-  LazyCompile: montReduce crypto.js:583
    2.3%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpMultiplyTo crypto.js:415

Tested under Windows, Linux and OS X.

Review URL: http://codereview.chromium.org/21403


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 14:45:45 +00:00
sgjesse@chromium.org
969d43e785 Changed all log messages to be handled through the LogMessageBuilder instead of through fprintf directly to the log file.
Added a flag for the runtime %Log call and fixed its arguments checking. Use of %Log is only for debugging.
Review URL: http://codereview.chromium.org/21406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 12:49:35 +00:00
lrn@chromium.org
8cd31d295b Array sort was changed in a way that completely undid another optimization.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:56:36 +00:00
sgjesse@chromium.org
2ffc8d981e Fixed Linux build.
TBR=ager
Review URL: http://codereview.chromium.org/21402

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:31:53 +00:00
sgjesse@chromium.org
577741308b First step in refactoring the logging system to allow the logging messages to have other destinations than an open file.
This change introduces a log message builder which builds the log message in a static string buffer instead of formatting the log message through fprintf. Currently this message can only be written to a file afterwards.

Changed the code related events to use the log message builder.
Review URL: http://codereview.chromium.org/20406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:21:24 +00:00
ager@chromium.org
d81fad1766 Fix debugger function that treated retry-after-gc failure as an
exception.

Minor indentation cleanup.
Review URL: http://codereview.chromium.org/20404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-16 13:31:13 +00:00
lrn@chromium.org
3e2712e018 Lots of small optimizations, and one that is measurable (speeds up celtickane-array signficantly).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-16 10:18:34 +00:00
sgjesse@chromium.org
5344151ecb Added check for existing frames to the evaluate debugger request.
Fixed output of evaluated expressions from the debugger in the developer shell.

Use global evaluate request from developer shell if there is no JavaScript stack.

Remove use of JS2C macros in developer shell JavaScript code.
Review URL: http://codereview.chromium.org/21350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 14:20:03 +00:00
sgjesse@chromium.org
b10926644c Modified printing of some types of heap objects to make the printing more uniform.
Review URL: http://codereview.chromium.org/21348

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:56:44 +00:00
sgjesse@chromium.org
a0aa0309a2 Fix lint errors and compile erors on Linux.
TBR=ager
Review URL: http://codereview.chromium.org/21349

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:50:47 +00:00
sgjesse@chromium.org
ceef7cb854 Make the debugger completely unload when the debug event listener is unregistered.
Added a number of handle scopes to the debugger code to keep handles local to the function using them.

Fixed SetDebugEventListener to actually unregister when passed a NULL pointer. Previously this NULL pointer was wrapped in a Proxy.

BUG=1242702
Review URL: http://codereview.chromium.org/21347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:36:58 +00:00
ager@chromium.org
be5767575b Prepare push to trunk containing two irregexp crash fixes and support
for morphing strings to external strings.  Now working on version
1.0.2.

Review URL: http://codereview.chromium.org/20351

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 10:03:06 +00:00
lrn@chromium.org
80bb2cc546 Missing handle check. Triggers bug if the runtime stack overflows and it is detected by a global regexp.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 09:40:15 +00:00
iposva@chromium.org
be6b490fb0 Remove experimental ExternalSymbolCallback feature. This is not needed
since we can now transform String objects to be external when needed.

Review URL: http://codereview.chromium.org/21285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 16:58:55 +00:00
lrn@chromium.org
0b1f3f2134 Issue 231 - Irregexp backtracking stack pointer could become corrupted.
http://code.google.com/p/v8/issues/detail?id=231


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 13:07:58 +00:00
ager@chromium.org
4b6d4f6b3b Fix a couple of typos reported as V8 issue 226.
Review URL: http://codereview.chromium.org/20298

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 09:29:02 +00:00
lrn@chromium.org
396fa22799 Regular Expression literal flags may contain unicode escapes. If these escape any of the
valid flags, "gim", they should work.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 09:09:28 +00:00
iposva@chromium.org
1bf2c7405e Allow the morphing of strings to external strings to avoid having to
create copies in the embedding code (aka WebKit V8 bindings) on every
external use.

Review URL: http://codereview.chromium.org/21117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 23:52:52 +00:00
lrn@chromium.org
c621bbbe45 Issue 227 Fixed. Properly handles non-ASCII characters in quick-check on ASCII strings.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 11:54:30 +00:00
olehougaard
e7150a8d8a Fixing a few bugs to make the --log-state-change option work.
Review URL: http://codereview.chromium.org/20220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 07:38:31 +00:00
lrn@chromium.org
15ef421bc7 Fix for issue 228.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-10 08:25:25 +00:00
iposva@chromium.org
4ce82a17d0 Prepare push to trunk. Now working on version 1.0.1.
Review URL: http://codereview.chromium.org/21194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-10 00:31:58 +00:00
sgjesse@chromium.org
2bd60ab80f Fix linking of mksnapshot
Changelist http://codereview.chromium.org/20177 caused linking of mksnapshot to fail as link libraries where not specified. Updated build to link mksnapshot with pthread on Linux and Mac OS and with winmm on Windows.
Review URL: http://codereview.chromium.org/21171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 16:00:55 +00:00
sgjesse@chromium.org
85584333f9 Support for building V8 with MinGW
V8 can now be build with MinGW. It still fails the following four tests in debug mode:

  mjsunit/parse-int-float
  mjsunit/mirror-array.js
  mjsunit/integer-to-string.js
  mjsunit/regress/regress-114.js

Building with MinGW has been tested with version 5.1.4 using GCC 3.4.5.

In addition to supporting MinGW this change also makes it more explicit which targets needs to link with which libraries.

BUG=64
Review URL: http://codereview.chromium.org/20177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 15:06:07 +00:00
sgjesse@chromium.org
a85f5c86bc Moved some IA32 specific code from to the architecture dependent part of the debugger code.
Renamed functions related to patching of code with call instructions to match the naming conversion.

BUG=1240753
Review URL: http://codereview.chromium.org/20176

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 12:17:39 +00:00
sgjesse@chromium.org
6b4d372696 Added the 'references' command to the debugger protocol to provide access to the mirror features of retreiving all the objects referencing a given object and all objects instantiated by a given function.
Added commands 'references' and 'instances' to the developer shell for using this new debugger protocol command.
Review URL: http://codereview.chromium.org/21080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 14:19:36 +00:00
ager@chromium.org
05a56bf1ea Add explicit null checks after string conversions in the shells.
This fixes issue 224.
Review URL: http://codereview.chromium.org/20081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 13:53:41 +00:00
lrn@chromium.org
b0e3ee6274 Fix bug 225 in regexp replace with function.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 13:24:13 +00:00
lrn@chromium.org
0070e8c572 Fixed overflow bug in parsing of regexp repetitions.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 12:55:20 +00:00
sgjesse@chromium.org
f7f4cb1c33 Fixed the debugger compile events.
The debugger compile events (BeforeCompile and AfterCompile) have not been used by any V8 debuggers lately and where actually not working any more. Added the correct information to the compile event.

Added a simple 'trace compile' command to the developer shell for testing.

Added a test for compile evnets.
Review URL: http://codereview.chromium.org/21076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 10:10:45 +00:00
ager@chromium.org
5fa3bd8440 Remove unused code. This code used to be used to "decide" if a call
to eval is aliased.  Now that we correctly track eval aliasing, we do
not need this code.
Review URL: http://codereview.chromium.org/20078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 10:06:41 +00:00
sgjesse@chromium.org
d7a9f15bda Updated handling of the script mirror.
The script mirror is now created through MakeMirror like all other mirrors preserving handle identity. Added a couple of properties to the script mirror and added some more tests for the script mirror.
Review URL: http://codereview.chromium.org/21074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 08:23:10 +00:00
erik.corry@gmail.com
a5e55c4584 Fix the not-at-start optimization to trigger on the V8 regexp benchmark.
Review URL: http://codereview.chromium.org/20040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 13:05:40 +00:00
erik.corry@gmail.com
484ee83dd9 Fix crash-bug in code generation for case independent 16 bit backreferences.
Review URL: http://codereview.chromium.org/21042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 12:20:27 +00:00
mikhail.naganov@gmail.com
2258704e69 Refactor code for determining line position in a source file.
1. Make Script::line_ends initialization two-pass to avoid
   dynamic memory allocation
2. Get rid of the original code in messages.js and use
   Script::line_ends instead.

Review URL: http://codereview.chromium.org/21041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 12:07:45 +00:00
sgjesse@chromium.org
93bd4954e1 Minor debugger cleanup. Store the running state of the previous debugger response to avoid having to parse the just generated JSON response just to pick out the running state. Also removed an unused function.
Review URL: http://codereview.chromium.org/20039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 11:36:30 +00:00
sgjesse@chromium.org
4b05db4ee0 Added check for logging enabled in two places where processing/allocation was performed only to be used only as parameters for the LOG macro. Looked through all the uses of the LOG macro and found only these two places where additional checking was required.
Fixed a couple of comments looking through all the uses of the LOG macro.
Review URL: http://codereview.chromium.org/20018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 14:44:39 +00:00
lrn@chromium.org
78ec586391 RegExp: Small bugfix in debug mode.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 13:39:25 +00:00
sgjesse@chromium.org
ee7c5dd64a Use Handle version of AddKeysFromJSArray when building line endingd array.
Review URL: http://codereview.chromium.org/21013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 13:00:40 +00:00
lrn@chromium.org
cf1e1b1b98 Trace contains information about whether we know that we are at the start of input.
Choice nodes may know that they are never not at the start of input.
This can remove start_of_input assertions in cases where they are statically known to fail.
The initial loop is unrolled once if the regexp might check for the start of input. Only the first iteration may be at the start, the following loop knows that it isn't.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 11:43:55 +00:00
mikhail.naganov@gmail.com
3835e915c4 Adding src_file_name:line_number into perf log entries for compiled JS functions.
Thus, instead of the following profiler records:
   1.5%    1.5%   LazyCompile: <anonymous>
we'll now have these:
   1.5%    1.5%   LazyCompile: <anonymous> richards.js:309

Basically, I translated two functions from messages.js into C++.
In the next CL I will update messages.js to use added native functions.

Review URL: http://codereview.chromium.org/19537

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 10:52:02 +00:00
sgjesse@chromium.org
d131ecf3dd Changed the debugger API to allow only one debug event listener to be registered. The public API now only has SetDebugEventListener instead of AddDebugEventListener and RemoveDebugEventListener.
Moved the registrered debug event listener from the context to a global handle in the Debugger class. Storing it in the context did not make much sense.

Changed a lot of tests to handle the API change.

BUG=1242707
Review URL: http://codereview.chromium.org/19753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 07:59:12 +00:00
erik.corry@gmail.com
7f6afa5bf4 The optimizations performed by Irregexp could possible hide bugs or
could themselves be a source of bugs.  Add a flag to switch off
optimizations (--noirregexp-optimization) to aid testing.
Review URL: http://codereview.chromium.org/19538

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 16:27:31 +00:00
ager@chromium.org
c33e51681f Fix issue 221:
http://code.google.com/p/v8/issues/detail?id=221

The attempt to resolve 'eval' went into an infinite loop.  Also, we
need to throw a reference error in case 'eval' cannot be resolved.
Review URL: http://codereview.chromium.org/19536

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 13:18:20 +00:00
kmillikin@chromium.org
46023fb742 Fix for off-by-one when initializing a constant or function
declaration that was not a slot.
Review URL: http://codereview.chromium.org/19745

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 12:05:13 +00:00
erik.corry@gmail.com
b88dbfee5c Fix http://code.google.com/p/chromium/issues/detail?id=7258 crash in IsFlat.
You can't keep a StringShape across things that can cause GC.
Review URL: http://codereview.chromium.org/19749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 08:23:42 +00:00
sgjesse@chromium.org
58e3ae93c4 Remove unused macro definition.
Review URL: http://codereview.chromium.org/19709

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 14:25:10 +00:00
lrn@chromium.org
0730ada63e Allow duplicate flags in regexps to match other browsers.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 12:36:40 +00:00
lrn@chromium.org
6e13e8ce37 Parsing a RegExp decimal escape could overflow, making an otherwise too large
decimal escape be accepted as a capture index.
We introduce a limit on the nubmer of allowed captures in a regexp, and break off
parsing of the decimal escape at that point.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 10:38:25 +00:00
olehougaard
dd2051ca2f Enabling splitting building with snapshots in to building the mksnapshot executable and building with a snapshot to facilitate building for ARM with a crosstool compiler.
Review URL: http://codereview.chromium.org/19014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 09:34:55 +00:00
mike@belshe.com
75037cbd6e Enable programmatic access to Profile pause/resume
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 19:47:00 +00:00
lrn@chromium.org
ef8d48ead5 Added check for invalid repetition in RegExp parser
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 14:14:13 +00:00
deanm@chromium.org
aa8662545a Further minify non-visible JavaScript.
This imports a Python version of Douglas Crockford's JSMin.  JavaScript files can annotate that they want to be run through the minifier.  Currently debug and mirror are minified.

This results in ~12k savings on the final binary size.

Review URL: http://codereview.chromium.org/19013


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-28 10:15:11 +00:00
sgjesse@chromium.org
9f5ad905cb Skip the context extension object when locating objects referenced from another object (the right way).
BUG=211
Review URL: http://codereview.chromium.org/18857

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-28 06:28:13 +00:00
lrn@chromium.org
1e98f72cad Allow larger regexp stack if necessary, which includes specific layout tests.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 13:43:42 +00:00
deanm@chromium.org
269763d51b Reduce the size of a release sample shell by 55k.
The ExternalReferenceTable population code was code driven, using the list macro callbacks to call an Add() function.  Additionally this Add() function was defined in the class defintion, making it inline.  This caused this single function to be ~100k of code.  It is now mostly table driven, but there are still some cases left as code, and these could be improved in the future for further reduction in binary size.

Review URL: http://codereview.chromium.org/18761


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 11:30:44 +00:00
ager@chromium.org
92047bd3fa Prepare push to trunk. Now working on version 1.0.0.
Review URL: http://codereview.chromium.org/18843

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 09:44:41 +00:00
erik.corry@gmail.com
e091488b3e Lint error
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 20:55:31 +00:00
erik.corry@gmail.com
260cd876d1 Eliminate the code that handles fallback to JSCRE. The only way to get
JSCRE now is to use the --noirregexp flag.  Also add code to check that
we react sensibly to some very large regexps.
Review URL: http://codereview.chromium.org/18587

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 20:09:35 +00:00
erik.corry@gmail.com
34b47563ff Reduce work done in EatsAtLeast to a sane level.
Review URL: http://codereview.chromium.org/18753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 19:38:26 +00:00
iposva@chromium.org
0d11b5885a Fix white space issues.
Review URL: http://codereview.chromium.org/18806

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:23:01 +00:00
iposva@chromium.org
ff3433d0fd - Preserve bootstrapper state across thread switches (fixes issue 143).
- Make sure stack guards are properly setup even when preemption is active.
- Fix missing v8::Locker and v8::Unlocker use in d8.cc.
- Threads forked in d8 do get their own context setup.

Review URL: http://codereview.chromium.org/18581

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:09:46 +00:00
lrn@chromium.org
01198feda3 A field might be incorrectly set, causing registers to be pushed and popped
instead of just cleared on backtrack - or, worse, the other way around!


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 15:26:44 +00:00
ager@chromium.org
db1896c253 Make sure that the prototype of the initial map is created in the
right context.

Review URL: http://codereview.chromium.org/18591

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 15:09:44 +00:00
lrn@chromium.org
2de5de495f Irregexp: Backtrack past look-aheads works correctly.
Allows backtracking to clear registers instead of pushing and popping
them to restore state.
Redo of 1135 with bug fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 14:38:17 +00:00
sgjesse@chromium.org
335a73aa4b Added a simple wrapping of the debugger JSON responses.
Added a 'dir' command to the command line debugger to display the details of an object including the handle number for the object and the objects that it references.

Added the ability to use #XXX# to a 'print' or 'dir' request. XXX is the handle number for the object.
Review URL: http://codereview.chromium.org/18589

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 14:03:03 +00:00
sgjesse@chromium.org
115d57a677 Added a lookup request to the debugger protocol to retreive an object from it's handle.
Added a test for testing handles when using both the 'evaluate' and the 'lookup' request.
Review URL: http://codereview.chromium.org/18752

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:44:37 +00:00
olehougaard
baac94254f Reintroduced a fix for an alignment issue on ARM. I had reverted it by mistake. This fixes the serialization test suite on ARM.
Review URL: http://codereview.chromium.org/18751

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:21:49 +00:00
ager@chromium.org
524e34b8f8 Fix issue 192 by propagating out exceptions from object literal
boilerplate creation.

Removed declaration of unused and unimplemented function.
Review URL: http://codereview.chromium.org/18749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:10:26 +00:00
erik.corry@gmail.com
c956219ef4 * Remember to check for end of string even where we
know the character class must match.
Thanks to Mads and Christian for finding this bug
Review URL: http://codereview.chromium.org/18750

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:04:49 +00:00