Commit Graph

1063 Commits

Author SHA1 Message Date
ricow@chromium.org
e174a64a6d Updated README in es5conform so the description says to get revision
62998 which corrects some errors in the tests that will otherwise make us 
(wrongly) fail.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 13:40:13 +00:00
vitalyr@chromium.org
bd06358b93 Optimized calling of C++ builtins (and HandleApiCall
in particular).

  * Called function is passed on the stack instead of
    using a static variable.

  * Builtins that don't need the called function don't
    get it.

  * Made is_construct statically known to HandleApiCall
    by setting custom construct stub for API functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:25:24 +00:00
erik.corry@gmail.com
bc334df1a8 * Improve the interface to the memory-reservation functionality.
* Add a test case that generates a serialization of a single flat string.
Review URL: http://codereview.chromium.org/542073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 14:46:31 +00:00
ager@chromium.org
11bab3a5c4 Fix the tests that change because of change to toISOString format.
Review URL: http://codereview.chromium.org/543057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 09:05:52 +00:00
ricow@chromium.org
19e49e1740 Enabled es5conform tests for new array methods and corrected errors that was discovered by enabling these.
Added new es5 methods:
GetOwnPropertyDescriptor
GetOwnProperty
FromPropertyDescriptor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 12:10:57 +00:00
erik.corry@gmail.com
1aeb239e60 Fix float conversion warning from some gcc versions.
Review URL: http://codereview.chromium.org/541026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 15:36:43 +00:00
erik.corry@gmail.com
612d9b82f0 Add some interfaces to the GC that allow us to reserve space. This is needed
for partial snapshots.  After reserving space we can be sure that allocations
will happen linearly (no GCs and no free-list allocation).  This change also
contains the start of the partial snapshot support, which, however is not yet
completed or tested.
Review URL: http://codereview.chromium.org/545026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 15:16:23 +00:00
sgjesse@chromium.org
658ca2f174 Add missing instructions to the IA-32 disasembler
Added newly added instructions to test-disasem-ia32.cc and implemented the missi
ng ones in the disasembler.

Added some asserts to 8-bit instructions which only work with eax, ebx, ecx and
edx (al, bl, cl and dl).

Removed the loope instruction.
Review URL: http://codereview.chromium.org/548002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 15:19:53 +00:00
christian.plesner.hansen@gmail.com
41e1d6a6a5 Added ScriptData::HasError.
Review URL: http://codereview.chromium.org/542010


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 12:13:24 +00:00
erik.corry@gmail.com
eb6b3f601a Speed up compares with characters ie single-character strings.
Make use of it when we know that something can't be a NaN.
Review URL: http://codereview.chromium.org/524059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 09:54:11 +00:00
kasperl@chromium.org
8dd3666741 Make sure to use the CHECK_PARSE_ERROR macro (and thereby
the static CheckParse function) even in release builds.

TBR=lrn@chromium.org 
Review URL: http://codereview.chromium.org/518079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 06:40:09 +00:00
lrn@chromium.org
46504c1557 Attempt to make \b\w+ faster. Slight performance increase on, e.g., string unpacking.
Review URL: http://codereview.chromium.org/507051


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 19:01:23 +00:00
ricow@chromium.org
33079fb851 Added ES5 15.2.3.2 Object.getPrototypeOf.
Review URL: http://codereview.chromium.org/523124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 10:01:24 +00:00
kasperl@chromium.org
1fdbaa1d10 Improve performance of Array.prototype.join and String.prototype.substring
by tweaking the JavaScript implementation of these functions.
Review URL: http://codereview.chromium.org/519061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 14:40:21 +00:00
kasperl@chromium.org
15fe7a8ad6 Make the ResolvePossiblyDirectEval faster by avoiding the
stack traversal code.
Review URL: http://codereview.chromium.org/523051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 09:38:02 +00:00
fschneider@chromium.org
637a21952f Added general pre- and postfix count operations to top-level compiler.
Until now we only supported postfix operations on global variables.
This change add generic count operations to the top-level compiler.

I tried to re-use code from the code generator used for assignment expressions
where possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 13:56:31 +00:00
kasperl@chromium.org
6ca5876419 Add fast case stub for BIT_NOT.
Review URL: http://codereview.chromium.org/503079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 10:16:27 +00:00
ager@chromium.org
af6971d883 Check for undefined in the binary operation stub when convertion to
int32 for bitops.  undefined converts to zero in ToInt32 conversions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 09:48:55 +00:00
erik.corry@gmail.com
73fcafd650 Bring back the fisttp instruction on machines with SSE3, but check the
input so we don't have to check the exception flags afterwards.
Review URL: http://codereview.chromium.org/509001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 08:32:20 +00:00
sgjesse@chromium.org
44b7c59eb5 Extend the maximum size map space
On 32-bit the maps are now aligned on a 32-byte boundary in order to encode more maps during compacting GC. The actual size of a map on 32-bit is 28 bytes making this change waste 4 bytes per map.

On 64-bit the encoding for compacting GC is now using more than 32-bits and the maps here are still pointer size aligned. The actual size of a map on 64-bit is 48 bytes and this change does not intruduce any waste.

My choice of 16 bits for kMapPageIndexBits for 64-bit should give the same maximum number of pages (8K) for map space. As maps on 64-bit are larger than on 32-bit the total number of maps on 64-bit will be smaller than on 32-bit. We could consider raising this to 17 or 18.

I moved the kPageSizeBits to globals.h as the calculation of the encoding really depended on this.

There are still an #ifdef/#endif in objects.h and this constant could be moved to globaks.h as well, but I kept it together with the related constants.

All the tests run in debug mode with additional options --gc-global --always-compact as well (except for a few tests on which also fails before this change when run with --gc-global --always-compact).

BUG=http://code.google.com/p/v8/issues/detail?id=524
BUG=http://crbug.com/29428
TEST=test/mjsunit/regress/regress-524.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 08:53:18 +00:00
yurys@chromium.org
bb0431b097 Fix presubmit error: remove whitespace
TBR=sgjesse
Review URL: http://codereview.chromium.org/504012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-15 09:34:00 +00:00
yurys@chromium.org
e88df5b792 Ignore debug break events when bootstrapper is active. Collecting debug data when the context is not yet setup may lead to subtle errors like in the following Chromium bug: http://crbug.com/28933
Review URL: http://codereview.chromium.org/497006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-15 09:17:15 +00:00
lrn@chromium.org
9ff5f9daed Fast-codegen: Implementing try/finally on top of nesting context.
Review URL: http://codereview.chromium.org/492002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 11:09:25 +00:00
iposva@chromium.org
fe952d7237 - Ensure the stack trace limit is not negative.
- Enable fuzzing of the CollectStackTrace runtime call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 18:33:34 +00:00
antonm@chromium.org
e32fdc0263 Use uint64_t to keep 64 MacOS happy.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 17:46:45 +00:00
vitalyr@chromium.org
41eb2f22d0 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
2009-12-09 14:32:45 +00:00
erik.corry@gmail.com
67f6ea675f 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
2009-12-09 13:56:58 +00:00
erik.corry@gmail.com
db87b6011b 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
2009-12-08 10:18:28 +00:00
lrn@chromium.org
5bbb1d7bd6 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
2009-12-08 09:43:51 +00:00
fschneider@chromium.org
2c9b2ab78a 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
2009-12-07 15:10:39 +00:00
kmillikin@chromium.org
0bf2822266 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
2009-12-07 13:31:47 +00:00
erik.corry@gmail.com
d4787a1855 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
2009-12-07 08:38:20 +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
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
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
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
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
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
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
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
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
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
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
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
sgjesse@chromium.org
8e296a79ef 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
2009-11-24 15:16:02 +00:00
sgjesse@chromium.org
eb4d261e24 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
2009-11-24 14:10:06 +00:00
ager@chromium.org
6ce4b10608 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
2009-11-24 12:23:29 +00:00
mikhail.naganov@gmail.com
9d440fdd36 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
2009-11-23 14:43:00 +00:00
mikhail.naganov@gmail.com
c2f12a7293 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
2009-11-23 09:19:24 +00:00
mikhail.naganov@gmail.com
a9d7c378d8 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
2009-11-20 12:15:46 +00:00
ager@chromium.org
3cf9ce4736 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
2009-11-18 18:48:04 +00:00
ager@chromium.org
ce20b5b461 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
2009-11-18 11:36:29 +00:00
erik.corry@gmail.com
701c00f8b4 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
2009-11-18 10:20:24 +00:00
sgjesse@chromium.org
d55d3ce89a 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
2009-11-18 08:59:28 +00:00
lrn@chromium.org
1bc9a21e9a Sorry, this should have gone to http://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
2009-11-17 13:54:05 +00:00
antonm@chromium.org
9a545949a4 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
2009-11-17 13:50:07 +00:00
sgjesse@chromium.org
63925e5013 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
2009-11-17 10:24:27 +00:00
sgjesse@chromium.org
459e4c6b0c 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
2009-11-17 08:35:43 +00:00
yurys@chromium.org
9bafc32932 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
2009-11-16 21:59:31 +00:00
yurys@chromium.org
b6ce7ce8a3 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
2009-11-16 16:58:09 +00:00
yurys@chromium.org
0a384a708d 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
2009-11-16 14:41:55 +00:00
erik.corry@gmail.com
cc3896dfac Fix bug 503: undefined <= undefined should return false on ARM.
Review URL: http://codereview.chromium.org/399001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 14:12:27 +00:00
erik.corry@gmail.com
48d8bbecd5 Fix bug 499 by splitting up long-running test to minimise the amount
of code that can't be tested on slow targets.
Review URL: http://codereview.chromium.org/385133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 13:06:27 +00:00
erik.corry@gmail.com
64941f1cf9 * Remove old snapshot implementation
Review URL: http://codereview.chromium.org/394007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 12:08:40 +00:00
yurys@chromium.org
5f3bdbe5a6 Remove trailing whitespace.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/384121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 15:05:50 +00:00
yurys@chromium.org
b67d8f125a Test that pause can be set in script and won't lead to crash when execution is resumed.
The test currently fails on v8 trunk if the new compiler is used. The issue seems to be fixed on bleeding_edge so there is no changes to src, just test.

Cromium bug: http://crbug.com/26686
Review URL: http://codereview.chromium.org/384120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 14:04:08 +00:00
fschneider@chromium.org
2e3e770ab9 Add a regression test that exposes a stack corruption problem.
See http://code.google.com/p/chromium/issues/detail?id=27227

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 13:58:48 +00:00
erik.corry@gmail.com
df4f52347b Allow a platform to indicate that some CPU features are always
available.  We use this to ensure that snapshots on MacOSX can
use SSE2 instructions.  Also clean up and assertify the
handling of things we can't do when we are generating a
snapshot.  Fix a bug in the new serialization tests where
they activated Snapshot::enable() too late after code had been
generated that assumed no snapshots.
Review URL: http://codereview.chromium.org/391051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 12:32:57 +00:00
yurys@chromium.org
cc0ce24331 Make accessors for hidden properties object not touch interceptors.
Interceptors cannot provide a meaningful result for hidden_symbol anyway and some of them crash on empty property name.


Related Chromium issue: http://code.google.com/p/chromium/issues/detail?id=27385

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 16:34:52 +00:00
christian.plesner.hansen@gmail.com
3773f96e26 Updated sputnik test expectations to match changes in tests.
Review URL: http://codereview.chromium.org/385068


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 13:01:03 +00:00
ager@chromium.org
f0e8525083 Remove passing test from ARM test expectations.
Review URL: http://codereview.chromium.org/386019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 11:31:46 +00:00
ager@chromium.org
6edd72849a Change expectations for LargeObjectSpace test on ARM. It should pass,
and if it doesn't we need to figure out why.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 10:23:05 +00:00
christian.plesner.hansen@gmail.com
5d4d5944dd Remove special-case for arguments.toString to match ES5
Patch by Jan de Mooij <jandemooij@gmail.com>
Review: http://codereview.chromium.org/273073

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 11:28:37 +00:00
sgjesse@chromium.org
3445dfe827 Split long running test
Split a long running test into two parts. The second part still takes most of the time and is skipped on ARM in debug mode.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 10:28:20 +00:00
lrn@chromium.org
d53f05e3e2 Fix warnings on Win64.
Set warning level to /W3 and change implicit conversions from size_t
to int. Most "fixes" are simply manifesting the implicit casts or using
a special strlen replacement that returns int.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:50:06 +00:00
ager@chromium.org
2252cc1bc9 Fix inline constructor code bailout.
Remove variable that is currently unused.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:00:09 +00:00
yurys@chromium.org
0c6dc2c5cb Remove trailing whitespace in test-debug.cc to make flexo happy.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/388005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 17:39:54 +00:00
yurys@chromium.org
cd9660f77c All hidden properties of an object are stored in a value of a regular property with empty name. This property may confuse user if returned among regular properties. It should not be exposed directly by ObjectMirror. Should we want an access to these properties from debugger we need to implement an explicit method for that.
Current patch filters the hidden_symbol from property names returned to ObjectMirror.

See http://crbug.com/26491

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 16:13:21 +00:00
sgjesse@chromium.org
0b0d4efdb4 Test mjsunit/string-indexof times out on ARM simulator
Removal of string slices made this test time out on the ARM simulator. Temporaly mark this as pass or timeout.

BUG=http://code.google.com/p/v8/issues/detail?id=500
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/390002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 15:50:23 +00:00
sgjesse@chromium.org
91cc4c7ebb Modify test using string slices
With slices string string type removed generating a large amount of sub-strings takes more time. Change a test to avoid timeout in debug mode.
Review URL: http://codereview.chromium.org/385006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 14:41:53 +00:00
sgjesse@chromium.org
851b9b2f73 Remove sliced string string type
As a first step to reduce the complexity of the string hierachy the sliced string type is removed. Whenever a sub-string is created it is allocated as a fresh flat string.
Review URL: http://codereview.chromium.org/385004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 13:23:05 +00:00
christian.plesner.hansen@gmail.com
7d47dde4cb Marked cyrillic as expected to fail.
Review URL: http://codereview.chromium.org/388002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 12:19:36 +00:00
christian.plesner.hansen@gmail.com
db357420ed Fixed breakage of test running when sputniktests not checked out.
Review URL: http://codereview.chromium.org/381002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 10:23:50 +00:00
erik.corry@gmail.com
b068a9f755 * Fix regexp benchmark regression where we were doing work to
make standard regexps like \s and . case independent.
* Make use of the fact that the subject string is ASCII only
when making character classes case independent.
* Avoid spending time making large ideogram or punctuation
ranges case independent when there is no case mapping anyway.
Review URL: http://codereview.chromium.org/378024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 10:01:23 +00:00
christian.plesner.hansen@gmail.com
0ca9beb316 Added test runner for sputnik tests.
Review URL: http://codereview.chromium.org/372053


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 09:31:57 +00:00
erik.corry@gmail.com
6a3921fc0e Keep natives source code in external strings instead of putting
it in regular flat strings that are part of the snapshot.
After this change we don't need libraries-empty.cc any more.  In
this change libraries-empty.cc is just a the same as libraries.cc
and the scons build builds it but does not use it.  We can move
in stages to a situation where it is not generated at all for all
the build systems that we have.
Review URL: http://codereview.chromium.org/360050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 13:48:33 +00:00
christian.plesner.hansen@gmail.com
321bed24f6 Fixed problem where popping a handle scope after calling an accessor
would clobber the register holding the result.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 11:35:47 +00:00
erik.corry@gmail.com
57c919e414 Fix bug 486, Cyrillic character ranges in case independent regexps.
http://code.google.com/p/v8/issues/detail?id=486
Review URL: http://codereview.chromium.org/361033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 11:15:20 +00:00
kmillikin@chromium.org
debb5f8b48 Change the special handling of typeof comparisons to strings for
regular expressions to be consistent with typeof in other contexts.
Typeof regular expressions should now be 'function' in all contexts.

In the JS natives, IS_FUNCTION, IS_OBJECT, and IS_REGEXP return the
same answers as before.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 16:08:48 +00:00
sgjesse@chromium.org
41d6cae46d Fix issue 493: Infinite loop when debug break is set when entering function.apply.
In the generated code for function.apply there was a loop checking the stack limit for interruption. This loop would call into the runtime system to handle interuption and keep running until there was no interruption. However if the interuption was debug break the runtime system would never clear the interruption as debug break is prevented in builtins are prevented and the assumption here was that returning with the debug break flag set would move execution forward.

Renamed initial_jslimit and initial_climit to real_jslimit and real_climit. Renamed a few external references related to the stack limit as well.

Exposed the real stack limit to generated code to make the stack check when entering function.apply use the real stack limit and not the stack limit which is changed to signal interruption.

Added the real stack limit to the roots array.

BUG=http://code.google.com/p/v8/issues/detail?id=493
TEST=cctest/test-debug/DebugBreakFunctionApply
Review URL: http://codereview.chromium.org/345048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:59:40 +00:00
ager@chromium.org
b5a19c1036 Rework the way we handle the fact that the ARM simulator uses a
separate JS stack.

In exception handling, we need to be able to compare addresses into
the JavaScript portion of the stack with the address of a C++ handler
on the stack.  Since the stacks are separate on the simulator, we need
a JavaScript stack address corresponding to a C++ try catch handler in
order to perform valid address comparisons.

On the simulator, we now link the C++ try catch handlers indirectly
through the JS stack and use the JS stack indirection address for
comparisons.

      JS                    C++
                           
                           handler
 [C++ address]   <------    next_
                \
                 \
                  \---->   handler
 [C++ address]   <------    next_


On actual hardware the C++ try catch handlers continue to be directly
linked.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:27:21 +00:00
ager@chromium.org
f39fbb206e Fix case where we treat an unaliased call to eval as an aliased call
to eval.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 11:19:37 +00:00
lrn@chromium.org
273e860cc1 Changed keyword token recognition to be done inline in the identifier scanner.
Review URL: http://codereview.chromium.org/360048


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 10:11:38 +00:00
erik.corry@gmail.com
f36c32288e Sort tests to increase predictability of mozilla test runs
in the face of suspected python bugs.  Also remove some
unused code.
Review URL: http://codereview.chromium.org/365001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 16:55:24 +00:00
sgjesse@chromium.org
77a71c90c7 Fix issue 491: constantpool dump violates ARM debugger assertion for return point
The generation of the return sequence is now protected from having the constant pool emitted inside of it in both compilers.

BUG=http://code.google.com/p/v8/issues/detail?id=491
TEST=test/mjsunit/regress/regress-491.js
Review URL: http://codereview.chromium.org/362003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 14:45:50 +00:00
kmillikin@chromium.org
34dee0319c Remove the typeof state threaded through the code generator. It was
used to signal that an expression was the immediate subexpression of
typeof, or (?) in the arm of a conditional expression itself in the
typeof state.

It was inconsistently consulted.  It was not used for property loads,
but only for slot loads.  This means that we matched the Webkit JSC
(not Spidermonkey) behavior for:

typeof(true ? x : y)  // throws ReferenceError

and we matched the SpiderMonkey behavior (not JSC) for:

with ({}) { typeof(true ? x : y) }  // ==> "undefined"

Now we are expected to match the JSC behavior in all cases.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 13:56:41 +00:00
sgjesse@chromium.org
54ec6c031a Fix xssue 492: ARM debug crash: mozilla/ecma/FunctionObjects/15.3.1.1-3
When the number of parameters times 4 (kPointerSize) to a function cannot be encoded in 12 bits the return sequence gets one more instruction. Changed the assertion to check for this case.

BUG=http://code.google.com/p/v8/issues/detail?id=492
TEST=test/mjsunit/regress/regress-492.js
Review URL: http://codereview.chromium.org/354028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 10:04:22 +00:00
christian.plesner.hansen@gmail.com
ee7bab33a8 Hate. Hate. Hate.
Review URL: http://codereview.chromium.org/360005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 09:19:30 +00:00
christian.plesner.hansen@gmail.com
a1b2f47600 Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor
ics.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 08:51:48 +00:00
christian.plesner.hansen@gmail.com
b14018b7e1 Marked mjsunit/apply as expected to fail on mac debug.
Review URL: http://codereview.chromium.org/351021


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 12:53:30 +00:00
christian.plesner.hansen@gmail.com
1bc9d4857e Made rethrow test not depend on stack overflow behavior.
Review URL: http://codereview.chromium.org/345046


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 09:52:06 +00:00
christian.plesner.hansen@gmail.com
850487401d Added TryCatch::ReThrow method.
Review URL: http://codereview.chromium.org/342078


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 08:53:34 +00:00
kmillikin@chromium.org
1affb78938 Add support for for loops to the toplevel code generator.
Review URL: http://codereview.chromium.org/340059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 14:12:48 +00:00
sgjesse@chromium.org
b4c11d0816 Don't use string slices when processing RexExp replace (re-apply r3153)
Re-apply r3153 with a fix for issue 490. Except for the change in line 1756 and the added test this change is identical to http://codereview.chromium.org/342015.

BUG=490
TEST=test/mjsunit/regress/regress-490.js
Review URL: http://codereview.chromium.org/341064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 12:21:43 +00:00
fschneider@chromium.org
e38cd233c3 Support for function calls on an arbitrary expression that returns
a function in the top-level compiler.

e.g.

function f() { return (function() { return true; }) }
f()()


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 12:04:35 +00:00
fschneider@chromium.org
a07146c0cb Support for post-fix count operations (x++, x--) where x is a global
variable for the top-level compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 10:22:22 +00:00
erik.corry@gmail.com
dbd7f20d2d Introduce a switch for the new snapshot code and switch
it on by default.  Includes bug fixes for new snapshots.
Review URL: http://codereview.chromium.org/342054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 10:23:12 +00:00
fschneider@chromium.org
07cd399b5c Support for calls on named and keyed properties in the fast compiler of the form:
o.x() and o[expr]()

other changes:
- Fix missing relocation info for StoreIC on global object.
- Generate only one common return sequence instead of always appending 
  "return <undefined>" at the end of each function: The first JS 
  return-statement will generate the common return sequence. All
  other return-statements will generate a unconditional branch to the common
  return sequence.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 10:22:31 +00:00
antonm@chromium.org
6da43b7e4d Add a test which verifies that weak reference callbacks cannot be invoked while scavenging.
BUG=25819

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 23:06:59 +00:00
sgjesse@chromium.org
be769f6a24 Reverting 3159, 3151 and 3150
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/343035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 13:17:11 +00:00
erik.corry@gmail.com
55212d2e1d ARM still not quite right with new serialization code.
Review URL: http://codereview.chromium.org/339043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 14:28:20 +00:00
lrn@chromium.org
0aecc29024 Issue 485: Fix leak of builtins object through call and apply functions.
Review URL: http://codereview.chromium.org/345007


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 13:51:30 +00:00
sgjesse@chromium.org
6768703d24 Derive string size constants
* The maximum length of short and medium sized strings is now derived from other constants.
* Remove the redundant String part of their names.
Review URL: http://codereview.chromium.org/347002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 13:10:36 +00:00
erik.corry@gmail.com
97de363ef5 * Fix new snapshot code on ARM.
Review URL: http://codereview.chromium.org/344011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:37:54 +00:00
christian.plesner.hansen@gmail.com
b5dd1e3a82 Marking test as expected to flake.
Review URL: http://codereview.chromium.org/343016


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:23:35 +00:00
mikhail.naganov@gmail.com
492dc0643f Fix crbug/24815. Changes affect profiler "lazy" mode used for V8 in Chromium.
- don't engage the processing thread of CPU profiling until the first time profiling is resumed, this saves us a thread allocation for the majority of users;
- don't log shared libraries addresses: this is useless for JS-only profiling, and also consumes time on startup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 09:13:11 +00:00
fschneider@chromium.org
64e1d3205f Support for property access (named, keyed) in the fast compiler.
The generated code is similar to the existing code, but we never
inline any IC code in the fast compiler.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 16:11:12 +00:00
christian.plesner.hansen@gmail.com
895f1d22e5 Implemented specialized stubs for API getters. This includes a number
of individual changes:

  - Added infrastructure for custom stub caching.
  - Push the code object onto the stack in exit calls instead of a
    debug/non-debug marker.
  - Remove the DEBUG_EXIT frame type.
  - Add a new exit stub generator for API getters.


Committed: http://code.google.com/p/v8/source/detail?r=3130
Review URL: http://codereview.chromium.org/330017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 15:38:49 +00:00
sgjesse@chromium.org
c19d944bed Landing http://codereview.chromium.org/339026
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/334044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 14:40:50 +00:00
lrn@chromium.org
c433b4db20 Fix bug in test on Windows.
Review URL: http://codereview.chromium.org/335044


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 13:26:22 +00:00
lrn@chromium.org
89253d33c2 Fixed problem with test on big-endian-float ARM.
Review URL: http://codereview.chromium.org/338044


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 12:26:21 +00:00
erik.corry@gmail.com
fb2317b63b New snapshot framework. Doesn't work on ARM yet (code targets
are different).  Is able to deserialize the whole heap and run
some stuff.  Not available as the primary snapshot system yet.
Review URL: http://codereview.chromium.org/335009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 11:54:01 +00:00
lrn@chromium.org
59e7be2c03 Windows: Change test to not assume ebp is frame-pointer.
Review URL: http://codereview.chromium.org/329007


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:50:24 +00:00
lrn@chromium.org
b92a05942e Change NaN-test to only check for QNaNs, and API to only introduce QNaNs.
Review URL: http://codereview.chromium.org/339002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:13:59 +00:00
christian.plesner.hansen@gmail.com
2880be71ea Reverted 3130-3131 since they don't work on mac.
Review URL: http://codereview.chromium.org/335027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 15:16:42 +00:00
christian.plesner.hansen@gmail.com
d59f47a2d5 Fixed release test build breakage.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 14:33:13 +00:00
christian.plesner.hansen@gmail.com
53b93464d1 Implemented specialized stubs for API getters. This includes a number
of individual changes:

  - Added infrastructure for custom stub caching.
  - Push the code object onto the stack in exit calls instead of a
    debug/non-debug marker.
  - Remove the DEBUG_EXIT frame type.
  - Add a new exit stub generator for API getters.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 13:54:47 +00:00
fschneider@chromium.org
9445079c51 Support for object literals in fast compiler.
I also added more unit tests for literals.

Right now, the fast compiler produces code very similar to
the existing code generator. We may consider different ways to 
further compact the generated code for top-level code.

ARM always goes through a runtime function to initialize computed
properties in an object literal whereas IA32 and x64 use StoreIC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 13:21:48 +00:00
sgjesse@chromium.org
7a509f2101 Fix issue with running some constructors having only this.x = ... assignments.
If we had compiled the comment instead of the code it would have worked.

BUG=483
TEST=mjsunit/regress/regress-483.js
Review URL: http://codereview.chromium.org/332007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 12:18:47 +00:00
kbr@chromium.org
ef95097334 Stop throwing exceptions for out-of-range accesses to CanvasArrays.
This is per resolution in the WebGL working group to make these types
match the WebIDL IndexSetter and IndexGetter semantics, which are
still being defined but will very likely not throw.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 09:19:17 +00:00
lrn@chromium.org
6f1d641fb6 X64/Win64: Alternative implementation of fmod in general.
Review URL: http://codereview.chromium.org/303034


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 09:18:19 +00:00
erik.corry@gmail.com
d50fbb634e Fix bug that meant that dependent tests were never reported as
failing (though they could still crash).
(Cache the result of the test in the output object, not in the
test object which is reused from the prerequisite to the dependent.)
Review URL: http://codereview.chromium.org/321001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 19:09:09 +00:00
kbr@chromium.org
d5f00cf6cc Add optimized ICs for new CanvasArray types introduced in WebGL
specification under development. This is a follow-on CL to
http://codereview.chromium.org/293023 .

Based on review feedback, defined the behavior of storing NaN and
+/-Infinity into external arrays of integer types as storing 0. Added
test cases. Added fucomi instruction to assembler. Fixed bug in
KeyedLoadIC::GenerateExternalArray when allocation of HeapNumber
failed. Fixed bug in encoding of 16-bit immediate arithmetic
instructions in 64-bit port.

Removed raising of exceptions for negative array indices passed to
external arrays and associated tests. Based on current discussion in
WebGL working group, will probably end up removing the exception
throwing altogether.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 14:49:00 +00:00
kmillikin@chromium.org
bb2f8c038c The runtime function DeclareGlobals is not called from JavaScript.
Add it to the exclusions list in the fuzz-natives test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 11:32:12 +00:00
kmillikin@chromium.org
fbc0eaa13d Added support for array literals to the toplevel compiler. They are
currently compiled the same as with the optimizing compiler: they are
cloned from a boilerplate object and the boilerplate objects are
lazily constructed.

Also changed argument pushing on ARM to use stm (store multiple),
which required changing the order of arguments to the runtime
functions DeclareGlobals and NewClosure.  They were only used from
generated code.

Finally, changed the toplevel code generator so that stack pops to
discard a temporary became addition to the stack pointer on ia32 and
x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 10:07:45 +00:00
peter.rybin@gmail.com
d8f7b36624 Add "Version" command
Review URL: http://codereview.chromium.org/274080


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 17:07:43 +00:00
ager@chromium.org
9ee631338e Allow resource constraints to specify the max committed new space size
when using snapshots.

The alignment of new space has to match the alignment in the snapshot,
but the max committed amount of memory does not.

For now, we assume that the default semispace size is always used in a
snapshot.
Review URL: http://codereview.chromium.org/300036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 15:03:34 +00:00
kmillikin@chromium.org
61363d83ba Add support for global variable references in toplevel code. We use
the normal named load IC mechanism for now.  Generated code is similar
to the case for global variable assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 09:38:21 +00:00
kbr@chromium.org
46e6297e3e Added infrastructure for optimizing new CanvasArray types in WebGL
specification under development. The optimizations are patterned after
those previously done for CanvasPixelArray. This CL adds all of the
necessary framework but continues to use the generic KeyedLoadIC and
KeyedStoreIC code, to create a baseline for benchmarking purposes. The
next CL will add the optimized ICs to ic-ia32.cc and ic-x64.cc.

These new CanvasArray types have different semantics than
CanvasPixelArray; out-of-range values are clamped via C cast
semantics, which is cheaper than the clamping behavior specified by
CanvasPixelArray. Out-of-range indices raise exceptions instead of
being silently ignored.

As part of this work, pulled FloatingPointHelper::AllocateHeapNumber
up to MacroAssembler on ia32 and x64 platforms. Slightly refactored
KeyedLoadIC and KeyedStoreIC. Fixed encoding for fistp_d on x64 and
added a few more instructions that are needed for the new ICs. The
test cases in test-api.cc have been verified by hand to exercise all
of the generated code paths in the forthcoming specialized ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 15:26:17 +00:00
kmillikin@chromium.org
4dfd44479d Added support for assignments to global variables in the toplevel code
generator.  We use the normal store IC mechanism with the global
object as the receiver.  The following code is generated for 'x=true'
at toplevel.

======== IA32:

27  mov eax,0xf5d06161          ;; object: 0xf5d06161 <true>
32  mov ecx,0xf5d09c35          ;; object: 0xf5d09c35 <String[1]: x>
37  push [esi+0x17]
40  call StoreIC_Initialize  (0xf5ce75c0)    ;; code: STORE_IC, UNINITIALIZED
45  mov [esp],eax

======== X64:

25  movq rax,0x7f867a7b6199    ;; object: 0x7f867a7b6199 <true>
35  movq rcx,0x7f867a7bae71    ;; object: 0x7f867a7bae71 <String[1]: x>
45  push [rsi+0x2f]
49  call StoreIC_Initialize  (0x7f8655929ac0)    ;; code: STORE_IC, UNINITIALIZED
54  movq [rsp],rax

======== ARM:

32  e59f0054       ldr r0, [pc, #+84]          ;; object: 0xf5b78161 <true>
36  e59f2054       ldr r2, [pc, #+84]          ;; object: 0xf5b7bc35 <String[1]: x>
40  e598c017       ldr ip, [r8, #+23]
44  e52dc004       str ip, [sp, #-4]!
48  e1a0e00f       mov lr, pc
52  e59ff048       ldr pc, [pc, #+72]          ;; debug: statement 0
                                               ;; code: STORE_IC, UNINITIALIZED
56  e58d0000       str r0, [sp, #+0]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 13:37:26 +00:00