Commit Graph

6406 Commits

Author SHA1 Message Date
lrn@chromium.org
480ec43c4e Make "native" not a keyword.
We now only recognize "native function" when it occurs in extension scripts
(parsing with a non-NULL extension), and only if there is no line-terminator
between "native" and "function" (so that it would otherwise be a Syntax Error).
Preparsing never recognizes native functions, which is acceptable since we
never preparse extension scripts (because we don't allow lazy functions
anyway).

BUG=v8:1097

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 10:20:57 +00:00
jkummerow@chromium.org
b789cb8c94 Crankshaft support for polymorphic array handling
Review URL: http://codereview.chromium.org/7170012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 10:19:00 +00:00
whesse@chromium.org
404434628b Prepare push to trunk. Now working on version 3.4.6.
Review URL: http://codereview.chromium.org/7212007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 09:30:54 +00:00
kasperl@chromium.org
5a547ac413 Generalized Stephen's patch from http://codereview.chromium.org/7044100/ and
added a few test cases.
Review URL: http://codereview.chromium.org/7212006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 07:40:42 +00:00
jkummerow@chromium.org
2fe5afedf3 Cleanup: use JumpIf[Not]Smi() whenever we can
Review URL: http://codereview.chromium.org/7191007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 18:32:36 +00:00
fschneider@chromium.org
280134bb36 Fix wrong parenthesis in stub ARM and MIPS generation code.
I think the problem did not manifest as a bug, since the only
consequence was to generate extra code to return heap number
results in case of the INT32-stub.
Review URL: http://codereview.chromium.org/7192006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 10:45:29 +00:00
mikhail.naganov@gmail.com
973fca1689 Fix issue 1417: check for script source availability when enumerating optimized functions.
R=kasperl@chromium.org,kmillikin@chromium.org
BUG=1417
TEST=test-log/Issue23768

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:40:30 +00:00
lrn@chromium.org
7ba9fea8b5 Fix mozilla test-expectatations to match the new behavior of multi-line comments.
Review URL: http://codereview.chromium.org/7189030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:20:27 +00:00
erik.corry@gmail.com
c95ecb1fcd Refix issue 1472. The previous fix worked for the example in the bug
report, but was not general enough to catch all cases.  This is a new
approach.  Includes regression test!
Review URL: http://codereview.chromium.org/7193007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:01:12 +00:00
lrn@chromium.org
ee59eff127 Make line-terminators inside multi-line comments count.
Now follows the specification. Follows WebKit change in revision 89100.

BUG=86431
TEST=regress-892742

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 07:23:07 +00:00
erik.corry@gmail.com
fbe89ca13e Add missing assert to Label destructor.
Review URL: http://codereview.chromium.org/7172026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 15:18:48 +00:00
karlklose@chromium.org
f4e4bc43a8 Merge arguments branch to bleeding edge (second try).
Review URL: http://codereview.chromium.org/7187007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 14:12:58 +00:00
ricow@chromium.org
b256c9c192 Reinitialize the arguments object in d8 when renewing the evaluation context (fixes issue 1477).
Review URL: http://codereview.chromium.org/7189007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 08:35:26 +00:00
jkummerow@chromium.org
a5ef18b9de Fix building in release mode with disassembler=on
BUG=v8:1473

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 07:58:47 +00:00
sgjesse@chromium.org
5efb84623b ARM: Clean up literal pool generation.
Remove dead code, and generate pools less frequently.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7108061
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 07:00:46 +00:00
karlklose@chromium.org
cc19d1e278 Revert "Merge arguments branch to bleeding merge."
This reverts commit ceb31498b9d69edca3260820fb4047045891ce6d.

TBR=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 06:37:49 +00:00
erik.corry@gmail.com
dc66620251 Avoid OOM on regexps with nested quantifiers.
http://code.google.com/p/v8/issues/detail?id=1472
Review URL: http://codereview.chromium.org/7170014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 20:15:40 +00:00
vegorov@chromium.org
14bf246dfa Add missing branches in code generated for LModI with power-of-2 divisor.
BUG=v8:1476
TEST=test/mjsunit/regress/regress-1476.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 19:57:39 +00:00
karlklose@chromium.org
6cfeb2d400 Merge arguments branch to bleeding merge.
Review URL: http://codereview.chromium.org/7167006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 15:09:28 +00:00
ricow@chromium.org
4032d2165e Make name and message non-enumerable on Error object (this is a partial fix for issue 1215)
Review URL: http://codereview.chromium.org/7172011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 13:54:40 +00:00
ager@chromium.org
939011bb25 Add a number of old tests to the mjsunit test suite.
R=kasperl@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 13:33:10 +00:00
ricow@chromium.org
b84d07767c Change DefineOrRedefineDataProperty to use local lookup (fix issue 1435).
This prevents us from normalizing when we do not need to.
Review URL: http://codereview.chromium.org/7168012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 11:41:03 +00:00
ricow@chromium.org
23d0aa614b Ensure that bound functions does not have a prototype (fixes issue 794)
Review URL: http://codereview.chromium.org/7148014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 10:47:37 +00:00
sgjesse@chromium.org
962c25bb49 MIPS: port First steps towards better code generation for LBranch.
Ported r8274 (03e42c0)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7170006
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 10:07:10 +00:00
svenpanne@chromium.org
88e94a61ff Prepare push to trunk.
Review URL: http://codereview.chromium.org/7171015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 09:58:04 +00:00
fschneider@chromium.org
e5cc31e444 Generate better branch code for instanceof-predicates.
Review URL: http://codereview.chromium.org/7168013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 09:20:24 +00:00
karlklose@chromium.org
7c13e67f52 Update an outdated comment in the CEntryStub on ARM.
R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 09:17:54 +00:00
ager@chromium.org
ef7b56bf3e Remove unused methods.
Do not force set DEBUG.

R=kasperl@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 06:51:22 +00:00
ricow@chromium.org
40fa4a761b Correctly set ReadOnly flag on indexed properties when using the API Set method (fixes issue 1470)
Review URL: http://codereview.chromium.org/7149015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 06:44:57 +00:00
kmillikin@chromium.org
9756397b76 Fix invalid assertion.
Runtime_DeclareContextSlot is used to declare global variables.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 19:26:09 +00:00
kmillikin@chromium.org
d77fa99e28 Guard an unsafe cast of a catch context's extension object.
R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 15:00:57 +00:00
fschneider@chromium.org
dc47de6732 Distinguish keyed loads with a symbol key from fast elements loads.
This change fixes the deoptimization when a keyed load is used with
a symbol key. Before we would wrongly generate a fast elements load.
Now we generate a generic keyed load instead.

BUG=1471
Review URL: http://codereview.chromium.org/7150010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 13:21:24 +00:00
vitalyr@chromium.org
d254298e3a Make valgrind happy with SparseSet.
R=ager@chromium.org
BUG=crbug.com/83626

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 12:48:25 +00:00
kmillikin@chromium.org
7d527f857f Change the representation of catch contexts.
Before, they had no extra slots and an extension object with one named
property.  Now, they use the extension slot for the property name and have
an extra slot for the thrown object.  This increases the size of the context
itself, but removes overall allocation and eliminates a level of indirection.

R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 12:16:23 +00:00
ricow@chromium.org
38a75cf731 Geve correct error message when Object.isExtensible is called on a non object (fixes issue 1452)
Review URL: http://codereview.chromium.org/7146010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 11:28:14 +00:00
svenpanne@chromium.org
a4cf7be941 First steps towards better code generation for LBranch:
* AST Expression nodes get a separate testing ID to record type info in
   ToBooleanStub later. This is necessary to avoid clashes with other uses of
   already existing IDs.

 * In order to avoid threading the condition expression through tons of places,
   TestContexts carry it now with them. Note that we will probably only need the
   testing ID of the expression, but having the whole thing at hand makes
   debugging easier. Probably we will change this later...
Review URL: http://codereview.chromium.org/7046073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 09:15:25 +00:00
sgjesse@chromium.org
906fc4cd01 Always print the deoptimization data when disassembling the generated code
R=jkummerow@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 09:10:39 +00:00
sgjesse@chromium.org
0135acd8e8 MIPS: port Refactor platform-specific code for determining shared stub for keyed load/stores.
Ported r8253 (9d8e6ab).

BUG=
TEST=

Review URL: http://codereview.chromium.org//7003141
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 06:37:56 +00:00
mikhail.naganov@gmail.com
70c4d58b5a Skip test-debug/DebuggerAgent on ARM. Issue 945.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 13:43:48 +00:00
yangguo@chromium.org
7a1977544d added explicit attributes since constructors have only one argument now.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:41:43 +00:00
yangguo@chromium.org
b2ffa68884 removed isolates from d8 since they are not necessary anymore
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:41:35 +00:00
yangguo@chromium.org
f5a0b2e749 corrected parts in d8 that accesses the new "deisolated" Thread in platform.h
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:41:26 +00:00
ager@chromium.org
b7a93d417d Add GetOwnPropertyNames method for Object in the API
Patch by Peter Varga.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:33:55 +00:00
svenpanne@chromium.org
9a1d430f32 Added two convenience methods to access an int/double argument from within a
runtime function and use these in various places.
Review URL: http://codereview.chromium.org/7003114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:15:30 +00:00
fschneider@chromium.org
5a236ce6fd Add support for hydrogen control instructions with >2 successor blocks.
This change makes the number of successors of a control instruction
configurable with a template parameter and changes the existing instructions
to use it.

To iterate over all successors I added an iterator instead of always calling
First- and SecondSuccessor.
Review URL: http://codereview.chromium.org/7114004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:09:48 +00:00
mikhail.naganov@gmail.com
508b22c436 "Deiceolate" Thread classes.
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.

This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.

As a side effect, we have also fixed the DebuggerAgent test.

Thanks to Vitaly for help in fixing isolates handling!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
ager@chromium.org
aa7ad8ee9d Fix issue 1447 by not redefining properties unneccesarily in seal and freeze.
This avoids attempting to redefine function.arguments with a different
value than the current one. function.arguments returns a new copy on
each invocation.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:45:02 +00:00
mikhail.naganov@gmail.com
47248cc5fe Revert accidental r8254..r8256
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
e1db94c0cb trying to fix test
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:36:35 +00:00
mikhail.naganov@gmail.com
6891dd204c tests compile but crash
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:36:18 +00:00