Commit Graph

5800 Commits

Author SHA1 Message Date
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
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
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
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
f05fd92994 remove isolate reference from threads
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:35:31 +00:00
danno@chromium.org
bc4156ca7c Refactor platform-specific code for determining shared stub for keyed load/stores.
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 07:49:49 +00:00
sgjesse@chromium.org
870ef6bdfe Remove the flag --debug-info
This flag has not bees set to false for years, and even when building without debugging support the position information is required for stack traces.

R=ager@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 07:15:46 +00:00
sgjesse@chromium.org
2481f0fc59 MIPS: port Dispatch on ElementsKind rather than ExternalArrayType ...
Port r8244 (c90151c)

Orig commit msg:
Dispatch on ElementsKind rather than ExternalArrayType when generating ICs
and Crankshaft code for many element operations. This is preparation to be
able to share more code in the various element accessor implementations.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 07:14:34 +00:00
sgjesse@chromium.org
f8ff2b00fa MIPS: port Link function contexts directly to the previous context.
Ported r8238 (7803ed7)

This commit would have also included changes to macro-assembler-mips.cc,
however Kevin M. did those changes in later commit r8248. (thx!)

BUG=
TEST=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 07:13:07 +00:00
sgjesse@chromium.org
2cdddbf89f MIPS: port Link function contexts directly to the previous context.
Ported r8238 (7803ed7)

This commit would have also included changes to macro-assembler-mips.cc,
however Kevin M. did those changes in later commit r8248. (thx!)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 07:09:14 +00:00
kmillikin@chromium.org
9ecfdb340c Use the previous context link when checking context extension objects.
In generated code, when walking the context to inspect context extension
objects, use the previous context link directly.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 17:44:50 +00:00
danno@chromium.org
7c26e7143f Fix bogus unreachable in debug code.
BUG=none
TEST=none
TBR=jkummerow@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 16:20:41 +00:00
fschneider@chromium.org
424407c727 Simplify the check when to perform loop invariant code motion.
Allow HChange instructions to be hoisted out of loops. To avoid
unnecessary code motion we don't hoist instructions from blocks that
have been marked containing an unconditional deoptimization.
Review URL: http://codereview.chromium.org/7003087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 15:49:21 +00:00
danno@chromium.org
9f432cd159 Dispatch on ElementsKind rather than ExternalArrayType when generating ICs and Crankshaft code for many element operations. This is preparation to be able to share more code in the various element accessor implementations.
Merge logic to maintain external array and fast element stub caches.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 15:19:37 +00:00
yangguo@chromium.org
d5951b8ef9 fixed style mistake found in presubmit.py
Review URL: http://codereview.chromium.org/6995110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 15:07:45 +00:00
ager@chromium.org
8ec22db350 Correct the limit of local variables in a optimized functions.
The encoding constraint is that we have 128 values. We use [-64,0] for
parameters and [0,63] for locals. However, for locals we restricted to
64 and not 63.

R=kmillikin@chromium.org
TEST=mjsunit/compiler/regress-max-locals-for-osr.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 14:52:58 +00:00
yangguo@chromium.org
3f80bacffb added --stress-opt option to d8
Review URL: http://codereview.chromium.org/7134040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 14:28:49 +00:00
svenpanne@chromium.org
03a6c2b6af Moved non-architecture-specific GetFooCodeStub functions to ic.cc, removing
duplicate code and the need for 2 free-floating function prototypes.
Review URL: http://codereview.chromium.org/7134043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 13:26:18 +00:00
kmillikin@chromium.org
4b96218589 Link function contexts directly to the previous context.
Instead of NULL in the previous field of function contexts, put the previous
context.  This saves the indirection of fetching the previous through the
context's closure.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 12:45:26 +00:00
whesse@chromium.org
c40aa827bf Add boolean flag to HChange and LNumberUntagD to not convert undefined to NaN.
This is needed so that HCompare, optimized for double inputs, works correctly on undefined inputs.
BUG=v8:1434
TEST=mjsunit/bugs/bug-1434.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 12:27:28 +00:00
kmillikin@chromium.org
371af773cf A collection of context-related refactoring changes.
Introduce separate maps for function and with contexts.  Use the function
context map for testing whether a context is a function context (global
contexts are no longer function contexts).

Split the paths for allocating with and catch contexts.

Rename some functions.  Generally refactor code to make it simpler.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 11:26:01 +00:00
fschneider@chromium.org
68eab4a8d8 Fix bug with GVN on array loads.
This fixes a bug where an array load was incorrectly hoisted by GVN.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 11:15:03 +00:00
danno@chromium.org
4de3bb500c Implement core support for FixedDoubleArrays.
Under a flag without IC or Crankshaft support.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 10:03:35 +00:00
sgjesse@chromium.org
62a65fcc67 Add support for building Xcode project files from GYP files
Removed the current Xcode project file.

Fixed a few places where the C++ compiler supplied with Xcode produced warnings.
Review URL: http://codereview.chromium.org/7134016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 09:07:17 +00:00
ager@chromium.org
626cdffaef Fix Array.prototype.{reduce,reduceRight} to pass undefined as receiver for strict mode callbacks.
Propagate strict mode information from pre-parser to parser for lazily compiled functions.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 09:05:15 +00:00
sgjesse@chromium.org
94be13e794 MIPS: port Stop using with explicitly to implement try/catch.
Port r8224 (bdec5d6)

Original commit message:
The AST for TryCatch gives us enough structure that we do not need to expand
it to explicitly include a with. Try/catch is still handled the same as
before at runtime.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 07:06:15 +00:00
kmillikin@chromium.org
6304b12680 Fix lint error. TBR.
R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 14:11:29 +00:00
kmillikin@chromium.org
e9a1ffde92 Stop using with explicitly to implement try/catch.
The AST for TryCatch gives us enough structure that we do not need to expand
it to explicitly include a with.  Try/catch is still handled the same as
before at runtime.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 13:55:33 +00:00
fschneider@chromium.org
699d17c3b9 Remove unused function form hydrogen instructions.
Review URL: http://codereview.chromium.org/7044045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 12:22:06 +00:00
fschneider@chromium.org
2dc734c108 Cleanup unused lithium instructions.
Instructions that have side effects can never have EmitAtUses() true.
These instructions (CmpTAndBranch, InstanceOfAndBranch) are therefore
never generated and can therefor be safely removed.
Review URL: http://codereview.chromium.org/7031074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 10:51:51 +00:00
mikhail.naganov@gmail.com
59485c1060 Add snapshot compression support into d8.
I'm not bothering with compressing d8.js, since it makes no sense,
but it is also possible.

R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 09:00:25 +00:00
jkummerow@chromium.org
6beeec3009 Prepare push to trunk. Now working on version 3.4.4.
R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 08:58:59 +00:00
lrn@chromium.org
bd826d54f5 Fix bug in Object.defineProperty where a growing lements dictionary was ignored.
TEST=mjsunit/object-define-property

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 08:13:31 +00:00
sandholm@chromium.org
b5144668cd Specialize JSON parser to only check for SequentialAsciiString once.
Review URL: http://codereview.chromium.org/7134010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 08:09:48 +00:00
erik.corry@gmail.com
3a824b86ac Revert 8133: Lower heap size limits on systems that are short
of virtual memory.
Review URL: http://codereview.chromium.org/7041004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 07:28:31 +00:00
vitalyr@chromium.org
2bc305cd9a Fix bug 1433: clear the global thread table when an isolate is disposed.
R=ager@chromium.org
BUG=v8:1433
TEST=test-lockers/Regress1433

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 18:33:03 +00:00
vitalyr@chromium.org
7ff41d4322 Reduce TLS overhead in v8::TryCatch.
R=vegorov@chromium.org
BUG=v8:1426

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 15:01:52 +00:00
vitalyr@chromium.org
a07bd45c29 Clean up a few TODO(isolates).
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 13:09:01 +00:00
ager@chromium.org
f2d5710b8b Convert time zone name to UTF8 on Windows.
R=sgjesse@chromium.org
BUG=v8:1290

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 11:53:49 +00:00
whesse@chromium.org
1ea14c2041 Limit the number of arguments in a function call to 32766.
Limit the number of arguments in a function call to 32766.  This is identical
to the limit on the number of parameters to a function.

BUG=v8:1413
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 08:15:47 +00:00
mikhail.naganov@gmail.com
3b2470d296 Fix presubmit errors catched by a more recent version of cpplint.py.
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].

BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).

AFTER an access control section there should be no blank line.

TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
mikhail.naganov@gmail.com
17d45d3537 Fix typo: RetainedSizeCalculator::reained_size -> retained_size
TBR=sgjesse@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 05:10:27 +00:00
mikhail.naganov@gmail.com
2373771d2e Fix presubmit after r8189
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 20:58:25 +00:00
mikhail.naganov@gmail.com
f1309b0417 Compress sources of JS libraries in addition to the snapshot.
This saves ~170K on current sources.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 20:47:30 +00:00
vitalyr@chromium.org
da40f3da1d Update comments in the global handles interface.
(I also reordered functions in the .cc file to match the order in the
.h file.)

R=antonm@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 16:18:59 +00:00
vitalyr@chromium.org
37eb9b3031 Kill some dead code: classic frame element and const lists.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 15:43:08 +00:00
vitalyr@chromium.org
5872e8ee2f Refactor storage of global handles.
We used to have a linked list of nodes that were internally
block-allocated.

I kept the node blocks and put them on two lists: 1) the list of all
allocated blocks, 2) the list of blocks with used nodes. (1) is used
to reclaim blocks and (2) is used for traversal during GC. To make
traversal on scavenges faster the nodes holding new space objects are
grouped in an auxiliary array.

This changes the minimal memory usage from 5 words per global handle
to 4. Additional word is used for new space handles.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 15:23:04 +00:00
fschneider@chromium.org
7c9cf0b3a1 Re-land r8140: Deoptimize on never-executed code-paths.
Original cl: http://codereview.chromium.org/7105015

I'm removing the test GlobalLoadICGC test that was introduced for testing
inlined global cell loads (in the classic backend) and has an invalid assumption
about the number of global objects referenced from a v8 context. We don't have
this feature with Crankshaft anymore.
Review URL: http://codereview.chromium.org/7112032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 14:57:25 +00:00
ager@chromium.org
0c1702b199 Don't use SmartSlice just because the receiver is an array.
Only do so if the estimated number of elements is low compared to the
end position for the slice. This is similar to other heuristics used
for array operations that use the %GetElementKeys runtime function.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 13:28:44 +00:00
jkummerow@chromium.org
c0a0c82b70 Per-Isolate cache for polymorphic stubs
BUG=1385
TEST=Existing tests still pass; running d8 with --dump-counters shows fewer polymorphic stubs being compiled

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 13:15:11 +00:00
kmillikin@chromium.org
6a81642f31 Fix a bug in Lithium environment iteration.
The Advance() function of the class responsible for iterating
environment uses didn't always advance as far as it could (relying on
the HasNext predicate to finish advancing).  This is brittle.

The HasNext predicate also didn't advance as far as it could when it
was at the end of an environment level.  This is a bug.

R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 11:30:17 +00:00
erik.corry@gmail.com
0546584945 Prepare push to trunk. Now working on version 3.4.3.
Review URL: http://codereview.chromium.org/7058068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 09:13:06 +00:00
ager@chromium.org
2ac8e0ee5d MIPS: port Add complete ElementsKind information directly to Map for objects with elements.
Ported commits: r8162 (c56f802)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 08:49:15 +00:00
ager@chromium.org
0163b443d2 MIPS: port Implement set trap for proxies, and revamp class hierarchy in preparation
Ported commits: r8126 (6461bae)

Original commit message:
- Introduce a class JSReceiver, that is a common superclass of JSObject and
JSProxy. Use JSReceiver where appropriate (probably lots of places that we
still have to migrate, but we will find those later with proxy test suite).
- Move appropriate methods to JSReceiver class (SetProperty,
GetPropertyAttribute, Get/SetPrototype, Lookup, and so on).
- Introduce new JSFunctionProxy subclass of JSProxy. Currently only a stub.
- Overhaul enum InstanceType:
* Introduce FIRST/LAST_SPEC_OBJECT_TYPE that ranges over all types that
represent JS objects, and use that consistently to check language types.
* Rename FIRST/LAST_JS_OBJECT_TYPE and FIRST/LAST_FUNCTION_CLASS_TYPE
to FIRST/LAST_[NON]CALLABLE_SPEC_OBJECT_TYPE for clarity.
* Eliminate the overlap over JS_REGEXP_TYPE.
* Also replace FIRST_JS_OBJECT with FIRST_JS_RECEIVER, but only use it where
we exclusively talk about the internal representation type.
* Insert JS_PROXY and JS_FUNCTION_PROXY in the appropriate places.
- Fix all checks concerning classification, especially for functions, to
use the CALLABLE_SPEC_OBJECT range (that includes funciton proxies).
- Handle proxies in SetProperty (that was the easiest part :) ).
- A few simple test cases.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 08:47:27 +00:00
erik.corry@gmail.com
df55d43103 Fix asserts in StartPreemption and StopPreemption.
Review URL: http://codereview.chromium.org/7054070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 08:45:42 +00:00
ager@chromium.org
74db440d9f MIPS: Fixed FPU rounding checks and related errors in the Simulator.
Removed some unnecessary shifts when reading FCSR error flags.
Fixed some FCSR-related bugs.
Fixed some un-related style issues.

With this commit, mips build is still broken. Two more commits to come.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 08:43:15 +00:00
karlklose@chromium.org
799c3e92b9 ARM: Add optimization for constant RHS in DoMulI.
Patch by ARM Ltd.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 07:47:21 +00:00
mikhail.naganov@gmail.com
f09d3ac1c6 Define stubs for implementations of v8-profiler.h API when profiling is disabled
TBR=sgjesse@chromium.org
BUG=https://bugs.webkit.org/show_bug.cgi?id=62014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 19:45:59 +00:00
erik.corry@gmail.com
0023cacc22 Fix traversal of the map transition tree to take the prototype
transitions into account.
Review URL: http://codereview.chromium.org/7074052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 14:48:09 +00:00
ager@chromium.org
22b5dfd395 Reapply: "Make instanceof and Object.getPrototypeOf work for proxies,
plus a few other tweaks."

The problem with the original patch was that it did not take hidden
prototype objects into account in Runtime_GetPrototype.

R=kmillikin@chromium.org,rossberg@chromium.org
TEST=es5conform

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 10:15:49 +00:00
ager@chromium.org
945bd3e70c Report out of memory if we cannot allocate memory for the deoptimization table.
Currently we pass a null pointer to memcpy. We will crash either way,
but going through FatalProcessOutOfMemory makes it clear what is going
on.

R=kmillikin@chromium.org
BUG=http://crbug.com/84717

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 10:11:10 +00:00
danno@chromium.org
eee5e6c3fc Add complete ElementsKind information directly to Map for objects with elements.
Review URL: http://codereview.chromium.org/6966041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 07:41:37 +00:00
dslomov@chromium.org
24d81fc39c Patch by Luke Zarko.
Fix building with gdbjit=on

Issue 7101011: http://codereview.chromium.org/7101011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-02 17:50:02 +00:00
mikhail.naganov@gmail.com
5112f7f0c6 Add curly braces to if / else clauses after r8152
TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-02 11:22:26 +00:00
ager@chromium.org
ece7700d7c Revert "Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks."
This change caused errors in es5conform tests for getPrototypeOf.

TBR=rossberg@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-02 10:12:00 +00:00
mikhail.naganov@gmail.com
b4c152545d Revert "Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files"
Breaks compilation on Linux.

This reverts commit e72c5b1d69fb2cb2d5973f172666dd5d477e6f7e.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 23:11:10 +00:00
mikhail.naganov@gmail.com
d61022a86e Fix presubmit errors after r8152
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 23:09:18 +00:00
mikhail.naganov@gmail.com
e10bedee78 [Linux] Do not install SIGPROF handler until we
start CPU profiling.

TBR=vitalyr@chromium.org
BUG=1344,crbug/79320,crbug/83521
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 22:12:05 +00:00
cira@chromium.org
a60085b28a Re-landing http://codereview.chromium.org/7014019.
Adding DateTimeFormat class to i18n API with following methods:

- format
- getWeekdays
- getMonths
- get Eras
- getAmPm

Difference from the reverted revision:

Removed all references to v8/src, like ASSERT_EQ.

All #includes have full path to include/v8.h or extension headers.

TEST=Visit i18n.kaziprst.org/datetimeformat.html
Review URL: http://codereview.chromium.org/7105002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 21:10:56 +00:00
rossberg@chromium.org
2255860992 Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks.
R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 17:44:08 +00:00
peter.rybin@gmail.com
d7b7d7f844 Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files
Review URL: http://codereview.chromium.org/7080029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 17:05:35 +00:00
sandholm@chromium.org
f6901ea747 Untank compilation and fix JSON parse bug introduced in r8147.
Review URL: http://codereview.chromium.org/7020028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 14:55:55 +00:00
sandholm@chromium.org
3ed8c2f520 Remove scanner abstraction layer from JSON parsing.
Review URL: http://codereview.chromium.org/7020018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 14:06:30 +00:00
fschneider@chromium.org
ff76d1ab0c Revert r8140.
It breaks test when running with nosnapshot.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/7027029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 13:34:15 +00:00
kmillikin@chromium.org
27f2f6aa0b Delay processing of declarations for inlining candidates.
Processing the declarations in an inlining candidate must be performed
after constructing the Hydrogen environment of the candidate function.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 13:26:30 +00:00
sandholm@chromium.org
f942c16ee9 Removing white spaces introduced in r8142.
Review URL: http://codereview.chromium.org/7025005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 12:24:55 +00:00
sandholm@chromium.org
ec534af392 Ensure strings are never externalized as a side-effect of doing a GC.
Review URL: http://codereview.chromium.org/7105016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 11:46:14 +00:00
erik.corry@gmail.com
6d7d3b8d77 Fix compilation on OpenBSD. Patch from Robert Nagy in
http://code.google.com/p/v8/issues/detail?id=1420
Review URL: http://codereview.chromium.org/7104024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 11:09:32 +00:00
fschneider@chromium.org
0aa422923c Eagerly deoptimize on never-executed code-paths.
If type-feedback indicates that an expression was never executed in
the non-optimized code, we insert a forced deoptimization right away
to enable re-optimization if we ever hit this path.

With this change we still continue to build the graph. As a next step, we
should remove the dead code after the deoptimize.

I had to remove one assert about the optimization status in a test since
we now immediately deoptimize after exiting the loop that triggers OSR.

Also remove a restriction that control-flow from an inlined function in a
test context always reaches both true- and false-target.
Review URL: http://codereview.chromium.org/7105015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 11:04:40 +00:00
kmillikin@chromium.org
d985af520e Disable context-allocated const variables.
We intended them to be fully disabled for now, but there was a missing
check at initialization time.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 09:12:22 +00:00
sgjesse@chromium.org
56de6f750a MIPS: port Fix receiver for calls to strict-mode and builtin functions ....
Fix receiver for calls to strict-mode and builtin functions that
are potentially shadowed by eval.

Port r8116 (e8a1e4842) to mips.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 09:06:46 +00:00
sgjesse@chromium.org
d7f2f83b3b MIPS:port Reapply change to Pass undefined to JS builtins when called with implicit receiver.
Port r8110 (0a6ff3a) to mips.

Some mips work was in original commit. Fixed bug due to Generate_ArgumentsAdaptorTrampoline
using the dedicated CallKind reg (t1) as a temporary.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 09:05:44 +00:00
sgjesse@chromium.org
dae365948c MIPS: port Fix a number of IC stubs to correctly set the call kind.
Ported r8109 (7ab86acc) to mips.

Original commit message:
Make the call kind and call wrapper arguments explicit to force
developers to make a choice. This would have avoided the bug in the
first case.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 09:01:57 +00:00
sgjesse@chromium.org
ad55fbc34d MIPS: port Prevent deopt on double value assignment to typed arrays
Ported r8077 (defc4f9b) to mips.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 08:58:19 +00:00
sgjesse@chromium.org
bbfd202c81 ARM: Be consistent about the condition codes used with CompareObjectType
Now the signed comparison condition codes are always used with CompareObjectType. The type is only a byte and ldrb will do sign extension, so signed and unsigned comparison will give the same result. Signed condition codes are easier to read.

R=erik.corry@gmail.com

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 08:54:30 +00:00
erik.corry@gmail.com
955e6a2496 Lower heap size limits on systems that are short of virtual memory.
Review URL: http://codereview.chromium.org/7020020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 08:49:18 +00:00
svenpanne@chromium.org
15cb93ed62 Ooops, forgot to commit the renamings in Hydrogen for issue 6976028....
TBR=danno@chromium.org
Review URL: http://codereview.chromium.org/7105014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 07:11:25 +00:00
ricow@chromium.org
68c20c7f9f Prepare push to trunk. Now working on version 3.4.2.
Review URL: http://codereview.chromium.org/7090002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 05:48:51 +00:00
peter.rybin@gmail.com
8f2274c841 LiveEdit: Optimize compare by stripping common suffix and prefix.
Review URL: http://codereview.chromium.org/7087031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 20:58:21 +00:00
cira@chromium.org
ab00b00a87 Removed all references to v8/src from i18n extension code.
Removed I18N enum from v8/src/natives.h

Removed use of Vector and natives.h from i18n-extension.cc. Added new
python script that generates i18n-js.cc from i18n.js.

Made all paths absolute pointing to either v8/include or
v8/src/extensions/experimental.

Exported -Iv8 for embedders (-Iv8/include was there already).
Review URL: http://codereview.chromium.org/7077012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 17:21:28 +00:00
rossberg@chromium.org
670f947a5c Implement set trap for proxies, and revamp class hierarchy in preparation:
- Introduce a class JSReceiver, that is a common superclass of JSObject and
  JSProxy. Use JSReceiver where appropriate (probably lots of places that we
  still have to migrate, but we will find those later with proxy test suite).

- Move appropriate methods to JSReceiver class (SetProperty,
  GetPropertyAttribute, Get/SetPrototype, Lookup, and so on).

- Introduce new JSFunctionProxy subclass of JSProxy. Currently only a stub.

- Overhaul enum InstanceType:
  * Introduce FIRST/LAST_SPEC_OBJECT_TYPE that ranges over all types that
    represent JS objects, and use that consistently to check language types.
  * Rename FIRST/LAST_JS_OBJECT_TYPE and FIRST/LAST_FUNCTION_CLASS_TYPE
    to FIRST/LAST_[NON]CALLABLE_SPEC_OBJECT_TYPE for clarity.
  * Eliminate the overlap over JS_REGEXP_TYPE.
  * Also replace FIRST_JS_OBJECT with FIRST_JS_RECEIVER, but only use it where
    we exclusively talk about the internal representation type.
  * Insert JS_PROXY and JS_FUNCTION_PROXY in the appropriate places.

- Fix all checks concerning classification, especially for functions, to
  use the CALLABLE_SPEC_OBJECT range (that includes funciton proxies).

- Handle proxies in SetProperty (that was the easiest part :) ).

- A few simple test cases.

R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 16:38:40 +00:00
erik.corry@gmail.com
7a1a72c701 Revert 8122 (stub call asserts) while test failures are investigated.
Review URL: http://codereview.chromium.org/7050039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 15:21:25 +00:00
svenpanne@chromium.org
6453056bb6 Reduced the code ping-pong between the full code generator and contexts a bit.
* Centralized AND/OR handling, keeping related code together.

* Removed HandleExpression/HandleInNonTestContext and introduced VisitInSameContext instead, making it more obvious what's actually going on.

* Consistently use a new context when visiting the left sub-expression of an AND/OR. Note that the context stacks in the full code generator and crankshaft are still a bit out of sync for the right sub-expression.
Review URL: http://codereview.chromium.org/6976028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 14:37:34 +00:00
vegorov@chromium.org
d71adb6d22 Fix two bugs in LiveRange::SplitAt:
- when splitting at the beginning of the UseInterval we need to find an interval preceding it.

- we need to reset cached iteration state after splitting.

BUG=v8:1410

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 13:35:52 +00:00
erik.corry@gmail.com
c5fc4b9099 Add asserts and state tracking to ensure that we do not call
into C++ without having a valid stack frame that can be
traversed at GC.
Also add asserts to track that we do not try to generate a stub
while we are generating a stub, since the stub creation code is
not GC safe.
Review URL: http://codereview.chromium.org/7084032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 12:38:45 +00:00
kmillikin@chromium.org
00f2ff321e Support optimization of named function literals.
Introduce a Hydrogen value for the value denoted by the function name.

R=fschneider@chromium.org,mnaganov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 11:54:46 +00:00
ager@chromium.org
544191e718 Update apply with arguments optimization for strict mode functions and builtins.
Do not convert to object for values for strict-mode functions and
builtins.

R=ricow@chromium.org
BUG=v8:1412
TEST=mjsunit/regress/regress-1412.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 10:38:41 +00:00
jkummerow@chromium.org
4ba07be98f Add support for external arrays to d8
Review URL: http://codereview.chromium.org/7053038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 09:42:17 +00:00
svenpanne@chromium.org
dcb558fdf0 Push the general AST id field down from ASTNode to Expression.
Almost all uses were below Expression already, only a single use in IfStatement
had to be handled explicitly (probably an oversight from earlier changes?). This
is a small step towards a less ad-hoc handling of IDs in the front end.
Review URL: http://codereview.chromium.org/7054034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 09:34:37 +00:00
ager@chromium.org
bfa2ef1f11 Fix receiver for calls to strict-mode and builtin functions that are
potentially shadowed by eval.

R=sgjesse@chromium.org
TEST=mjsunit/regress/regress-124.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 07:57:22 +00:00
sgjesse@chromium.org
e497896181 Fix building with profilingsupport=off
Using profilingsupport=off is not recommended as it will turn off crankshaft. With this change it will build though.

R=erik.corry@gmail.com

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 14:33:23 +00:00
mikhail.naganov@gmail.com
cd67929b0b Heap profiler: fetch document.URL of global objects.
This allows to distinguish DOMWindow objects in browser from each other.

R=vitalyr@chromium.org,sgjesse@chromium.org
BUG=https://bugs.webkit.org/show_bug.cgi?id=61177
TEST=cctest/test-heap-profiler/DocumentURL

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 14:31:47 +00:00
ager@chromium.org
017935408d Reapply change to 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=fschneider@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 13:49:22 +00:00
ager@chromium.org
cc4a2d7e76 Fix a number of IC stubs to correctly set the call kind.
Make the call kind and call wrapper arguments explicit to force
developers to make a choice. This would have avoided the bug in the
first case.

R=fschneider@chromium.org
TEST=mjsunit/strict-mode-implicit-receiver.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 13:23:17 +00:00
fschneider@chromium.org
e0985887bf Simple support for const variables in Crankshaft.
The approach is to handle the common case in the optimizing
compiler and to bailout for the rare corner cases.

This is done by initializing all local const-variables with
the hole value and disallowing any use of the hole value statically.
Review URL: http://codereview.chromium.org/6026006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 11:31:41 +00:00
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
svenpanne@chromium.org
683baa1682 Removed dead flags.
Review URL: http://codereview.chromium.org/7077028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 09:42:28 +00:00
sandholm@chromium.org
1feea6bbaa Minor JSON cleanup. Also added comment requested for r8086.
Review URL: http://codereview.chromium.org/7086026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 09:23:17 +00:00
ricow@chromium.org
5fd5471a1b Prepare push to trunk. Now working on version 3.4.1.
Review URL: http://codereview.chromium.org/7087025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 08:43:52 +00:00
ricow@chromium.org
46100d9cef Allocate normal register for LDoubleToI in DoToInt32 (fixes no-sse3 issue)
Review URL: http://codereview.chromium.org/7083021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 07:53:21 +00:00
kmillikin@chromium.org
44964bc90f Remove unused DummyScope implementation.
R=lrn@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 07:38:45 +00:00
kmillikin@chromium.org
add593da22 Simplify the Scope API.
Eliminate the LocalType enum in favor of a pair of functions, one for var
and const declarations and one for parameters.  Move the responsibility for
adding a parameter variable to the Scope's internal data structure into the
Scope and out of the parser.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 07:33:12 +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
sandholm@chromium.org
0b06fa3dcc Fix Win compilation issue introduced in r8081.
Review URL: http://codereview.chromium.org/7074009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 14:41:11 +00:00
ricow@chromium.org
3f8a191725 Double allocation size for special json strings on every resize (fixes
crbug 83877)

The issue was that with the relatively small start and increment size of the string we created a ton of string handles when scanning a large string with special characters (500k+ in this case).

In addition, since we can not be sure the the newly allocated string
is in newspace a check is introduced and if not a filler object is
inserted instead of shrinking.
Review URL: http://codereview.chromium.org/7075009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 14:03:30 +00:00
sandholm@chromium.org
331e6102e6 JSON.stringify improvement. Fast case in C++ for string arrays.
Review URL: http://codereview.chromium.org/7077004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 13:58:48 +00:00
sgjesse@chromium.org
5cd77037aa ARM: Avoid using ldrd/strd with post increment
These instructions seems to cause problems in some situations. This reverts parts of r7873.

R=erik.corry@gmail.com

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 13:52:14 +00:00
danno@chromium.org
665219b8a7 Fix stray character in last build
TBR=kmillikin@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 12:16:13 +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
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
kmillikin@chromium.org
68e2d1bfed Do not allow inlining functions with direct arguments access.
Our implementations of arguments without materializing the arguments
object (based on inspecting the stack frame) does not work for inlined
functions.  Guard all attempts by disallowing them if possible or else
bailing out of the optimizing compiler.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 10:56:07 +00:00
sgjesse@chromium.org
64c610727d MIPS: Added the stop() instruction with same behavior as on Arm simulator.
The already working watchpoint break mechanism has been extended to handle "stop" instructions, with text messages.

Explanation (also in constants-mips.h):
On MIPS Simulator breakpoints can have different codes:
- Breaks between 0 and kMaxWatchpointCode are treated as simple watchpoints, the simulator will run through them and print the registers.
- Breaks between kMaxWatchpointCode and kMaxStopCode are treated as stop() instructions (see Assembler::stop()).
- Breaks larger than kMaxStopCode are simple breaks, dropping you into the debugger.

The current values are 31 for kMaxWatchpointCode and 127 for kMaxStopCode.
From the user's point of view this works the same way as the ARM stop instruction except for the break code usage detailed above.

Ported commits: r5723 (3ba78d24)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 07:46:18 +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
sgjesse@chromium.org
01395613da MIPS: port Fix GC-unsafe corner case in bit-not on ARM.
Port r8055 to mips.
(5b50df9c)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 07:02:35 +00:00
cira@chromium.org
46c7ddd9a8 Landing http://codereview.chromium.org/7033038 for jshin.
Make 'ignoreCase' work in collator. 

BUG=28604
TEST=http://www.i18nl10n.com/chrome/coll.html
Review URL: http://codereview.chromium.org/7008023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 22:18:41 +00:00
vitalyr@chromium.org
b230249a98 Add fast cases for flat comparison to String::Is{Ascii,TwoByte}EqualTo.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 17:07:05 +00:00
erik.corry@gmail.com
210fed7be8 Untank the build.
Review URL: http://codereview.chromium.org/6992061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 12:40:04 +00:00
erik.corry@gmail.com
e5fc9762f6 Add comment better explaining the calling-stubs-from-stubs issue.
Review URL: http://codereview.chromium.org/7031046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 12:26:15 +00:00
vegorov@chromium.org
65e406ed0d Add a comment about map collection into MarkCompactCollector::MarkUnmarkedObject.
Review URL: http://codereview.chromium.org/6992059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 10:49:48 +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
danno@chromium.org
2f36b16343 Prepare push to trunk. Now working on version 3.4.0.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 07:37:14 +00:00
sgjesse@chromium.org
e8918bb7c7 MIPS: Fixed two bugs related to double function calls.
These originated from 4dfb7f2e.
This fixes cctest test-api/ConversionNumber in soft-float mode.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 06:41:39 +00:00
ager@chromium.org
b92ef0be32 MIPS: port Fix calls of strict mode function with an implicit receiver.
Port of r8040 to mips.

Original commit message:
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.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 06:04:01 +00:00
danno@chromium.org
2489594d71 Migrate flag from bit_field2 to bit_field3
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 21:07:55 +00:00
whesse@chromium.org
cc14935ddf Ensure that external pixel arrays use a byte register in Crankshaft.
BUG=v8:1406
TEST=fast/canvas/canvas-putImageData.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 16:23:22 +00:00
whesse@chromium.org
ce77e9499d Remove some dead code from full-codegen on all platforms.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 15:11:48 +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
whesse@chromium.org
583afefab5 Modify use of RelocInfo::CODE_TARGET_WITH_ID in full-codegen to make it the same on all platforms.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 13:48:55 +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
fschneider@chromium.org
5552dbccdd Rename TypeRecording...Stub into ...Stub.
There is no need for this long name.
Review URL: http://codereview.chromium.org/7063017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:20:16 +00:00
ricow@chromium.org
3c7e1d7015 Create stand-alone json parser (including scanner).
The current json parser and scanner inherits fromt he normal scanners and parsers,
which are more complicated than we need for parsing json.

The supplied scanner works directly on the string supplied and has a
fast case mode for scanning only ascii characters (it will simply
create a substring or a symbol directly from the existing string). To
allow for creating symbols from a substring I have added a
SubStringAsciiSymbolKey that creates the hash based from our string
without extracting the sub-string. In case we need to add the symbol
it simply creates the symbol directly from the characters inside the
given string.
Review URL: http://codereview.chromium.org/7039037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:16:23 +00:00
kmillikin@chromium.org
0e76bfeae7 Fix a bug in deoptimization on x64.
When deoptimizing to just after an ignored (because of a duplicate
property name) object literal property initializer, we incorrectly saw
the value of the initializer expression on the stack in the
unoptimized code.  The bug affected x64 only.

R=fschneider@chromium.org
BUG=v8:1404

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:12:41 +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
danno@chromium.org
59a7ce37a6 Fix poliarty of CheckMap smi check on ia32
R=karlklose@chromium.org
BUG=none
TEST=existing tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 08:59:51 +00:00
fschneider@chromium.org
a3853feed2 Remove wrong assert to fix a debug crash with arguments object.
We don't need to assert the existence of a length-property of the
arguments object because it is not a JSArray, but just a normal JSObject.

BUG=v8:1227
Review URL: http://codereview.chromium.org/7064020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 08:38:42 +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
sgjesse@chromium.org
9891a057e1 MIPS: Update for 23-May commits, and a few older ones.
Make mips-specifc changes for r7999, r8001, r8002.

Also bring in changes for older commits 7203, 7279, 7693, 7715, 7788.

Mips changes for 7715 (Arm: Support hardfloat in SCons build), and
7693 (Implement hardfloat calling convention in macro assembler and simulator)
resulted in changes to SConstruct.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 07:23:32 +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
karlklose@chromium.org
b082e6cc73 Remove stub call in non-VFP3 code path of external array load.
KeyedLoadStubCompiler::GenerateLoadExternalArray is tail-calling a stub, which it is not allowed to, because its major key is higher than InstanceOf. Instead of changing the major key I decided to provide an inline implementation.

TEST=test-api/ExternalArrays with --noenable-vfp3

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 16:17:40 +00:00
danno@chromium.org
70d5e6d582 Add bit_field3 to Map objects
Reuse instance_descriptor field in the map to store additional flags when there are no descriptors. When descriptors get added to the map, move the flags to the DescriptorArray and access through indirection.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 15:59:38 +00:00
whesse@chromium.org
d88dbf27f5 Avoid calling ToObject on JSFunction receiver arguments for Function.call and Function.apply.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 15:17:10 +00:00
danno@chromium.org
b21987203e Ensure SMI check for receiver in external array store stub for ARM.
R=ager@chromium.org
BUG=none
TEST=test/mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 15:04:32 +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
vitalyr@chromium.org
3c689b33e8 Use placement new for ZoneLists in the parser.
Review URL: http://codereview.chromium.org/7059012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 13:00:11 +00:00
vitalyr@chromium.org
69bc282fd6 Isolates cleanup: get rid of some ugly macros.
Review URL: http://codereview.chromium.org/7062003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 12:59:02 +00:00
sgjesse@chromium.org
0e0b1b2da9 Optimise the deoptimisation check to improve performance on modern ARM cores.
BUG=none
TEST=none

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

Reverted in r7916.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 12:48:17 +00:00
danno@chromium.org
a86e0b7708 Add missing SMI checks to fix reliability bots
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 11:40:36 +00:00
sgjesse@chromium.org
a1bcafab69 Improve bit tests on IA32.
Bit tests with a memory operand should be avoided on Intel processors.
On Atom bts with a memory operand has 10~11 cycles latency and on Core 2
it has 5~6 cycles latency, and also produces multiple uops.
If the bit base operand is a register the latency is 1 cycle instead.
This CL improves several cases from Kraken 1.1 benchmark on Atom. For example,
12% for imaging-desaturate, 8% for audio-fft, and 5% for audio-beat-detection.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 10:47:43 +00:00
kasperl@chromium.org
e8277a0ab5 Changed d8 to print exception stack traces like samples/shell.cc.
Review URL: http://codereview.chromium.org/7060006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 10:41:02 +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
rossberg@chromium.org
b5223ab7a6 Fix object visitor.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 09:11:24 +00:00
ager@chromium.org
5765e8a9c0 Experimental i18n extension breaks shared library build. Revert recent
changes to unblock V8 release.

Revert "Adding DateTimeFormat class to i18n API with following methods:"

Revert "Some internal methods are requested when v8 is built as DLL (V8_SHARED), and"

R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 08:35:46 +00:00
sgjesse@chromium.org
f19fb45510 MIPS: Minor fixes to simulator and builtins-mips.
Updated to include fixes to several mips arch-specific files, corresponding to recent changes in r7944, r7935, r7926, r7914, r7910, r7895, and parts of r7423, which had previously been missed for mips. Rebased on r7964.

The simulator changes were missed on r7893 for code-stubs-mips,
where the DirectCEntry stuff was added.

There are also a couple small changes to builtins-mips following
r7879 for the other architectures.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 07:12:58 +00:00
svenpanne@chromium.org
8ea947e64b Fixed pretty printing of typeof/delete/void expressions. Put spaces around binary operations and comparisons to improve readability.
Review URL: http://codereview.chromium.org/7055008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 07:00:54 +00:00
ager@chromium.org
fe6bdabc07 Some internal methods are requested when v8 is built as DLL (V8_SHARED), and
they are not available.
Make them no-op (or better yet part of public API).

TEST = Build Chromium with V8_SHARED

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 06:14:32 +00:00
ager@chromium.org
e4509a59b7 Prepare push to trunk. Now working on version 3.3.10.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 06:00:45 +00:00
vitalyr@chromium.org
36195e73a7 ll_prof: Add function optimization status markers.
Review URL: http://codereview.chromium.org/7056012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-20 15:45:06 +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
svenpanne@chromium.org
969a909e3a Refactoring only: Simplified LChunkBuilder:DoTest a bit, making it a simple if-then-else cascade.
Review URL: http://codereview.chromium.org/7055006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-20 11:49:52 +00:00
cira@chromium.org
11cc4dcfc6 Adding DateTimeFormat class to i18n API with following methods:
- format
- getWeekdays
- getMonths
- get Eras
- getAmPm

TEST=Visit i18n.kaziprst.org/datetimeformat.html
Review URL: http://codereview.chromium.org/7014019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 21:12:47 +00:00
kmillikin@chromium.org
86bd8a6c40 Allocate fewer handles in the TypeFeedbackOracle.
R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 13:26:47 +00:00
kmillikin@chromium.org
47157e8a56 When inlining fails, disable optimization of the proper function.
Also, refactor disabling of optimization to make it easier to ensure
that both SharedFunctionInfo and Code get disabled.

R=whesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 13:15:57 +00:00
fschneider@chromium.org
742a001c00 Also skip unary op IC when iterating over break locations in the debugger.
Review URL: http://codereview.chromium.org/7040002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 13:14:12 +00:00
whesse@chromium.org
7878391841 Refactor TraceInlining method of hydrogen so it works correctly.
Fix TraceInline.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 12:53:50 +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
eea59292e6 Avoid conflict between method and type name.
Make builder happy.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-19 09:22:32 +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
dslomov@chromium.org
c5c57d722a Put 7942 "Per-isolate embedder-specific data" back
TBR=

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 23:26:38 +00:00
dslomov@chromium.org
3d5d169275 Revert "Per-isolate embedder-specific data"
This reverts commit 42f5dc01fb9adbf55242da9f6515e9a37132217b.

Checking if this helps webkit-tests

TBR=dslomov@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 22:35:41 +00:00
fschneider@chromium.org
932390fd2d Fix compilation warning on some C++ compilers.
TBR=
Review URL: http://codereview.chromium.org/7034030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 17:43:20 +00:00
fschneider@chromium.org
f2cb08f1c2 Fix handling of -0 in the unary-op IC and avoid repeated patching/transitions.
When the stub return a heap number we do a state transition to
a version HEAP_NUMBER that can handle -0.

There is room for further improvement in the typefeedback for the
case of -0. This change however does not address this and only fixes
the acute issue.
Review URL: http://codereview.chromium.org/7037025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 17:32:36 +00:00
vitalyr@chromium.org
85edb5f96b Make GVN side effect analysis more precise.
When descending the dominator tree we used to collect side effects from all blocks between the dominator and the dominated blocks in the block ordering. This could include blocks that do not appear on paths from the dominator to the dominated and unnecessarily removed available values from the GVN map.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 17:18:35 +00:00
dslomov@chromium.org
469c55f058 Per-isolate embedder-specific data
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 16:20:45 +00:00
vitalyr@chromium.org
35211e959e Assert that independent handles do not participate in grouping.
Review URL: http://codereview.chromium.org/7044007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 15:28:43 +00:00
whesse@chromium.org
a32540e762 Add code to ia32 TypeRecordingBinaryOpStub to handle SHR Smi overflow.
BUG=v8:1395

TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 14:53:02 +00:00
rossberg@chromium.org
30ecaa2f6c Move derived get trap from builtins to global context.
Review URL: http://codereview.chromium.org/7017008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 14:00:34 +00:00
danno@chromium.org
123500999f Reland 7917:
Better support for 'polymorphic' JS and external arrays

Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps and dispatches to shared stubs to perform the array operation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 13:17:29 +00:00
vegorov@chromium.org
1ff163b219 Revert accidental change from r7795 that was causing a bug fixed in r7790 to reappear.
Review URL: http://codereview.chromium.org/6968010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 12:26:04 +00:00
lrn@chromium.org
9307ce2fcf Fix incorrect coercion of other failures to Failure::Exception in ReThrow.
TEST=cctest/test-api/OutOfMemoryNested

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 12:22:19 +00:00
whesse@chromium.org
f40c463526 Fix bug 1396: Optimized calls to API functions assumed that the receiver was a JSObject, failed when compiling stub otherwise.
BUG=v8:1396
Review URL: http://codereview.chromium.org/7045002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 12:20:36 +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
svenpanne@chromium.org
f39b0dfccb Handle all kind of arguments in the ToBooleanStub. While this is not very thrilling in itself, it is one of several steps to add type recording to this stub. Removed a duplicate check for null in the ARM stub and made a tiny simplification, removing a sub instruction.
As a side note, this change has some positive impact on the performace, e.g. imaging-darkroom is 8.3% faster and ws-ieee754conv is even 19.9% faster. No idea why the speedup is so big in some cases, but never look a gift horse in the mouth... ;-)
Review URL: http://codereview.chromium.org/7042004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 10:40:01 +00:00
vitalyr@chromium.org
2cb0c0a957 Remove NULL temp operand from ia32 LStoreKeyedSpecializedArrayElement.
Review URL: http://codereview.chromium.org/7042006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 09:19:14 +00:00
kmillikin@chromium.org
b5b5fa22e1 Prepare push to trunk. Now working on version 3.3.9.
Review URL: http://codereview.chromium.org/7042005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 08:49:07 +00:00
lrn@chromium.org
6932196aa8 Fix push of untagged value in type-recording unary op stub.
Review URL: http://codereview.chromium.org/7037007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 07:40:51 +00:00
danno@chromium.org
83c84a43e8 Revert 7917
TBR=danno@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 18:47:10 +00:00
danno@chromium.org
5a9b2b3c5f Better support for 'polymorphic' JS and external arrays
Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps. Currently, the only array types supported by the MEGAMORPHIC stub are fast elements for objects and JSArrays.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 17:29:13 +00:00
sgjesse@chromium.org
46aeea9d3a Revert r7909
r7909: Optimise the deoptimisation check to improve performance on modern ARM cores.

Assert failure on mozilla/ecma/Date/15.9.3.8-2 and mozilla/ecma/Date/15.9.3.8-4.

R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 12:43:14 +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
danno@chromium.org
ecc25bfb47 Add enumeration to specify if smi check needed
R==ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 12:05:06 +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
fschneider@chromium.org
e3fd7c450e Fix presubmit errors.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/7017011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 11:24:38 +00:00
fschneider@chromium.org
7d446f7f4c Fix bug restoring of JS entry sp so to fix profiler-related valgrind issues.
The profiler did not correctly identify when there was a JS frame
on the stack after an exception was thrown.

I also refactored the code to use PopTryHandler macro-instructions on all platforms

BUG=73722
TEST=No more valgrind errors related to v8::internal::StackFrameIterator.
Review URL: http://codereview.chromium.org/7019010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 11:11:12 +00:00
sgjesse@chromium.org
9bddc8e0d8 Optimise the deoptimisation check to improve performance on modern ARM cores.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 10:52:51 +00:00
sgjesse@chromium.org
17c4dc86f0 MIPS: Remove peeophole optimizations from assembler.
Following r7854.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 10:34:02 +00:00
sgjesse@chromium.org
f801756bf8 Submit regexp-macro-assembler-mips.cc.
Also includes minor changes to regexp-macro-assembler.h.

Builds, but won't run until mips port submission is complete. Has
been tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 10:30:09 +00:00
sgjesse@chromium.org
d1b03ba608 Submit full-codegen-mips.cc.
Includes an arch-independent change for FullCodeGenerator::Split()
prototype for mips, which requires two extra parameters.

Compiles, does not run yet. Tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 10:24:44 +00:00
sgjesse@chromium.org
35727e4507 Submit stub-cache-mips.cc.
Compiles, but not testable until all of mips port is in place. It
has been tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 10:07:42 +00:00
danno@chromium.org
7185ec6ca8 Remaining (forgotten) feedback for pixel array deopt fix
TBR=kmillikin@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 07:22:01 +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
vegorov@chromium.org
fbcc2ae6f0 Prepare push to trunk. Now working on version 3.3.8.
Review URL: http://codereview.chromium.org/7030012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 11:28:23 +00:00
vegorov@chromium.org
850b106400 Extend GCMole with poor man's data flow analysis to catch dead raw pointer vars.
Fix various places in the code found by improved GCMole.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 09:06:16 +00:00
sgjesse@chromium.org
e90632f417 Submit debug-mips.cc.
It compiles, but is not testable until the rest of the mips port
is in place. This has been tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 08:59:56 +00:00
sgjesse@chromium.org
7510bffc4b Submit code-stubs-mips.cc.
This submission required a small change to arch-indep code to declare
code stub DirectCEntry for mips.

It also required updates to macro-assembler-mips.cc & h and frames-mips.h.

I also made a small change to frames-mips.cc.

This code submission will compile, but is not testable until the majority
of the mips port is in place. It has been tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 08:38:19 +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
fe2074f580 Removed a "feature envy" bad smell: Moved AssumeRepresentation method to where
it belongs.
Review URL: http://codereview.chromium.org/7015039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 13:29:02 +00:00
erik.corry@gmail.com
cfd6e000ea Fix uninitialized variable recording how much regexp code
has been generated.
Review URL: http://codereview.chromium.org/7015040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 11:10:18 +00:00
rossberg@chromium.org
e14402b1df A first skeleton for introducing Harmony proxies.
1) Add new type JSProxy for representing proxy objects.
   Currently devoid of functionality, i.e., all properties are undefined.

2) Some rudimentary global $Proxy functions to create proxies.

Next step: Hook up getProperty and getOwnProperty handlers. Will probably
require introducing a new LookupResult type, which is a mixture of
INTERCEPTOR (handles any property) and CALLBACK (calls back to JS).
Can we unify this somehow?

TODO: Should probably rename existing Proxy type to something like
"Foreign", to avoid confusion.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 10:58:25 +00:00
svenpanne@chromium.org
edac3d93c2 Remove more dead code.
Review URL: http://codereview.chromium.org/7013045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 09:25:05 +00:00
vitalyr@chromium.org
73c809bb0e Isolates cleanup: move top.cc to isolate.cc.
Review URL: http://codereview.chromium.org/6969042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 08:54:16 +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
svenpanne@chromium.org
78f4dd1208 Use type feedback for unary minus, improving the performance on e.g. 3d-cube by
7.2% and math-cordic by 5.7%.
Review URL: http://codereview.chromium.org/7013025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 08:21:35 +00:00
sgjesse@chromium.org
2838a3c78b Submit builtins-mips.cc.
This code submission will compile, but is not testable until the majority
of the mips port is in place. This has been tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-13 07:27:46 +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
vitalyr@chromium.org
658e323e87 Micro-optimize passing of args to HasLocalProperty.
Review URL: http://codereview.chromium.org/7018001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 16:19:03 +00:00
fschneider@chromium.org
5f29f9bd8e Don't use environment values at certain deoptimize-instructions.
If a HDeoptimize does not cut away parts of the control-flow-graph
we don't need to insert uses to correctly elimiate dead phis since
the full function is visible to the optimizing compiler.

This is a small improvement of the change r7221 which fixed a problem
when deoptimizing on never executed case-clauses.
Review URL: http://codereview.chromium.org/7012010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 14:56:56 +00:00
sgjesse@chromium.org
58161ce6ed Introduce ic-mips.cc.
This code submission will compile, but is not testable until the majority
of the mips port is in place. This has been tested externally.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 14:48:20 +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
svenpanne@chromium.org
a3afc9a896 Made the output of the --trace-representation flag a bit more informative and
centralized its handling.
Review URL: http://codereview.chromium.org/6969034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 13:36:49 +00:00
sgjesse@chromium.org
b9c771c106 ARM: Reduce amount of code generated for context save on deopt.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 13:33:14 +00:00
ager@chromium.org
89278730bb Make the code flushing candidate field explicit in code objects.
This way it is counted and the rounding of the size will just work
without extra tweaking if you want to add an extra field to code
objects.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 13:13:00 +00:00
vitalyr@chromium.org
bc52ed0850 Extend the fast case of HasLocalProperty.
Review URL: http://codereview.chromium.org/7016016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 12:48:10 +00:00
svenpanne@chromium.org
db563ed204 Fixed TypeFeedbackOracle for unary operations: Record code for the corresponding
type recording IC.
Review URL: http://codereview.chromium.org/6973025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 08:54:13 +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
vitalyr@chromium.org
26bf1dfd4a Kill some dead code.
Review URL: http://codereview.chromium.org/6995048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 13:45:30 +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
03c00ee6a6 Support symbol comparison in crankshaft.
Review URL: http://codereview.chromium.org/7000021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 12:50:04 +00:00
whesse@chromium.org
b77f131914 Don't emit code for HContext values with no uses.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 12:11:23 +00:00
sandholm@chromium.org
fcd9380eda JSON.parse improvement. Call "LookupSymbol" rather than "NewString"
for property string tokens.
Review URL: http://codereview.chromium.org/7004016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:56:15 +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
karlklose@chromium.org
7a798fb9e9 Prepare push to trunk. Now working on version 3.3.7.
Review URL: http://codereview.chromium.org/7005029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:34:56 +00:00
fschneider@chromium.org
6db15ae34b Remove peephole optimiziations from IA32 and ARM assembler.
They are not used with Crankshaft anymore.
Review URL: http://codereview.chromium.org/7003025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:29:53 +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
fa2a92b45f Add case for EXTERNAL_ARRAY_TRANSITION to JSObject::NormalizeProperties
Review URL: http://codereview.chromium.org/7004014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:25:03 +00:00
whesse@chromium.org
bf06fbdbf1 Recommit "First step in letting Crankshaft inline functions with a different context.""
This reverts r7810, thus recommitting 7807.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:03:12 +00:00
jkummerow@chromium.org
79e76dbd34 Rename parameters to fix Windows build
TEST=compiles on Windows

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 09:50:34 +00:00
svenpanne@chromium.org
9f3f90ddc0 Improved c1visualizer output a bit: Emit a human-readable description for
changes instead of a bit-pattern. Fixed logic when ranges are emitted. Improved
indentation in hydrogen.cfg (aesthetical change only). Some minor additional
cleanup.
Review URL: http://codereview.chromium.org/6995024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 09:19:28 +00:00
jkummerow@chromium.org
e90d16953c Remove NearLabel, replacing remaining occurrences with Label
TEST=compiles, existing tests pass

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 09:12:16 +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
erik.corry@gmail.com
291781ed3c Limit the generation of regexp code with large inlined constants.
Review URL: http://codereview.chromium.org/6997015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 06:39:27 +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
svenpanne@chromium.org
986ed5358e Reverted some code which got accidentally committed as part of another commit.
TBR=vitalyr@chromium.org
Review URL: http://codereview.chromium.org/6994011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 14:39:19 +00:00
vitalyr@chromium.org
5ac2a3acfc Fix lint.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 14:21:23 +00:00
vitalyr@chromium.org
c10267f1fa Refactor HCheckInstanceType to allow mask/tag tests.
This allows us to get rid of totally fake LAST_STRING_TYPE and makes
it possible to test for symbols.

I considered splitting HCheckInstanceType into two instructions, but
it seems nice to be able to hide the instance type implementation
details from the hydrogen level.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 14:17:23 +00:00