platform/upstream/v8.git
14 years agoFix arm and x64 build.
kmillikin@chromium.org [Wed, 9 Dec 2009 15:34:57 +0000 (15:34 +0000)]
Fix arm and x64 build.

The ApiGetterEntryStub is not implemented on arm or x64, but the
platform-specific implementations need to change to match the change
to the platform-independent signatures.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix a crash caused by garbage collection during generation of a
kmillikin@chromium.org [Wed, 9 Dec 2009 14:54:34 +0000 (14:54 +0000)]
Fix a crash caused by garbage collection during generation of a
callback load (or keyed load) IC.

The problem was that the IC code calls a stub, which can allocate and
thus trigger a GC if the stub is not already generated.  Problem is
solved by adding the ability to "try" to call a stub, trying to
generate the stub code if necessary but signaling an allocation
failure if generating the code is not possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoExternal string table.
vitalyr@chromium.org [Wed, 9 Dec 2009 14:32:45 +0000 (14:32 +0000)]
External string table.

Instead of weak handles external strings use a separate table.  This
table uses 5 times less memory than weak handles.  Moreover, since we
don't have to follow the weak handle callback protocol we can collect
the strings faster and even on scavenge collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd Object.create from ECMAScript5. Supports value, writable, enumerable, get
erik.corry@gmail.com [Wed, 9 Dec 2009 13:56:58 +0000 (13:56 +0000)]
Add Object.create from ECMAScript5.  Supports value, writable, enumerable, get
and set.  Doesn't support configurable yet.  See
http://code.google.com/p/v8/issues/detail?id=460
Review URL: http://codereview.chromium.org/463040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoCreate literal boilerplate as part of cloning in the top-level compiler.
fschneider@chromium.org [Wed, 9 Dec 2009 13:06:08 +0000 (13:06 +0000)]
Create literal boilerplate as part of cloning in the top-level compiler.

When generating code for object and array literals we performed
the check if the a boilerplate already exists in generated code.

In the top-level compiler we now do this check in a new runtime
function. This makes the generated code more compact for top-level code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoCreate the framework for adding a thumb2 backend for ARM. See http://codereview...
erik.corry@gmail.com [Wed, 9 Dec 2009 12:56:42 +0000 (12:56 +0000)]
Create the framework for adding a thumb2 backend for ARM.  See codereview.chromium.org/464070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix for bug 512 from Subrato De, CodeAurora.
erik.corry@gmail.com [Wed, 9 Dec 2009 11:14:45 +0000 (11:14 +0000)]
Fix for bug 512 from Subrato De, CodeAurora.
Review URL: http://codereview.chromium.org/464016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPerform string add in generated code on X64 platform
sgjesse@chromium.org [Wed, 9 Dec 2009 09:35:41 +0000 (09:35 +0000)]
Perform string add in generated code on X64 platform

This is a port of the IA-32 version from r3400 (http://code.google.com/p/v8/source/detail?r=3400). In the X64 version the additional registers are used to avoid loading the instance type and arguments several times.
Review URL: http://codereview.chromium.org/460109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix subtle bug in Math.min and Math.max with non-Smi zero.
erik.corry@gmail.com [Tue, 8 Dec 2009 10:18:28 +0000 (10:18 +0000)]
Fix subtle bug in Math.min and Math.max with non-Smi zero.
See http://codereview.chromium.org/470001
From sra.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix for issue 545: don't reuse this VariableProxy.
lrn@chromium.org [Tue, 8 Dec 2009 09:43:51 +0000 (09:43 +0000)]
Fix for issue 545: don't reuse this VariableProxy.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdding ThisFunction expression to top-level compiler.
fschneider@chromium.org [Mon, 7 Dec 2009 15:10:39 +0000 (15:10 +0000)]
Adding ThisFunction expression to top-level compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoThe toplevel code generator assumed that declarations did not shadow
kmillikin@chromium.org [Mon, 7 Dec 2009 13:31:47 +0000 (13:31 +0000)]
The toplevel code generator assumed that declarations did not shadow
parameters.  This could case the initial value to be lost or worse, a
crash.

Fix by handling the case of a declaration shadowing both
stack-allocated parameters and those in the arguments object.

This is related to V8 issue 540.
http://code.google.com/p/v8/issues/detail?id=540

BUG=29565
Review URL: http://codereview.chromium.org/469006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPerformance improvement for Math.max and Math.min
erik.corry@gmail.com [Mon, 7 Dec 2009 08:38:20 +0000 (08:38 +0000)]
Performance improvement for Math.max and Math.min
Patch from sra.
http://codereview.chromium.org/470001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFixed operator precedence bug in heap stat recording.
christian.plesner.hansen@gmail.com [Fri, 4 Dec 2009 14:35:33 +0000 (14:35 +0000)]
Fixed operator precedence bug in heap stat recording.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRefactor code for generating assignments in the fast compiler.
fschneider@chromium.org [Fri, 4 Dec 2009 14:30:27 +0000 (14:30 +0000)]
Refactor code for generating assignments in the fast compiler.

1. Refactor the structure of VisitAssignment: The existing code is not ideal
to be extended with support for compound assignments.

2. Reuse common code for keyed property assigments: Now variables rewritten
to a property (.arguments access) are treated like normal keyed property
assignments. This allows us to remove some code duplication.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove passing of argc in r0 when calling builtins on ARM as it is not used
sgjesse@chromium.org [Fri, 4 Dec 2009 12:17:02 +0000 (12:17 +0000)]
Remove passing of argc in r0 when calling builtins on ARM as it is not used
Review URL: http://codereview.chromium.org/466031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix issue 540 by handling the case that a declaration is in the
kmillikin@chromium.org [Fri, 4 Dec 2009 11:59:09 +0000 (11:59 +0000)]
Fix issue 540 by handling the case that a declaration is in the
arguments object.

See http://code.google.com/p/v8/issues/detail?id=540
Review URL: http://codereview.chromium.org/460070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPrepare push to trunk. Now working on 2.0.4.
sgjesse@chromium.org [Fri, 4 Dec 2009 11:50:27 +0000 (11:50 +0000)]
Prepare push to trunk. Now working on 2.0.4.
Review URL: http://codereview.chromium.org/462034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd a test that was left off my last submit.
kmillikin@chromium.org [Fri, 4 Dec 2009 11:46:20 +0000 (11:46 +0000)]
Add a test that was left off my last submit.
Review URL: http://codereview.chromium.org/466003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd alignment check to object allocated in generated code for x64 and ARM
sgjesse@chromium.org [Fri, 4 Dec 2009 10:22:41 +0000 (10:22 +0000)]
Add alignment check to object allocated in generated code for x64 and ARM
Review URL: http://codereview.chromium.org/460068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChanged recording of heap stats on OOM to store data directly in local
christian.plesner.hansen@gmail.com [Fri, 4 Dec 2009 10:18:30 +0000 (10:18 +0000)]
Changed recording of heap stats on OOM to store data directly in local
variables rather than in a stack-allocated struct.  The struct field
values turned out not to be available in minidumps.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoString check for binary add on x64 and ARM
sgjesse@chromium.org [Fri, 4 Dec 2009 09:58:05 +0000 (09:58 +0000)]
String check for binary add on x64 and ARM

The checking for strings when performing binary add was missing on x64 and ARM. This is a prerequisite for adding string add in generated code for these two platforms.
Review URL: http://codereview.chromium.org/465028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoBetter handling of allocation alignment in generated code
sgjesse@chromium.org [Fri, 4 Dec 2009 07:43:40 +0000 (07:43 +0000)]
Better handling of allocation alignment in generated code

Calculate the aligned size of strings when allocating from generated code using kObjectAlignmentMask

Add native code assert to make sure allocation from generated code keeps alignment.
Review URL: http://codereview.chromium.org/462025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix Windows build.
ager@chromium.org [Thu, 3 Dec 2009 11:34:45 +0000 (11:34 +0000)]
Fix Windows build.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMove for-in cache validity check to generated code.
ager@chromium.org [Thu, 3 Dec 2009 10:24:16 +0000 (10:24 +0000)]
Move for-in cache validity check to generated code.
Review URL: http://codereview.chromium.org/464002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdded recording of heap and global handle stats in a stack-allocated
christian.plesner.hansen@gmail.com [Thu, 3 Dec 2009 10:16:37 +0000 (10:16 +0000)]
Added recording of heap and global handle stats in a stack-allocated
struct on fatal out of memory.  This should cause the information to
be included in minidumps so we can get a better idea of the state of
v8 on OOMs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMove function nan_value to POSIX platform file
sgjesse@chromium.org [Thu, 3 Dec 2009 09:29:21 +0000 (09:29 +0000)]
Move function nan_value to POSIX platform file

Strictly speaking NAN from math.h is not in a POSIX standard but in C99. However it seems that all our POSIX platforms have it.
Review URL: http://codereview.chromium.org/464015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoCheck return code from fwrite
sgjesse@chromium.org [Thu, 3 Dec 2009 08:48:32 +0000 (08:48 +0000)]
Check return code from fwrite

BUG=http://code.google.com/p/v8/issues/detail?id=453
TEST=none
Review URL: http://codereview.chromium.org/458016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoWhen executing 'profile' request, delegate to api function, not to internal one.
mikhail.naganov@gmail.com [Thu, 3 Dec 2009 08:44:33 +0000 (08:44 +0000)]
When executing 'profile' request, delegate to api function, not to internal one.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix compilation errors on some compilers
sgjesse@chromium.org [Thu, 3 Dec 2009 08:32:04 +0000 (08:32 +0000)]
Fix compilation errors on some compilers

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd missing function CpuFeaturesImpliedByPlatform to OpenBSD platform file
sgjesse@chromium.org [Thu, 3 Dec 2009 08:23:10 +0000 (08:23 +0000)]
Add missing function CpuFeaturesImpliedByPlatform to OpenBSD platform file
Review URL: http://codereview.chromium.org/465025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPerform string add in generated code on IA-32 platforms
sgjesse@chromium.org [Thu, 3 Dec 2009 07:56:21 +0000 (07:56 +0000)]
Perform string add in generated code on IA-32 platforms

This adds a code stub which can do most of what Heap::AllocateConsString can do. It bails out if the result cannot fit in new space or if the result is a short (flat) string and one argument is an ascii string and the other a two byte string. It also bails out if adding two one character strings as Heap::AllocateConsString has special handling of this utilizing the symbol table. The stub is used both for the binary add operation and for StringAdd calls from runtime JavaScript files. Extended the string add test to cover all sizes of flat result stings.
Review URL: http://codereview.chromium.org/442024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFixed register usage in 64-bit version of
kbr@chromium.org [Wed, 2 Dec 2009 19:26:16 +0000 (19:26 +0000)]
Fixed register usage in 64-bit version of
KeyedLoadIC::GenerateExternalArray which was causing it to go to the
slow case all the time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoInitial OpenBSD support
sgjesse@chromium.org [Wed, 2 Dec 2009 13:38:50 +0000 (13:38 +0000)]
Initial OpenBSD support

Patch by Peter Valchev <pvalchev@gmail.com>.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix adding short external ascii strings
sgjesse@chromium.org [Wed, 2 Dec 2009 12:58:10 +0000 (12:58 +0000)]
Fix adding short external ascii strings

BUG=http://code.google.com/p/v8/issues/detail?id=536
TEST=cctest/test-strings/ExternalShortStringAdd
Review URL: http://codereview.chromium.org/466001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix debug build
sgjesse@chromium.org [Tue, 1 Dec 2009 15:52:02 +0000 (15:52 +0000)]
Fix debug build

Missed out on reflecting changes to Script object layout in objects-debug.cc.

Also fixed http://codereview.chromium.org/450034/diff/2006/2010.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove the last context dependent reference from the Script object
sgjesse@chromium.org [Tue, 1 Dec 2009 14:36:45 +0000 (14:36 +0000)]
Remove the last context dependent reference from the Script object

For scripts originating from a call to eval the Script object used to hold a reference to the function from where the eval was called together with the code offset within that function of the eval call. This is used by the stack trace and is part of the debugger protocol. In order to avoid storing the function the script, the position within the script and the name of the function calling eval is stored instead. This avoids holding context dependent objects in the script object.

The calculation of the position of the eval in the script holding the eval is now done when the eval script is compiled as it is not possible to postpone this unless a reference is kept to the generated code for the function calling eval.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Regress528
Review URL: http://codereview.chromium.org/450034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix toLocaleString-related breakage on buildbot.
erik.corry@gmail.com [Tue, 1 Dec 2009 14:19:23 +0000 (14:19 +0000)]
Fix toLocaleString-related breakage on buildbot.
TBR=ager
Review URL: http://codereview.chromium.org/449055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSpeed up join on arrays.
erik.corry@gmail.com [Tue, 1 Dec 2009 12:54:36 +0000 (12:54 +0000)]
Speed up join on arrays.
Review URL: http://codereview.chromium.org/457021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix presubmit errors
sgjesse@chromium.org [Tue, 1 Dec 2009 11:16:21 +0000 (11:16 +0000)]
Fix presubmit errors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove some of the cache validity checks for for-in enumeration. We
ager@chromium.org [Tue, 1 Dec 2009 10:25:29 +0000 (10:25 +0000)]
Remove some of the cache validity checks for for-in enumeration.  We
can check for these cases before caching the property names instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix megamorphic load regression on ARM caused by the string
ager@chromium.org [Tue, 1 Dec 2009 09:54:47 +0000 (09:54 +0000)]
Fix megamorphic load regression on ARM caused by the string
length/hash change.
Review URL: http://codereview.chromium.org/454018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoUpdate test for issue 528
sgjesse@chromium.org [Tue, 1 Dec 2009 09:37:28 +0000 (09:37 +0000)]
Update test for issue 528

The check for the number og GC's required is now 1 or 2 instead of two to get rig of failures on ARM.

Updated the test to keep the code used by the test in the compilation cache by compiling it in another context. This makes the remaining issue with the eval cache more explicit.
Review URL: http://codereview.chromium.org/449051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoReduced workload in external array test and added it back in.
kbr@chromium.org [Mon, 30 Nov 2009 22:21:16 +0000 (22:21 +0000)]
Reduced workload in external array test and added it back in.
BUG=http://code.google.com/p/v8/issues/detail?id=534

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMove CPU-specific constants from debug.h into the platform-specific directories.
fschneider@chromium.org [Mon, 30 Nov 2009 15:09:49 +0000 (15:09 +0000)]
Move CPU-specific constants from debug.h into the platform-specific directories.

The constant for the return sequence length (JSReturnSequenceLength) was
defined in debug.h. Since this constant are also needed outside the debugger code
I moved them into assembler-xxx.h. Otherwise compiling with debuggersupport=off
would fail on ARM.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd pause / resume profiling commands to debugger protocol.
mikhail.naganov@gmail.com [Mon, 30 Nov 2009 14:56:20 +0000 (14:56 +0000)]
Add pause / resume profiling commands to debugger protocol.

This allows to profile "unresponsive" web pages in the same way
as it is possible to break into them with the debugger.

BUG=http://code.google.com/p/chromium/issues/detail?id=28689

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoIntroduce flag for using the fast compiler where possible.
fschneider@chromium.org [Mon, 30 Nov 2009 13:35:59 +0000 (13:35 +0000)]
Introduce flag for using the fast compiler where possible.

We use the fast compiler only for top-level code right now.
When always_fast_compiler is set to true, we compile with
the fast compiler whereever possible.

By default this flag is set to false.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove complex external array testing that takes too long.
ager@chromium.org [Mon, 30 Nov 2009 11:00:45 +0000 (11:00 +0000)]
Remove complex external array testing that takes too long.

We should put in a reduced version of this.

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

TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/450010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoClear the compilation cache just before starting to do mark-sweep
kasperl@chromium.org [Mon, 30 Nov 2009 07:57:32 +0000 (07:57 +0000)]
Clear the compilation cache just before starting to do mark-sweep
garbage collections when receiving idle notifications. This allows
us to get rid of source code strings and generated code in the
heap that would otherwise be kept around in idle V8 instances.
Review URL: http://codereview.chromium.org/450007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove usage of JSArray in Script object
sgjesse@chromium.org [Fri, 27 Nov 2009 14:10:48 +0000 (14:10 +0000)]
Remove usage of JSArray in Script object

Storing a JSArray in the Script object could cause an indirect reference from the compilation cache to a global object to be created. Now the line ends are only stored as a FixedArrya and when that is needed in JavaScript a JSArray copy is created. Changed some of the JavaScript code to cache the line ends in a local variable for better performance.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=test/test-api/Bug528
Review URL: http://codereview.chromium.org/434117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix lint errors
sgjesse@chromium.org [Fri, 27 Nov 2009 08:19:25 +0000 (08:19 +0000)]
Fix lint errors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd test to expose bug 528
sgjesse@chromium.org [Fri, 27 Nov 2009 07:57:45 +0000 (07:57 +0000)]
Add test to expose bug 528

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Bug528
Review URL: http://codereview.chromium.org/443021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdded fast compiler support for calling JS runtime functions.
fschneider@chromium.org [Fri, 27 Nov 2009 00:28:06 +0000 (00:28 +0000)]
Added fast compiler support for calling JS runtime functions.

Also added a simple test that invokes a JS runtime function
in top-level code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix bug in the fast compiler's object literal code
fschneider@chromium.org [Thu, 26 Nov 2009 21:13:20 +0000 (21:13 +0000)]
Fix bug in the fast compiler's object literal code

Fixes issue 526:

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

The object literals code in the fast compiler returned an incorrect result
when getter or setters are defined together with computed properties.

Added a regression test that captures the most reduced version of this
problem.

Also added a test for object literals with getters/setters and
prototype properties.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFast-codegen: Arguments object working on all platforms.
lrn@chromium.org [Thu, 26 Nov 2009 10:28:32 +0000 (10:28 +0000)]
Fast-codegen: Arguments object working on all platforms.
This time it's true.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoA cache of MD5 sums of source file contents is now maintained. Cpplint is only invoke...
mikhail.naganov@gmail.com [Thu, 26 Nov 2009 10:17:03 +0000 (10:17 +0000)]
A cache of MD5 sums of source file contents is now maintained. Cpplint is only invoked for new, changed, and files containing errors from the past lint check run.

As a result, repetitive presubmit checks now run in a blink of an eye, so we can include it as an obligatory pre-submit check to avoid frequent CB breakages on lint errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFixed lint error in last checkin.
kbr@chromium.org [Wed, 25 Nov 2009 21:50:30 +0000 (21:50 +0000)]
Fixed lint error in last checkin.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFixed incorrect instruction usage in KeyedLoadIC for byte and word
kbr@chromium.org [Wed, 25 Nov 2009 20:29:11 +0000 (20:29 +0000)]
Fixed incorrect instruction usage in KeyedLoadIC for byte and word
external array types. Added regression test based on real-world
failing code and verified that it would have caught this error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoDo not crash if a V8 extension fails to compile or throws an exception
ager@chromium.org [Wed, 25 Nov 2009 16:46:56 +0000 (16:46 +0000)]
Do not crash if a V8 extension fails to compile or throws an exception
when the code is run.

Instead, return an empty context handle so the failure to create a
context can be handled.

BUG=http://crbug.com/28486
Review URL: http://codereview.chromium.org/442005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoInclude getters and setters callbacks invocations in CPU profiler log.
mikhail.naganov@gmail.com [Wed, 25 Nov 2009 16:39:18 +0000 (16:39 +0000)]
Include getters and setters callbacks invocations in CPU profiler log.

Logging getters and setters from DOM API is extremely useful for web
developers as setting (and getting!) several properties can cause
page relayouts which take significant time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoWhen processing global vars initialization account for the case of splitted
antonm@chromium.org [Wed, 25 Nov 2009 15:45:37 +0000 (15:45 +0000)]
When processing global vars initialization account for the case of splitted
global object (using hidden prototypes):

1) setters might be not on the global object itself, but on its prototypes;
2) if property on one of prototypes is readonly, we could shadow it.
Review URL: http://codereview.chromium.org/434035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix 64 bit build. TBR=ager.
erik.corry@gmail.com [Wed, 25 Nov 2009 13:27:15 +0000 (13:27 +0000)]
Fix 64 bit build.  TBR=ager.
Review URL: http://codereview.chromium.org/442003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMake heap serialization nondestructive.
erik.corry@gmail.com [Wed, 25 Nov 2009 12:55:33 +0000 (12:55 +0000)]
Make heap serialization nondestructive.
Review URL: http://codereview.chromium.org/441017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoUpdate with a hopefully complete list of macros
erik.corry@gmail.com [Wed, 25 Nov 2009 11:23:48 +0000 (11:23 +0000)]
Update with a hopefully complete list of macros
used by gcc to indicate ARM architectures.
Review URL: http://codereview.chromium.org/440017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoXcode project: add fast-codegen sources.
mikhail.naganov@gmail.com [Wed, 25 Nov 2009 10:45:31 +0000 (10:45 +0000)]
Xcode project: add fast-codegen sources.

TBR=iposva@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChange 'debugger-auto-break' flag status.
mikhail.naganov@gmail.com [Wed, 25 Nov 2009 10:11:34 +0000 (10:11 +0000)]
Change 'debugger-auto-break' flag status.

I think we can promote this flag to stable status and enable it by default.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix bug 516 by recognizing yet another gcc macro that
erik.corry@gmail.com [Wed, 25 Nov 2009 09:55:49 +0000 (09:55 +0000)]
Fix bug 516 by recognizing yet another gcc macro that
indicates ARMv6.
Review URL: http://codereview.chromium.org/437056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFast-compiler: Add stack limit checks to back edges of while, do-while and for.
lrn@chromium.org [Wed, 25 Nov 2009 09:05:30 +0000 (09:05 +0000)]
Fast-compiler: Add stack limit checks to back edges of while, do-while and for.
A few other tweaks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdded an ASSERT to code from r3350
sgjesse@chromium.org [Wed, 25 Nov 2009 08:14:23 +0000 (08:14 +0000)]
Added an ASSERT to code from r3350
Review URL: http://codereview.chromium.org/441014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix compilation error in r3352
sgjesse@chromium.org [Tue, 24 Nov 2009 15:16:02 +0000 (15:16 +0000)]
Fix compilation error in r3352

Compilation error caught on Windows. Strangely enough gcc did not complaint here.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix compilation error in r3350
sgjesse@chromium.org [Tue, 24 Nov 2009 14:45:27 +0000 (14:45 +0000)]
Fix compilation error in r3350

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove the different length string types
sgjesse@chromium.org [Tue, 24 Nov 2009 14:10:06 +0000 (14:10 +0000)]
Remove the different length string types

The different length string types was used to encode the string length and the hash in one field. This is now split into two fields one for length and one for hash. The hash field still encodes the array index of the string if it has one. If an array index is encoded in the hash field the string length is added to the top bits of the hash field to avoid a hash value of zero.

On 32-bit this causes an additional 4 bytes to be used for all string objects. On 64-bit this will be half on average dur to pointer alignment.
Review URL: http://codereview.chromium.org/436001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPrepare push to trunk. Now working on version 2.0.3.
ager@chromium.org [Tue, 24 Nov 2009 13:30:15 +0000 (13:30 +0000)]
Prepare push to trunk.  Now working on version 2.0.3.
Review URL: http://codereview.chromium.org/435018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRe-enable all declarations in fast top-level compiler.
ager@chromium.org [Tue, 24 Nov 2009 12:23:29 +0000 (12:23 +0000)]
Re-enable all declarations in fast top-level compiler.

Disable fast top-level compiler for now because of issues 525 and 526.

Add regression test for issue 525.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoLand gyp change to remove -Os from C++ flags if it exists on Linux.
ager@chromium.org [Tue, 24 Nov 2009 11:08:06 +0000 (11:08 +0000)]
Land gyp change to remove -Os from C++ flags if it exists on Linux.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoStore API callback entry address prior to entering a callback.
mikhail.naganov@gmail.com [Mon, 23 Nov 2009 14:43:00 +0000 (14:43 +0000)]
Store API callback entry address prior to entering a callback.

Callback entry address is stored in VMState and is later retrieved by
profiler stack sampler. This makes possible relating API entry to JS
stack, and this is simpler than trying to unwind native stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoReimplement logging of API callbacks entry points in an easier way.
mikhail.naganov@gmail.com [Mon, 23 Nov 2009 09:19:24 +0000 (09:19 +0000)]
Reimplement logging of API callbacks entry points in an easier way.

Now they are logging during "LogCompiledFunctions" cycle. API functions
are detected by examining SFI's "function_data" field.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChange the signature for StrNDup to match the implementation. This
ager@chromium.org [Fri, 20 Nov 2009 13:08:44 +0000 (13:08 +0000)]
Change the signature for StrNDup to match the implementation.  This
mismatch causes problems if attempting to build d8 with readline
support.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix issue 520: wrap Logger calls into LOG macro
mikhail.naganov@gmail.com [Fri, 20 Nov 2009 12:38:59 +0000 (12:38 +0000)]
Fix issue 520: wrap Logger calls into LOG macro

BUG=520

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd logging of callbacks in prof-lazy mode.
mikhail.naganov@gmail.com [Fri, 20 Nov 2009 12:15:46 +0000 (12:15 +0000)]
Add logging of callbacks in prof-lazy mode.

This is needed to show calls to DOM in CPU profiles. I can think
of a better approach like adding specific functions into V8 API
for explicitly providing callback names and modifying bindings codegen
appropriately. My plan is as follows:
 - submit this CL;
 - implement anything I need to process log data and display DOM
   calls in profiles;
 - think again about adding specific functions and modifying bindings
   codegen.

BUG=http://code.google.com/p/chromium/issues/detail?id=27613

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPrepare push to trunk. Now working on version 2.0.2.
ager@chromium.org [Fri, 20 Nov 2009 12:03:44 +0000 (12:03 +0000)]
Prepare push to trunk.  Now working on version 2.0.2.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoDisable the fast top-level compiler for non-global declarations.
ager@chromium.org [Fri, 20 Nov 2009 11:45:18 +0000 (11:45 +0000)]
Disable the fast top-level compiler for non-global declarations.
Reintroduce the bailout that was put in in revision 3224.

It causes interactive ui test failures in Chromium.

TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/421002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSome optimizations for packer.js.
erik.corry@gmail.com [Fri, 20 Nov 2009 10:11:45 +0000 (10:11 +0000)]
Some optimizations for packer.js.
Review URL: http://codereview.chromium.org/409007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoImplement IS_OBJECT and IS_FUNCTION as inlined runtime functions.
fschneider@chromium.org [Thu, 19 Nov 2009 07:41:32 +0000 (07:41 +0000)]
Implement IS_OBJECT and IS_FUNCTION as inlined runtime functions.

Summary:
This change fixes a performance regression introduced by the special
handling of regular expressions in typeof expressions.
As a result we regain ~8% speedup on 3d-raytrace and ~13% on boyer
(vs bleeding edge)

Description:
The macros IS_OBJECT and IS_FUNCTION are frequently used in the
JS runtime functions.
By introducing new inlined runtime functions %_IsFunction and %_IsObject
we avoid invoking the more expensive %_ClassOf function plus comparing
its result to a string.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix crash in string replace with regexp. If the suffix of the subject
ager@chromium.org [Wed, 18 Nov 2009 18:48:04 +0000 (18:48 +0000)]
Fix crash in string replace with regexp.  If the suffix of the subject
string is larger than 2047 chars we will encode the slice as two Smis
instead of one.  The calculation of the max size of the string builder
did not take this into account.

BUG=http://code.google.com/p/v8/issues/detail?id=515
Review URL: http://codereview.chromium.org/402056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPrepare push of version 2.0.0 to trunk. Now working on version 2.0.1.
ager@chromium.org [Wed, 18 Nov 2009 12:24:46 +0000 (12:24 +0000)]
Prepare push of version 2.0.0 to trunk.  Now working on version 2.0.1.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoCorrect dumb assert.
erik.corry@gmail.com [Wed, 18 Nov 2009 12:14:21 +0000 (12:14 +0000)]
Correct dumb assert.
Review URL: http://codereview.chromium.org/402048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFixed bug in pixel array inline cache on x64. The value was not
ager@chromium.org [Wed, 18 Nov 2009 11:36:29 +0000 (11:36 +0000)]
Fixed bug in pixel array inline cache on x64.  The value was not
zero-extended as it should be.  Therefore, the index into the pixel
array could influence the value on reads.

BUG=http://code.google.com/p/chromium/issues/detail?id=26337
Review URL: http://codereview.chromium.org/399067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAccelerate charCodeAt on ARM.
erik.corry@gmail.com [Wed, 18 Nov 2009 10:20:24 +0000 (10:20 +0000)]
Accelerate charCodeAt on ARM.
Review URL: http://codereview.chromium.org/402012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd DebugMessageDispatchHandler
sgjesse@chromium.org [Wed, 18 Nov 2009 08:59:28 +0000 (08:59 +0000)]
Add DebugMessageDispatchHandler

A callback on the debugger thread when a message is received. Allows the
embedding application to wake up the main thread in order to handle the
message. Useful when the embedding application is idle and sitting in a
select() call.

Patch by Ryan Dahl <coldredlemur@gmail.com>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMake sure to retry SetHiddenPropertiesObject if it
kasperl@chromium.org [Wed, 18 Nov 2009 00:09:28 +0000 (00:09 +0000)]
Make sure to retry SetHiddenPropertiesObject if it
returns a failure.
Review URL: http://codereview.chromium.org/402034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSorry, this should have gone to http://codereview.chromium.org/391014
lrn@chromium.org [Tue, 17 Nov 2009 13:54:05 +0000 (13:54 +0000)]
Sorry, this should have gone to codereview.chromium.org/391014

I added some tests and swapped the lhs and rhs of the && operator in v8natives.js as requested.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRestore invariant (next of first deallocated must point to the head) before calling...
antonm@chromium.org [Tue, 17 Nov 2009 13:50:07 +0000 (13:50 +0000)]
Restore invariant (next of first deallocated must point to the head) before calling into weak
callbacks.

Otherwise if callback allocates a new handle, it could orphan some global handles (with disastorous
consequences if those global handles are cached).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSpeed up charCodeAt on very large cons strings, by insisting on
erik.corry@gmail.com [Tue, 17 Nov 2009 10:28:04 +0000 (10:28 +0000)]
Speed up charCodeAt on very large cons strings, by insisting on
flattening the strings and not trying too hard to traverse a big
cons tree from generated code.
Review URL: http://codereview.chromium.org/402008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd missing case for shr in IA-32 disassembler
sgjesse@chromium.org [Tue, 17 Nov 2009 10:24:27 +0000 (10:24 +0000)]
Add missing case for shr in IA-32 disassembler
Review URL: http://codereview.chromium.org/397024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChanges to Intel shift functions
sgjesse@chromium.org [Tue, 17 Nov 2009 08:35:43 +0000 (08:35 +0000)]
Changes to Intel shift functions

Change name of shifts picking the shift count from cl to sal_cl, shl_cl and shr_cl.

Add special encoding of shift by one for shr which was missing it.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRe-enable using push instructions for syncing the virtual frame.
fschneider@chromium.org [Mon, 16 Nov 2009 23:11:19 +0000 (23:11 +0000)]
Re-enable using push instructions for syncing the virtual frame.

This change fixes the problem with the original version of this approach
(r3032) that may lead to a corrupted stack if we would invoke spilling during
syncing a large SMI constant (unsafe SMIs) in the virtual frame.

The new code for storing unsafe SMI constants does not use an extra temporary
register. This prevents the compiler from ever having to spill during a
virutal frame sync operation.

For storing a large SMI constant we previously generated:

  mov ecx, (large_smi & 0x0000ffff)
  xor ecx, (large_smi & 0xffff0000)
  push ecx

we now generate:

  push (large_smi & 0x0000ffff)
  or   [esp], (large_smi & 0xffff0000)

Not using a temporary register avoids spilling within an nvocation
of VirtualFrame::SyncRange.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoStep next should respect do/while condition block.
yurys@chromium.org [Mon, 16 Nov 2009 21:59:31 +0000 (21:59 +0000)]
Step next should respect do/while condition block.

Condition block of do/while statements is a valid break location so it should have its own position. The block is represented by a regular Expression node so we cannot store the position in it, instead the position is stored in a separate field in DoWhileStatement AST node.

BUG=514
Review URL: http://codereview.chromium.org/385136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix some presubmit errors.
yurys@chromium.org [Mon, 16 Nov 2009 16:58:09 +0000 (16:58 +0000)]
Fix some presubmit errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSkip debugger frames when looking for calling context.
yurys@chromium.org [Mon, 16 Nov 2009 14:41:55 +0000 (14:41 +0000)]
Skip debugger frames when looking for calling context.

BUG=509

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00