Commit Graph

2735 Commits

Author SHA1 Message Date
fschneider@chromium.org
7a3a043eb2 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
2009-12-04 14:30:27 +00:00
sgjesse@chromium.org
a5aedaea96 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
2009-12-04 12:17:02 +00:00
kmillikin@chromium.org
7266bd0b9a 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
2009-12-04 11:59:09 +00:00
sgjesse@chromium.org
f2ad9083ce 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
2009-12-04 11:50:27 +00:00
kmillikin@chromium.org
a1f26bee4b 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
2009-12-04 11:46:20 +00:00
sgjesse@chromium.org
eabf5c89a9 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
2009-12-04 10:22:41 +00:00
christian.plesner.hansen@gmail.com
cbce986ff0 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
2009-12-04 10:18:30 +00:00
sgjesse@chromium.org
96e70f6b93 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
2009-12-04 09:58:05 +00:00
sgjesse@chromium.org
f95746cbee 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
2009-12-04 07:43:40 +00:00
ager@chromium.org
2707fc2eb8 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
2009-12-03 11:34:45 +00:00
ager@chromium.org
f568fc6d13 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
2009-12-03 10:24:16 +00:00
christian.plesner.hansen@gmail.com
1d9eac1b7c 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
2009-12-03 10:16:37 +00:00
sgjesse@chromium.org
2cfb4941a1 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
2009-12-03 09:29:21 +00:00
sgjesse@chromium.org
14066c0e0e 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
2009-12-03 08:48:32 +00:00
mikhail.naganov@gmail.com
d84d47961a 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
2009-12-03 08:44:33 +00:00
sgjesse@chromium.org
4c26032c92 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
2009-12-03 08:32:04 +00:00
sgjesse@chromium.org
6437fc86cc 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
2009-12-03 08:23:10 +00:00
sgjesse@chromium.org
53fbd5932a 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
2009-12-03 07:56:21 +00:00
kbr@chromium.org
73ebe80bda 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
2009-12-02 19:26:16 +00:00
sgjesse@chromium.org
209035c996 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
2009-12-02 13:38:50 +00:00
sgjesse@chromium.org
9487ef7b9b 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
2009-12-02 12:58:10 +00:00
sgjesse@chromium.org
508e54d465 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
2009-12-01 15:52:02 +00:00
sgjesse@chromium.org
fc713930ed 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
2009-12-01 14:36:45 +00:00
erik.corry@gmail.com
a0e12a3124 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
2009-12-01 14:19:23 +00:00
erik.corry@gmail.com
f9e150b78b 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
2009-12-01 12:54:36 +00:00
sgjesse@chromium.org
64ecb69b4a 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
2009-12-01 11:16:21 +00:00
ager@chromium.org
a8db297d14 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
2009-12-01 10:25:29 +00:00
ager@chromium.org
0ee41eec90 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
2009-12-01 09:54:47 +00:00
sgjesse@chromium.org
dfc677a668 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
2009-12-01 09:37:28 +00:00
kbr@chromium.org
4af7bf510c 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
2009-11-30 22:21:16 +00:00
fschneider@chromium.org
5debbc3693 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
2009-11-30 15:09:49 +00:00
mikhail.naganov@gmail.com
dd38c22699 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
2009-11-30 14:56:20 +00:00
fschneider@chromium.org
c76856c292 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
2009-11-30 13:35:59 +00:00
ager@chromium.org
bb69a555f5 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
2009-11-30 11:00:45 +00:00
kasperl@chromium.org
402e356e82 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
2009-11-30 07:57:32 +00:00
sgjesse@chromium.org
6d163d9fd0 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
2009-11-27 14:10:48 +00:00
sgjesse@chromium.org
c75ff5e8b5 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
2009-11-27 08:19:25 +00:00
sgjesse@chromium.org
5764362d6f 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
2009-11-27 07:57:45 +00:00
fschneider@chromium.org
3a21aafa7c 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
2009-11-27 00:28:06 +00:00
fschneider@chromium.org
1c90793581 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
2009-11-26 21:13:20 +00:00
lrn@chromium.org
eded148caf 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
2009-11-26 10:28:32 +00:00
mikhail.naganov@gmail.com
f2f00d0d09 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
2009-11-26 10:17:03 +00:00
kbr@chromium.org
25c5637e34 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
2009-11-25 21:50:30 +00:00
kbr@chromium.org
c135f2de07 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
2009-11-25 20:29:11 +00:00
ager@chromium.org
7a6ebbdd6d 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
2009-11-25 16:46:56 +00:00
mikhail.naganov@gmail.com
2af151ee63 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
2009-11-25 16:39:18 +00:00
antonm@chromium.org
93d6199de0 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
2009-11-25 15:45:37 +00:00
erik.corry@gmail.com
c5052399e4 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
2009-11-25 13:27:15 +00:00
erik.corry@gmail.com
10e183d353 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
2009-11-25 12:55:33 +00:00
erik.corry@gmail.com
059b9bbc5e 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
2009-11-25 11:23:48 +00:00