Commit Graph

5526 Commits

Author SHA1 Message Date
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