Commit Graph

2146 Commits

Author SHA1 Message Date
sandholm@chromium.org
ba229754ea Fix JSON issue with arrays.
Review URL: http://codereview.chromium.org/7089003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 10:47:38 +00:00
ricow@chromium.org
7eb6f5c1ba Correctly set the length of string before creating filler object in the json parser (fixes crbug 84186).
Testcase created based on the supplied test case from the bug report, but using json parse directly instead of through the chrome javascript console. 
Review URL: http://codereview.chromium.org/7084023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 06:04:36 +00:00
danno@chromium.org
c2394e0a71 Prevent deopt on double value assignment to typed arrays
Implement truncation of double and tagged values when assigning to an element of a typed arrays in order to avoid depots.

BUG=1313
TEST=test/mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 12:07:22 +00:00
ager@chromium.org
c832c467a4 Revert "Pass undefined to JS builtins when called with implicit receiver."
Presubmit and failing test.

TBR=lrn@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:22:29 +00:00
kmillikin@chromium.org
f8b01f369e Add a simple test for inlining of arguments accesses.
R=whesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:17:15 +00:00
ager@chromium.org
19b718fe73 Pass undefined to JS builtins when called with implicit receiver.
A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.

R=lrn@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:07:48 +00:00
lrn@chromium.org
02c4e8bfcb Make RegExp objects not callable.
Review URL: http://codereview.chromium.org/6930006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 07:35:09 +00:00
erik.corry@gmail.com
fbf76fc86a Fix GC-unsafe corner case in bit-not on ARM
Review URL: http://codereview.chromium.org/6987009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 10:35:00 +00:00
ricow@chromium.org
f675db651d Change calls to undefined property setters to not throw (fixes issue 1355).
We currently throw when there is only a getter defined on the
property, but this should only be the case in strict mode.
Review URL: http://codereview.chromium.org/7064027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 08:37:38 +00:00
lrn@chromium.org
b97da90453 Add tests for function statements in strict mode.
Small fixes.
Added test for const declaration in strict mode.

TEST=preparser/strict-function-statement

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 14:02:59 +00:00
ager@chromium.org
6f775f2fb0 Fix calls of strict mode function with an implicit receiver.
Only IA32 version for now. I'll start porting.

Strict mode functions are to get 'undefined' as the receiver when
called with an implicit receiver. Modes are bad! It forces us to have
checks on all function calls.

This change attempts to limit the cost by passing information about
whether or not a call is with an implicit or explicit receiver in ecx
as part of the calling convention. The cost is setting ecx on all
calls and checking ecx on entry to strict mode functions.

Implicit/explicit receiver state has to be maintained by ICs. Various
stubs have to not clobber ecx or save and restore it.

CallFunction stub needs to check if the receiver is implicit when it
doesn't know from the context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 14:01:36 +00:00
sgjesse@chromium.org
eff2946b9b Handle changes to the Object prototype in fast handling of arrays
R=ager@chromium.org

BUG=v8:1403
TEST=test/mjsunit/regress/regress-1403.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:28:10 +00:00
ricow@chromium.org
ab67432ed0 Change strict mode poison pill to be the samme type error function (fixes issue 1387).
We are now following the spec, and with regards to the error message we are following firefox (webkit still has different type errors in their nightly)
Review URL: http://codereview.chromium.org/7067017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 11:07:06 +00:00
sgjesse@chromium.org
fbd106d9cd MIPS: arch-independent changes to support mips.
This change supports all non-crankshaft features except serialization.

This must be built after the changes in http://codereview.chromium.org/6966031
are landed.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 07:56:20 +00:00
vitalyr@chromium.org
179702df03 Inline more zone stuff.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 22:23:50 +00:00
danno@chromium.org
780df33019 SMI checks for receiver in KeyedLoad/Store (done right this time)
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 13:42:33 +00:00
sgjesse@chromium.org
825a433900 Add regression test for issue 1401
R=ager@chromium.org

BUG=v8:1401
TEST=test/regress/regress-1401.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 13:03:45 +00:00
lrn@chromium.org
dc69639e4c Remove newlines from preparser command line parameters to make Windows happy.
Review URL: http://codereview.chromium.org/6974009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 12:56:00 +00:00
lrn@chromium.org
b253dd8927 Create template system for strict-mode tests.
This makes it possible to get total coverage without creating thousands
of individual test files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 10:35:30 +00:00
mikhail.naganov@gmail.com
dd2c990178 Remove redundant 'running' checks for ProfilerEventsProcessor in tests.
A follow up to r7949

R=vitalyr@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-20 15:11:00 +00:00
rossberg@chromium.org
abd77ad439 Rename Proxy class to Foreign, to avoid confusion with Harmony proxies.
Also fix grokdump, which was off by one after intro of JSProxy type.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 11:47:34 +00:00
lrn@chromium.org
7db97de8e0 Added preparser strict-mode tests.
Now tests for use of eval, arguments, reserved words and with statement.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 09:01:46 +00:00
mikhail.naganov@gmail.com
e7484dbd01 Fix bug with long stack traces truncation in DevTools CPU profiler.
R=sgjesse@chromium.org,vitalyr@chromium.org
BUG=1398
TEST=cctest/test-cpu-profiler/Issue1398

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 08:25:38 +00:00
ager@chromium.org
98778dc802 Remove execScript from V8. No longer present i neither Firefox nor Safari.
R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 08:10:27 +00:00
vegorov@chromium.org
7fba506f23 Add regression test for http://crbug.com/82769
Review URL: http://codereview.chromium.org/7034025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 12:46:21 +00:00
fschneider@chromium.org
66911961cf Fix bug in optimized compiler's switch-statement.
In the case where the default-clause occurs as the first clause,
the case-blocks were not wired up correctly.

BUG=v8:1394
TEST=mjsunit/compiler/regress-1394.js
Review URL: http://codereview.chromium.org/7037023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 11:06:07 +00:00
vegorov@chromium.org
925107046e Extend Handle API with MarkIndependent.
Garbage collector is free to ignore object groups for independent handles and can collect then in minor collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 12:18:19 +00:00
whesse@chromium.org
0eca2b4fc1 Fix error in postfix ++ in Crankshaft.
Add HForceRepresentation, to represent the implicit ToNumber applied to the input of a count operation.

BUG=v8:1389

TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 11:41:59 +00:00
rossberg@chromium.org
05fd779dd3 Implement get trap for proxies.
TODO: reflective Object methods not handled yet.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 16:33:58 +00:00
danno@chromium.org
daa1be1226 Support conversion of clamped double values for pixel arrays in Crankshaft.
BUG=1313
TEST=test/mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 14:10:56 +00:00
sgjesse@chromium.org
230a56abda Limit the number of local variables in a function
Review URL: http://codereview.chromium.org//7003030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 08:27:52 +00:00
svenpanne@chromium.org
ca5dad94a7 Removed dead code (ingenious 3-bit representation of types)
Review URL: http://codereview.chromium.org/6973053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 08:21:50 +00:00
ricow@chromium.org
964dbff40d Only send null or undefined as receiver for es5 natives, not generally
for builtin functions.
Review URL: http://codereview.chromium.org/7012012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 07:26:44 +00:00
karlklose@chromium.org
b606195012 ARM: Fix disasm for strh, vabs, vneg. Add load/store tests.
Patch from ARM Ltd.

BUG=none
TEST=added to test/cctest/test-disasm-arm.cc

Original review at http://codereview.chromium.org/7013024/.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 14:44:49 +00:00
dslomov@chromium.org
adfa56af54 Speculative fix fo MultithreadedParallelIsolates on ARM
It looks like the problem with the test is too many concurrently created isolates.
Cranking the number to 100 on MacOS and Linux produce similar results.

BUG=http://code.google.com/p/v8/issues/detail?id=1375
TBR=vitalyr

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 17:29:47 +00:00
sgjesse@chromium.org
4e18d50834 Add constant splitting for user controlled constants in the full compiler
This is IA32 only for now.

Added a random value to each assembler instance (JIT cookie) to be used for constant splitting. Added safe versions of setting a register with an immediate value and for pushing an immediate value. Used these functions where user controlled immediate values could be emitted in the code stream. I also used it for immediates which are an argument number even though the number of formal arguments is currently limited to 16k.

I found no compares directly with user controlled constants.

I am not sure whether the test is that useful, but it might catch some changes missing constant splitting.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 14:16:24 +00:00
fschneider@chromium.org
48077e89e9 Remove support for branch hints from the IA32 and X64 assembler.
They were not on by default and should not be needed on modern
platforms.
Review URL: http://codereview.chromium.org/7001025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 13:26:07 +00:00
vitalyr@chromium.org
4cc800b3cf Support %_IsUndetectableObject in crankshaft.
Review URL: http://codereview.chromium.org/6995046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:53:43 +00:00
ager@chromium.org
8a0b1f5bc9 Allow closures to be optimized if outer contexts that call eval are all in strict mode.
R=kmillikin@chromium.org
BUG=
TEST=mjsunit/compiler/eval-introduced-closure.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:26:11 +00:00
ricow@chromium.org
7f8a918f08 Allow strict mode flag as extraicstate for keyed external array store ic
We currently hit an assertion in computeflags, but the extra_ic_state is used to pass the strict mode flag in.

BUG: 1383
Review URL: http://codereview.chromium.org/7003022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 08:53:46 +00:00
sgjesse@chromium.org
67ebabc16e Add cctest/test-disasm-mips which was mistakenly omitted from r7825.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 08:26:22 +00:00
jkummerow@chromium.org
944a388412 Avoid using a register for constant external array indices.
This CL is based on and obsoletes CL 6879037.

TEST=mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 15:25:17 +00:00
jkummerow@chromium.org
1eedd8056d Fix timeout of test regress-1118.js
TEST=mjsunit/regress/regress-1118.js no longer times out when run in the ARM simulator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 15:07:30 +00:00
karlklose@chromium.org
00e8236096 ARM: Disable test test-lockers/MultithreadedParallelIsolates because it is flaky.
BUG=1375

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 12:30:01 +00:00
ager@chromium.org
8033be880e Add IsCallable method for Object in the API
Patch by Peter Varga.

BUG=none
TEST=cctest/test-api/CallableObject

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 15:24:48 +00:00
sgjesse@chromium.org
40172e6a7b Update mips infrastructure files.
- Merge to current tip of tree, fix build problems.
- Remove deprecated source files.
- Add cctest test-disasm-mips
- Consistently use single-reg push()/pop() (remove uppercase variants)
- Add assembler field accessors.
- More style fixes.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 14:28:09 +00:00
lrn@chromium.org
217006f111 Let test configuration disable variant flags. Used for preparser tests.
Fixes problem with nosse[234] tests (or anything else that would pass an
unexpected extra parameter on the preparser test command line).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 09:02:27 +00:00
jkummerow@chromium.org
89c64653bf Expose optimization info via runtime functions
TEST=mjsunit/assert-opt-and-deopt.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 08:58:57 +00:00
ager@chromium.org
0961b1a936 Check that receiver is JSObject on API calls.
R=sgjesse@chromium.org
BUG=v8:1369
TEST=mjsunit/regress/regress-1369.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 14:14:16 +00:00
lrn@chromium.org
91968ac8a6 Fix newly introduced bug in detecing octal numbers.
TEST=mjsunit/strict

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 12:47:18 +00:00
lrn@chromium.org
1a169aa3f0 Strict mode detection in preparser.
Handle octal escapes in everything but RegExps.
Extend preparser test suite to test whether the preparser reports
exceptions to throw.

TEST=preparser/*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 11:41:15 +00:00
ager@chromium.org
cf19179266 Implement CallAsConstructor method for Object in the API
Patch by Peter Varga.

BUG=v8:1348
TEST=cctest/test-api/ConstructorForObject

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 11:07:52 +00:00
ricow@chromium.org
1d9133bbac Split threaded cctests into four parts (instead of 2)
The number of cctests are now so large that this is causing timeouts
when only splitting these into two parts.
Review URL: http://codereview.chromium.org/6929063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 09:22:54 +00:00
karlklose@chromium.org
d43066050a Replace loops by OptimizeFunctionOnNextCall in regress-1085 and regress-1210.
Review URL: http://codereview.chromium.org/6938001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 09:10:28 +00:00
dslomov@chromium.org
2500f14868 This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

Committed: http://code.google.com/p/v8/source/detail?r=7734

Committed: http://code.google.com/p/v8/source/detail?r=7784

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 18:55:31 +00:00
ricow@chromium.org
e0eb110130 Reapply 7763, including arm and x64 variants.
The only difference to revision 7763 is the implementation in the
builtins file for arm and x64, plus a move of Array.prototype.toString
and Array.prototype.toLocaleString from should throw on null or
undefined to the non generic test cases in the function-call test (due
to us not currently supporting generic cases with these to functions)
Review URL: http://codereview.chromium.org/6928007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 05:21:30 +00:00
dslomov@chromium.org
6e4629a81c Revert "This implements per-isolate locking and unlocking, including tests"
This reverts commit 1aa40d0c278e195e9e69dcf8b29a212aa1817c0b.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 22:35:42 +00:00
dslomov@chromium.org
d54fe47fad This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

Committed: http://code.google.com/p/v8/source/detail?r=7734

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 21:04:32 +00:00
ager@chromium.org
82a04c7fdc Add CallAsFunction method to the Object class in the API
Patch by Peter Varga.

BUG=v8:1336
TEST=cctest/test-api/CallAsFunction

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 13:03:08 +00:00
ager@chromium.org
24f19608d4 Actually revert "Add Call method to the Object class in the API"
Tests are failing in debug mode.

This also reapplies the change "Make Date and RegExp inherit from
Object in the API" that I accidentally reverted.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:07:09 +00:00
ager@chromium.org
26c775da94 Revert "Make Date and RegExp inherit from Object in the API."
Tests are failing in debug mode.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:51:07 +00:00
ager@chromium.org
b8cdecb517 Add Call method to the Object class in the API
Patch by Peter Varga.

BUG=v8:1336
TEST=cctest/test-api/CallAsFunction

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:03:49 +00:00
ager@chromium.org
87f225936f Make Date and RegExp inherit from Object in the API.
They are objects and the API inheritance hierarchy should reflect that.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 07:28:27 +00:00
ricow@chromium.org
797cbc68b7 Delete empty test/mjsunit/function-call.js file
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 14:20:19 +00:00
karlklose@chromium.org
8b917d4d96 Replace long running loops by OptimizeFunctionOnNextCall in some tests that are often timing out on ARM.
Review URL: http://codereview.chromium.org/6910022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:53:08 +00:00
ricow@chromium.org
4d890da191 Revert 7763, missing implementation on x64 and arm for call and apply with null or undefined.
Review URL: http://codereview.chromium.org/6913024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:45:19 +00:00
ricow@chromium.org
2b730c2bf6 Don't exchange null and undefined with the global object in function.prototype.{call, apply} for natives.
This makes us compatible with firefox in throwing an exception when
call is invoked on a builtin with null as the this argument.
Review URL: http://codereview.chromium.org/6902104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:19:04 +00:00
lrn@chromium.org
569574b7bf Fix implementation of == to correctly convert Date objects to primitives.
Fix issue 1356

BUG=v8:1356
TEST=mjsunit/double-equals

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 12:15:14 +00:00
kmillikin@chromium.org
d0fcbb4ece Simplify include dependencies.
Try to make sure that accessors.h, data-flow.h, list-inl.h, and
scopeinfo.h are included only where needed, but without introducing
implicit dependencies.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 08:23:58 +00:00
lrn@chromium.org
d1411602a7 Don't allow whitespace after sign characters in parseInt.
BUG=v8:955
TEST=mjsunit/regress/regress-955

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 07:11:17 +00:00
ager@chromium.org
8aeaa5e90a Implement API to disallow code generation from strings for a context.
R=sgjesse@chromium.org
BUG=v8:1258
TEST=test-api/AllowCodeGenFromStrings

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 05:40:47 +00:00
ager@chromium.org
ccafbca61d Use JSON.parse instead of eval for the debugger JSON protocol.
R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 14:20:34 +00:00
kmillikin@chromium.org
1af840ad4c Be more discriminating about uses of the arguments object in optimized code.
Because we track the value of the arguments object, we need to check
values whenever plugged into a forbidden value context.  It is not
enough to check at only variable references as we did previously.

R=fschneider@chromium.org
BUG=1351
TEST=regress-1351.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 11:35:51 +00:00
ager@chromium.org
30ef211fcf Fix presubmit.
TBR=mnaganov

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 11:08:44 +00:00
dslomov@chromium.org
7088aea3eb Revert "This implements per-isolate locking and unlocking, including tests"
This reverts commit 76c78febb70e75b18214f5fe45de95c7fb515386.

This change has broken test-thread-termination/TerminateMultipleV8Threads

TBR=vitalyr

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 22:16:45 +00:00
dslomov@chromium.org
f4c120d615 This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 21:26:03 +00:00
mikhail.naganov@gmail.com
22fdd1cdbb Add some more (failing) tests for function names inference.
After the "Naming Anonymous JavaScript Functions" paper by
S. M. Ecole, J. J. Barton, C. Petitpierre.

TBR=yurys@chromium.org
BUG=1354
TEST=test-func-name-inference/*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 20:59:29 +00:00
mmaly@chromium.org
796ac25a4f Strict mode eval declares its locals in its own environment.
BUG=
TEST=strict-mode.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 15:31:39 +00:00
lrn@chromium.org
f470cf2777 Handle join of sparse arrays with non-empty separator more efficiently.
BUG=v8:1028

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 08:53:36 +00:00
vegorov@chromium.org
1c950e04cc Fix missing writebarrier in ArraySplice builtin.
Review URL: http://codereview.chromium.org/6883227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 16:03:40 +00:00
karlklose@chromium.org
32732fbc86 Expose hasOwnProperty() through API.
BUG=http://code.google.com/p/v8/issues/detail?id=1342
TEST=test-api/HasOwnProperty

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 09:27:40 +00:00
kmillikin@chromium.org
dc28280a82 Fix a bug in a corner case of direct eval detection.
The corner case is calling a function named 'eval' that is looked up at
runtime and found in a non-global context (but not an extension object).
The bug is that we used the function itself as the receiver rather than
using the global object.

R=ager@chromium.org
TEST=has been added to the eval mjsunit test

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 05:04:48 +00:00
whesse@chromium.org
d96dc0755b Add AST ID to RelocInfo for type-recording ICs. Changes 7644 and 7632, combined.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 15:02:59 +00:00
whesse@chromium.org
e39f0535be Disable logging for the Threading test in cctest/test-api by default.
BUG=
TEST=test-api/Threading

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 07:56:41 +00:00
jkummerow@chromium.org
bc8f6943bb Support Float64Arrays
BUG=None
TEST=mjsunit/external-arrays.js; updated cctest; existing unit tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-21 07:15:43 +00:00
karlklose@chromium.org
3b6fe22c4d Make throw inlineable only if the exception is inlineable.
BUG=1337
TEST=regress-1337

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-20 09:15:52 +00:00
ricow@chromium.org
69a4c52bbf Revert revisions 7644 and 7632, they are causing assertion failures in interactive_ui_tests debug mode.
Review URL: http://codereview.chromium.org/6873076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 16:04:49 +00:00
karlklose@chromium.org
af37074c10 Skip crashing cctests.
Review URL: http://codereview.chromium.org/6877034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 10:34:34 +00:00
karlklose@chromium.org
b06ce8dd2c Correct test names for the failing deserialization tests in cctest.status.
Review URL: http://codereview.chromium.org/6877032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 07:50:46 +00:00
karlklose@chromium.org
26fda9bf32 ARM: Optimisations for call, jump and untag.
Improves some V8 benchmarks by a few % on A9.

Patch by ARM Ltd.

BUG=none
TEST=Added to test-assembler-arm.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 13:53:11 +00:00
antonm@chromium.org
dc99761f31 Minor cosmetic changes.
Review URL: http://codereview.chromium.org/6875003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 13:28:00 +00:00
yurys@chromium.org
5d70a291fe Fix debuger evaluation on a breakpoint inside eval
Corresponding Chromium issue: http://code.google.com/p/chromium/issues/detail?id=74412
Review URL: http://codereview.chromium.org/6875005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 14:09:45 +00:00
whesse@chromium.org
46164ee24e Record AST ids in relocation info at spots where we collect dynamic type feedback.
Review URL: http://codereview.chromium.org/6793016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 13:18:53 +00:00
lrn@chromium.org
7aec228dbb Cleanup of mjsunit.js code and make assertEquals more strict.
Encapsulate the helper functions in mjsunit.js.
Now only exposes the exception class and the assertXXX functions.

Make assertEquals use === instead of ==.
This prevents a lot of possiblefalse positives in tests, and avoids
having to do assertTrue(expected === actual) when you need it.

Fixed some tests that were either buggy or assuming == test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 11:35:36 +00:00
karlklose@chromium.org
dab8f48ebc ARM: Implement correct rounding in the lithium codegenerator.
This patch provides testing for values that have a fraction part of 0.5 and uses a different rounding method for them. The original method of VFPTruncating the value with round-to-nearest is not correct because it does not round to the larger number in case of a tie.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 11:29:01 +00:00
ricow@chromium.org
cfb5a7ee78 Reapply 7581, Fix tools/test.py to allow CTRL+C to work correctly again.
Buildbot now has python 2.6

Also, remove some semicolons.
Review URL: http://codereview.chromium.org/6871007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 09:41:09 +00:00
lrn@chromium.org
3bbcab1ca9 X64: Use roundsd for DoMathFloor.
TEST=mjsunit/math-floor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 09:05:43 +00:00
whesse@chromium.org
98c17a2bf3 Adjust mjsunit.status to account for math-round test passing on ARM when crankshaft is disabled.
Review URL: http://codereview.chromium.org/6840013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 14:03:24 +00:00
fschneider@chromium.org
9783526239 Enable inlining functions containing throw.
After Kevin's change to the graph builder to allow aborting graph construction
inside arbitrary expressions this just works.

BUG=v8:1143
Review URL: http://codereview.chromium.org/6839017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 13:09:58 +00:00
lrn@chromium.org
caee8a3ccf Fix Math.round in runtime.cc and x64 optimized code.
Make math-round.js test check both normal and optimized version.
Add some cases to the tests.

BUG=v8:958
TEST=mjsunit/math-round

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 09:35:56 +00:00
jkummerow@chromium.org
1d774ac5ca Fix load/store of external float arrays on ARM
BUG=1323
TEST=mjsunit/regress/regress-1323.js, run with simulator=arm

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 15:20:26 +00:00
sgjesse@chromium.org
250b205456 ARM: Set expectations for failing deserializations tests to turn the bot green
R=karl.klose@chromium.org

BUG=v8:1075
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 12:30:13 +00:00
lrn@chromium.org
a932441a0c Cleanup of ScannerConstants, now named UnicodeCache.
The ScannerConstants class was originally static fields on the scanner class.
During creation of the stand-alone preparser and later isolates, it has been
moved into a separate class with a per-isolate instance.
It is used to hold caching unicode Predicate values.

This change renames the class to UnicodeCache, and passes a reference
to the instance down to methods that doesn't have an easy access to
an isolate (to avoid, e.g., having to do an Isolate::Current() for every
number parsed).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 08:27:38 +00:00
ricow@chromium.org
6baa8a2bde Revert 7581, you can't have try except finally toghetter until python 2.5
We have some 2.4 versions on the windows buildbots, I will try to have these updated and reapply.
Review URL: http://codereview.chromium.org/6821069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 07:46:17 +00:00
ricow@chromium.org
7c0b1af4d7 Fix tools/test.py to allow CTRL+C to work correctly again.
This also changes the AfterRun functions to allow None as the passed in parameter.
Review URL: http://codereview.chromium.org/6824040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 06:26:38 +00:00
vitalyr@chromium.org
d932b5f768 Do not rely on uniqueness of pthread_t
Patch by Dmitry Lomov.

pthreads implementations are free to reuse pthread_t (thread id) after
the thread has died. This change gets rid of ThreadHandle class and
replaces it with v8-managed thread identifiers.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 23:46:22 +00:00
antonm@chromium.org
0b30898379 Allow recursive messages reporting as it is already used.
Instead discard unhandled exceptions thown while running
message listeners.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 16:16:52 +00:00
mmaly@chromium.org
d3172e6349 Bring test262 expectations up-to-date.
Add missing *.js files into Xcode project.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 13:54:30 +00:00
jkummerow@chromium.org
ed968b1042 Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization.
TEST=existing unit tests still pass

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 13:24:50 +00:00
sgjesse@chromium.org
75759805a9 ARM: Remove support for ABI prior to EABI
The support for the old ABI is known to be broken and has been deprecated for some time now. Removed the instructions for loading and storing co-processor registers as they where only used to support the old ABI.

R=karlklose@chromium.org

BUG=v8:1316
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 09:04:30 +00:00
mmaly@chromium.org
164e3a4173 Strict mode fixes.
- mutual inlining strict and non-strict functions in crankshaft.
- assignment to undefined variable with eval in scope.
- propagation of strict mode through lazy compilation.

BUG=
TEST=test/mjsunit/strict-mode.js test/mjsunit/strict-mode-opt.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-08 14:30:10 +00:00
yurys@chromium.org
9e181c5b4f Report stack overflow exceptions to V8 message listeners
Stack overflow exceptions like other JavaScript exceptions should be reported to listeners added via V8::AddMessageListener
Review URL: http://codereview.chromium.org/6816021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-08 09:39:45 +00:00
antonm@chromium.org
8122f974d8 Make exception thrown via v8 public API propagate to v8::TryCatch as JS thrown exceptions do.
Correctly process failures which can be returned by Object::GetProperty
when performing GetRealNamedProperty* queries.

Callback properties can produce exceptions so we need to wrap access to them
into exception checks.  However, despite of many other methods with exception
checks, property access doesn't mandatroy go via JavaScript and hence we
need to inject code to propagate exception to public API TryCatch handlers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 19:52:24 +00:00
ager@chromium.org
95c76ed464 Remove some dead code.
- virtual-frame*
- register-allocator*
- jump-target*
- most of codegen*
- AstOptimizer and fields on AST

There is a lot of additional cleanup that we should do but this gets
rid of a lot.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 14:42:37 +00:00
vegorov@chromium.org
8a8d3bbbee In LCodeGen::DoDeferredLInstanceOfKnownGlobal emit safepoint with registers for the call to stub.
Review URL: http://codereview.chromium.org/6793017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 13:32:45 +00:00
danno@chromium.org
fa69fd0817 Fix opmitized external array access for compound assignments and count operations, also implement missing ARM typed array Hydrogen loads and stores.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 09:51:25 +00:00
jkummerow@chromium.org
adf509f159 Make "length" and "BYTES_PER_ELEMENT" properties of typed arrays accessible.
Review URL: http://codereview.chromium.org/6805010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 08:24:56 +00:00
vitalyr@chromium.org
302037d44e Make object groups and implicit references a bit more lightweight.
We can only call malloc/free once per group and we can avoid scanning
through a list of NULLs if we keep unprocessed groups in the beginning.

I also changed the internal representation of implicit references to
hold a handle to the parent (instead of a direct pointer). The
prologue callback must not trigger a GC, but it's better to be safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 19:17:54 +00:00
yurys@chromium.org
c2e7beb952 Debugger: show local scope before with for functions created inside with block
Review URL: http://codereview.chromium.org/6804015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 17:54:39 +00:00
peterhal@chromium.org
e3d788329a 1309 fix
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 16:22:06 +00:00
jkummerow@chromium.org
348a4e44f5 Add regression test for overlapping key and value registers.
Review URL: http://codereview.chromium.org/6804007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 11:01:07 +00:00
sgjesse@chromium.org
6255476028 ARM: Add support load/store multiple VFP registers
Enter/exit frames with save doubles use these instructions instead of generating 16 load/store instructions.

R=karlklose@chromium.org, rodolph.perfetta@gmail.com

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 09:06:23 +00:00
mikhail.naganov@gmail.com
c9904976f9 Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...)
While trying to fix Mac and Windows versions for this change:
http://codereview.chromium.org/6771047/, I figured out, that we
already store an isolate in StackFrameIterator, so we can use it in
frame objects, instead of requiring it from caller.

I've changed iterators usage to the following scheme: whenever a
caller maintains an isolate pointer, it just passes it to stack
iterator, and no more worries about passing it to frame content
accessors.  If a caller uses current isolate, it can omit passing it
to iterator, in this case, an iterator will use the current isolate,
too.

There was a special case with LiveEdit, which creates
detached copies of frame objects.

R=vitalyr@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-05 09:01:47 +00:00
vitalyr@chromium.org
1ad59b9116 Cleanup of FACTORY macro and fix Irregexp Interpreter build in test-regexp.cc
Patch by Peter Varga.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-04 18:26:06 +00:00
sgjesse@chromium.org
1244225ba8 Extend crankshaft support for global stores
All global stores are now supported in crankshaft by using the normal store IC when other optimizations are not possible due to the state of the global object.

R=fschneider@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-04 15:03:34 +00:00
vitalyr@chromium.org
6952f68ee3 Fix non-ia32 build.
Review URL: http://codereview.chromium.org/6771052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 15:37:59 +00:00
vitalyr@chromium.org
0b40589e73 Fix multi-isolate build:
o Make ia32 macro assembler work without an isolate and use it in the
  custom memcpy creation code.
o Remove isolate-dependent code from the custom memcpy and modulo
  functions creation code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 14:46:30 +00:00
sgjesse@chromium.org
8099bf3531 Revert "Never use classic code generator."
This reverts r7469 which might have caused the timeouts on the buildbot.

TBR=ager@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 14:38:30 +00:00
antonm@chromium.org
56b53dd5dc Introduce v8::Object::CreationContext method.
That allows to find out a global context in which the object
was created.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 12:17:20 +00:00
sgjesse@chromium.org
1e8079fcc9 Increase coverage of global loads in optimized code
In the cases where a global property cell cannot be used in the optimized code
use standard load ic to get the property instead of bailing out.

This is re-committing r7212 and r7215 which where reverted in r7239 with the addition of recoring the source position in the hydrogen code for the LoadGlobalCell instruction. To record that position an optional position field has been added to the variable proxy AST node.
Review URL: http://codereview.chromium.org/6758007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 11:54:04 +00:00
vegorov@chromium.org
ae65366f0b Fix SlotRef::SlotAddress for parameters indices.
Fix %NewObjectFromBound to correctly handle optimized frames (including those with inlined functions).

Fix %_IsConstructCall handling in hydrogen: when called from inlined function return false constant directly instead of emiting HIsConstructCall.

Fix success case in TraceInline.

BUG=v8:1229
TEST=test/mjsunit/regress/regress-1229.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 11:41:36 +00:00
ager@chromium.org
1528bf7240 Never use classic code generator.
Crankshaft is now the default on all platforms. This is the first
patch on the way to removing the classic code generator from the
system.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 10:52:18 +00:00
vitalyr@chromium.org
179aef2b8f VM initialization refactoring.
This patch introduces global once per-process initialization and moves
the OS and CPU setup there. This makes CPU features isolate-independent.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-31 16:17:37 +00:00
lrn@chromium.org
1c57935a43 Reapply changelist r7436.
Remove test for existence of VM. Not all tests need the VM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-31 08:12:17 +00:00
vegorov@chromium.org
5378d727a1 Fix the Cygwin build after isolates merge.
Patch by Bert Belder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 17:16:36 +00:00
whesse@chromium.org
8f30d5922c Revert changelist r7436.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 14:42:47 +00:00
mikhail.naganov@gmail.com
b64e85d241 Heap profiler: emit more descriptive names for system objects and properties.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 14:04:50 +00:00
whesse@chromium.org
28323284c0 Add thread-safety to creation of MemCopy and modulo functions.
BUG=
TEST=release test-api MultipleIsolatesOnIndividualThreads on Windows X64 build.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 14:04:26 +00:00
lrn@chromium.org
0a6d586d09 Add test suite for the preparser.
The test suite builds the preparser test program and runs it on each .js file in
the test/preparser directory.
Currently it only checks that preparsing runs without crashing or erroring.
This also implicitly tests that the preparser library can be built.

TEST=test/preparser/*.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 14:00:36 +00:00
ricow@chromium.org
b4bae54ef2 Decrease number of runs in mjsunit/compiler/pic.js (Test still gets optimized, even without --stress-opt)
Review URL: http://codereview.chromium.org/6731049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 13:20:05 +00:00
lrn@chromium.org
385e4deff5 Make the preparser standalone library and process build in debug mode.
It should now be possible to build the preparser using 'scons preparser' in both release and debug modes.
Remove v8.h include from scanner-base.h and other files.
Remove NativeAllocationChecker and all of its kind.
Moved Isolate::PreallocatedStorage* to isolate.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 13:06:48 +00:00
mikhail.naganov@gmail.com
2d95ed4b25 Remove snapshots-related code that is implemented in DevTools heap profiler.
Diffs and retaining paths are implemented on JS side. There is no need
to maintain native implementation.

R=vitalyr@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 12:52:07 +00:00
sgjesse@chromium.org
1eb224c2a2 ARM: Check for minus zero when converting binary operation result to smi
The result of an Int32 binary operation will be converted to a smi if it fits. However a minus zero check was missing.

BUG=v8:1278
TEST=test/mjsunit/regress/regress-1278.js

R=ager@chromium.org
Review URL: http://codereview.chromium.org/6755009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 07:43:27 +00:00
sgjesse@chromium.org
91fcaa9a0c Fix presubmit errors in r7388
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/6724034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 13:37:09 +00:00
sgjesse@chromium.org
2531480d10 Re-establish mips basic infrastructure.
This commit adds current working versions of assembler, macro-assembler,
disassembler, and simulator.

All other mips arch files are replaced with stubbed-out versions that
will build.

Arch independent files are updated as needed to support building and
running mips.

The only test is cctest/test-assembler-mips, and this passes on the
simulator and on mips hardware.

TEST=none
BUG=none

Patch by Paul Lind from MIPS.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 13:05:36 +00:00
ricow@chromium.org
e0c7d3cf08 Run array-length less times to make the builder green.
We still get this method optimized even without --always-opt flag.
Review URL: http://codereview.chromium.org/6719029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 08:51:08 +00:00
ricow@chromium.org
fb6d7e17df Follow jsc on not throwing when trying to add a property to a non-extensible object.
This change makes us compatible with Safari on not throwing when trying to add a property to a non-extensible object. 
Review URL: http://codereview.chromium.org/6712059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 06:11:08 +00:00
vitalyr@chromium.org
963a75cc09 Fast TLS support.
This patch adds common infrastructure for fast TLS support and
implementation on win32. More implementations will be added soon.

Fast TLS is controlled by V8_FAST_TLS define which is enabled by
default in our gyp and scons builds. The scons build has
fasttls={on,off} option so that we can see the effects of slow TLS
when needed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-27 16:14:20 +00:00
lrn@chromium.org
40f9a7db8e Fix test that can fail for small denormals.
Review URL: http://codereview.chromium.org/6736027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-25 14:03:42 +00:00
lrn@chromium.org
1a15a9e6a9 Fix typo in math-sqrt.js
Review URL: http://codereview.chromium.org/6696109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-25 13:48:17 +00:00