Commit Graph

504 Commits

Author SHA1 Message Date
rossberg@chromium.org
43a52c4cee Refactoring of code generation for declarations, in preparation for modules.
Do proper dispatch on declaration type instead of mingling together
different code generation paths. Once we add more declaration forms,
this is more scalable.

In separate steps, I'd like to (1) clean up the logic for DeclareGlobal,
and (2) try to reduce the special handling of the name function var if
possible.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9704054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-16 11:48:20 +00:00
vegorov@chromium.org
983d521fe9 Reland arguments access support for inlined functions (r11109,r11118).
When pushing arguments use correct initial values instead of fetching them from the environment which can be modified.

R=fschneider@chromium.org
TEST=test/mjsunit/compiler/inline-arguments.js

Review URL: https://chromiumcodereview.appspot.com/10033028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 13:40:55 +00:00
mstarzinger@chromium.org
82cde7c832 Remove write-barriers for stores to new-space objects.
This change allows hydrogen instructions to keep track of instructions
that dominate certain side-effects (GVN flags) in the hydrogen graph. We
use the GVN pass to keep track of side-effects because accurate flags
are already in place.

It also adds a new side-effect (kChangesNewSpacePromotion) indicating
whether an instruction can cause a GC and have objects be promoted to
old-space. An object allocated in new-space is sure to stay on paths not
having said side-effect.

R=erik.corry@gmail.com
TEST=mjsunit/compiler/inline-construct

Review URL: https://chromiumcodereview.appspot.com/10031031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 10:56:16 +00:00
vegorov@chromium.org
e831ec2c4e Bailout on possible direct eval calls.
Environment structure for such calls is different from normal global calls.

R=fschneider@chromium.org
BUG=chromium:122681

Review URL: https://chromiumcodereview.appspot.com/10024060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-10 13:41:00 +00:00
mstarzinger@chromium.org
78226352b7 Ensure HAllocateObject always allocates in new-space.
This is needed so that we can start removing write-barriers in optimized
code if we can prove that the receiver object is always in new-space.

TEST=cctest/test-heap/OptimizedAllocationAlwaysInNewSpace

Review URL: https://chromiumcodereview.appspot.com/10008007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-05 15:36:31 +00:00
ulan@chromium.org
3861063018 Check for NaN in inlined versions of Math.min, Math.max.
R=danno@chromium.org
BUG=V8:2056
TEST=mjsunit/regress/regress-2056.js

Review URL: https://chromiumcodereview.appspot.com/10006008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-05 13:24:52 +00:00
vegorov@chromium.org
8360ec877e Ensure that arguments object is materialized when deoptimizing from inlined function.
Lithium translation rebuilds hydrogen environments from scratch so we have to ensure that arguments object is correctly bound on function entry otherwise deoptimization will not materialize it.

This fix was implemented as part of r11109 and then reverted.

R=danno@chromium.org
BUG=v8:2045
TEST=test/mjsunit/regress/regress-2045.js

Review URL: https://chromiumcodereview.appspot.com/9963008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-30 13:22:39 +00:00
mstarzinger@chromium.org
057371da13 Fix polymorphic load on named fields.
This fixes polymorphic loads to correctly compare in-object offsets
instead of indices, because indices might coincide even though the
actual slot is different because of different instance sizes.

R=danno@chromium.org
BUG=v8:2030
TEST=mjsunit/regress/regress-2030,mjsunit/mirror-array

Review URL: https://chromiumcodereview.appspot.com/9864028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 10:42:38 +00:00
mstarzinger@chromium.org
ab4e4cd917 Improve polymorphic loads on single slots.
If all property lookups for a polymorphic load actually result in the
same field index under all maps, we can actually emit a monomorphic load
that is guarded by a map check that verifies that the actual map is in
the set of handled maps. This also allows GVN to get rid of redundant
such map checks.

R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9616014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-23 16:37:54 +00:00
vegorov@chromium.org
3ccc885c78 Revert arguments access support for inlined functions (r11109,r11118).
We are inserting HPushArgument instructions after HEnterInlined based on the environment at the point of the first arguments access. Which might create use before def if there are redundant phis in the environment. 
Review URL: https://chromiumcodereview.appspot.com/9837041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-23 15:39:34 +00:00
mmassi@chromium.org
c39c2089a7 First implementation of fast path for instantiation of array literals composed of doubles.
Review URL: https://chromiumcodereview.appspot.com/9814006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-23 10:14:51 +00:00
vegorov@chromium.org
b7dca5d5a7 Support arguments object access from inlined functions.
R=fschneider@chromium.org
TEST=test/mjsunit/compiler/inline-arguments.js

Review URL: https://chromiumcodereview.appspot.com/9837002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-22 13:53:28 +00:00
fschneider@chromium.org
30a2f2c4ef When running with --always-opt, don't deoptimize named loads with uninitialized type feedback.
This avoids tests taking too long because of repeated deoptimizations.
Review URL: https://chromiumcodereview.appspot.com/9812004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-21 09:23:09 +00:00
vegorov@chromium.org
790219ec55 Use correct arguments adaptation environment when inlining function containing arguments.
R=mstarzinger@google.com
BUG=V8:2014
TEST=test/mjsunit/compile/inline-arguments.js

Review URL: https://chromiumcodereview.appspot.com/9750007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-20 18:15:31 +00:00
fschneider@chromium.org
e081a3bfba Insert explicit deoptimization for named loads that have "uninitialized" type feedback.
We already do this for binary-ops, unary-ops and comparisons. Typefeedback for named loads can now also
be in "uninitialized" state which means that the corresponding load IC was never executed.
Review URL: https://chromiumcodereview.appspot.com/9722041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 15:54:37 +00:00
fschneider@chromium.org
1c99c90be7 Re-enable constructor inlining and inline === comparison with boolean constants.
This change reverts r10974 which disabled those two optimizations.
They were not responsible for the problem in earley-boyer.

BUG=v8:2009
Review URL: https://chromiumcodereview.appspot.com/9699117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 07:51:37 +00:00
vegorov@chromium.org
211a867943 Improve representation inference for HUnknownOSRValue.
Use corresponding phi from the loop entry as a hint to infer proper representation for HUnkownOSRValue and dependent phis.

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9704012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-15 12:21:29 +00:00
mstarzinger@chromium.org
fe1440f339 Remove unused local variable after r11023.
R=svenpanne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9699023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-14 14:08:36 +00:00
vegorov@chromium.org
966ebf8f55 Don't take UnkownOSRValues into account when infering Phi's representation.
For DIV with uninitialized result assume double result representation.

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9664070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-14 12:59:49 +00:00
vegorov@chromium.org
262c8bddd5 Always create HArgumentsObject on function entry.
We do not know if we are going to need it and creating it lazyly might cause us to insert it at the block that does not dominate all uses.

R=mstarzinger@chromium.org
TEST=mjsunit/compiler/inline-arguments.js

Review URL: https://chromiumcodereview.appspot.com/9692046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-13 14:45:03 +00:00
mstarzinger@chromium.org
0ab3fb8b00 Implement non-generic stores for object literals.
This uses the type feedback already present for computed value stores
into object literals to generate optimized stores in Crankshaft, thus
avoiding unnecessary generic stores with side effects.

R=svenpanne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9692036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-13 12:11:46 +00:00
vegorov@chromium.org
da03f56b1f Inline functions that use arguments object in f.apply(o, arguments) pattern.
Support arguments materialization after deoptimization in all frames (not only in topmost one).

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9643001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:49:41 +00:00
ulan@chromium.org
1767fef60b Implement date library functions in C++.
Developed together with Andreas Rossberg based on:
  https://chromiumcodereview.appspot.com/9117034/
  https://chromiumcodereview.appspot.com/9307083/

R=rossberg@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9572008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 12:07:29 +00:00
rossberg@chromium.org
8604da7f06 New class for Date objects: caches individual date components.
First step, cache slots not used yet.

R=ulan@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9117034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 11:11:55 +00:00
ulan@chromium.org
e6576f0938 Revert r10435 and r10923 because of failures.
r10435 CL: http://codereview.chromium.org/9195005
r10923 CL: https://chromiumcodereview.appspot.com/9601010

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9653025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 09:04:39 +00:00
fschneider@chromium.org
886a1c6469 Avoid starting a new basic block when inlining a function.
Instead of creating a fresh basic block for the inlined body,
I just simulate the outer environment in the middle of the current
block before updating the current environment to the inlined environment and
emitting the enter-inlined instruction.
Review URL: https://chromiumcodereview.appspot.com/9618052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-07 12:04:28 +00:00
mstarzinger@chromium.org
30305150fe Blocks that contain soft deopts have no side effects.
R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9188005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-06 10:57:54 +00:00
fschneider@chromium.org
dfe0101cad Fix column formatting of --hydrogen-stats output by shortening a line.
TBR=ulan@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9578013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 13:07:32 +00:00
mstarzinger@chromium.org
240e818f0c Fix inlining of strict mode constructors.
Inlined strict mode functions (that are not called as methods) will get
their receiver reset to undefined. This should not happen when inlining
constructors.

This change also simplifies the test suite to reuse the same closures
into which constructors get inlined and use gc() to force V8 to forget
collected type feedback.

R=vegorov@chromium.org
TEST=mjsunit/compiler/inline-construct

Review URL: https://chromiumcodereview.appspot.com/9597017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 12:46:50 +00:00
yangguo@chromium.org
5ce562cda8 Reland r10908 (Ensure consistent result of transcendental function0.)
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9583037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 08:17:16 +00:00
yangguo@chromium.org
f2699b66cf Revert r10908 due to flakiness and crashes.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9580007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 15:00:52 +00:00
yangguo@chromium.org
12f2099993 Ensure consistent result of transcendental functions.
BUG=
TEST=regress-transcendental.js

Review URL: https://chromiumcodereview.appspot.com/9572009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 14:33:15 +00:00
fschneider@chromium.org
751d53d9d2 Make trace-hydrogen output more visualizer-friendly.
Review URL: https://chromiumcodereview.appspot.com/9580005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 13:05:59 +00:00
vegorov@chromium.org
ff6ebf7dff Introduce basic type feedback for for-in statements to avoid deopts.
R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9571001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 11:33:33 +00:00
fschneider@chromium.org
1e40f7ac2c Fix a register assignment bug in typed array stores without SSE3 available.
The old code used a separate HToInt32 instruction which had a wrong register
constraint for the input register which caused wrong result when the stored value
is used after a typed array store. (UseRegister instead of UseTempRegister) when no
SSE3 is available.

This change fixes it by replacing HToInt32 with the corresponding HChange
instruction which has correct register contraints.

TEST=mjsunit/compiler/regress-toint32.js
Review URL: https://chromiumcodereview.appspot.com/9565007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-01 12:45:46 +00:00
mstarzinger@chromium.org
4eaaced657 Improve constructor inlining backout.
This improves the generated hydrogen graph by also removing the obsolete
HCheckFunction instruction if we backout of inlining constructors.

R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9537004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-01 11:50:11 +00:00
fschneider@chromium.org
a8980079a0 Add flag --trace-phase to selectively produce IR trace output.
By default --trace-hydrogen only generates the final IR (before
code generation). The other phases can be printed by specifying
them by their first letter. Currently H=HIR, L=LIR or Z=final IR (default)
are recognized.
Review URL: https://chromiumcodereview.appspot.com/9535009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-01 11:33:37 +00:00
mstarzinger@chromium.org
fd5640cf7a Implement inlined object allocation in Crankshaft.
Generates inlined code for object allocation specific to the initial map
of the given constructor function. Also forces completion of inobject
slack tracking while crankshafting to finalize instance size of these
objects.

R=vegorov@chromium.org
TEST=mjsunit/compiler/alloc-object

Review URL: https://chromiumcodereview.appspot.com/9370019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-01 11:10:28 +00:00
fschneider@chromium.org
b854d09721 Eliminate overflow check after integer add and sub operation if result is truncated to int32.
Review URL: https://chromiumcodereview.appspot.com/9286002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 13:41:18 +00:00
rossberg@chromium.org
b89c0a962c AST extensions and parsing for import & export declarations.
R=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9496003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 12:12:52 +00:00
svenpanne@chromium.org
f9cdb0e18c Explicitly use a Zone when allocating Range.
This CL is a step towards removing ZoneObject's new operator without a Zone
parameter, which uses Isolate::Current. For e.g. the bulletben benchmark, this
CL reduces the number of calls to this new operator by roughly 120k, but we are
still left with 780k calls from other sites...

Review URL: https://chromiumcodereview.appspot.com/9487010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-28 15:32:58 +00:00
rossberg@chromium.org
d809d17f5d Further refactoring of declarations in the AST:
Define modules as module declarations.
Separate function declarations from var declarations.

R=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9460064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-28 10:12:39 +00:00
mstarzinger@chromium.org
fb8eb04bfd Implement inlining of constructor calls.
R=vegorov@chromium.org,kmillikin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9304001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-28 09:05:55 +00:00
vegorov@chromium.org
9b55ebaa3a When compiling for-in pass correct context value to the increment instruction.
Additionally force increment instruction to use int32 representation.

R=fschneider@google.com
BUG=http://crbug.com/115646
TEST=test/mjsunit/compiler/optimized-for-in.js

Review URL: https://chromiumcodereview.appspot.com/9463052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 14:37:27 +00:00
vegorov@chromium.org
53622335e3 Disable for-in support in Crankshaft while crashes and regressions are being investigated.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9463049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 10:43:57 +00:00
yangguo@chromium.org
7a98cb62c3 Speed up removing phi nodes.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9452022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-24 08:46:10 +00:00
vegorov@chromium.org
5bb6a8399d Support OSR in for-in loops.
Modify PreProcessOsrEntry to work with OSR entries that have non-empty expression stack.

Modify graph builder to take for-in state from environment instead of directly referencing emitted instructions.

Extend %OptimizeFunctionOnNextCall with an argument to force OSR to make writing OSR tests easier: %OptimizeFunctionOnNextCall(f, "osr").

R=fschneider@chromium.org
TEST=test/mjsunit/compiler/optimized-for-in.js

Review URL: https://chromiumcodereview.appspot.com/9431030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-22 16:45:35 +00:00
vegorov@chromium.org
6703dddac4 Support fast case for-in in Crankshaft.
Only JSObject enumerables with enum cache (fast case properties, no interceptors, no enumerable properties on the prototype) are supported.

HLoadKeyedGeneric with keys produced by for-in enumeration are recognized and rewritten into direct property load by index. For this enum-cache was extended to store property indices in a separate array (see handles.cc).

New hydrogen instructions:

- HForInPrepareMap: checks for-in fast case preconditions and returns map that contains enum-cache;
- HForInCacheArray: extracts enum-cache array from the map;
- HCheckMapValue: map check with HValue map instead of immediate;
- HLoadFieldByIndex: load fast property by it's index, positive indexes denote in-object properties, negative - out of object properties;

Changed hydrogen instructions:

- HLoadKeyedFastElement: added hole check suppression for loads from internal FixedArrays that are knows to have no holes inside.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9425045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-22 12:47:42 +00:00
fschneider@chromium.org
7de6be06cf Eliminate use of ZONE macro in BitVector class and pass a zone explicitly.
Review URL: https://chromiumcodereview.appspot.com/9416092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-22 11:40:28 +00:00
fschneider@chromium.org
c3297c8d2e Use placement-new operator in the register allocator.
Pass the zone explicitly to avoid calling Isolate::Current()->zone().
Review URL: https://chromiumcodereview.appspot.com/9430002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-21 16:47:02 +00:00
yangguo@chromium.org
30bcc481e1 Enable inlining for Math.min/max in more cases.
Review URL: https://chromiumcodereview.appspot.com/9372021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 13:21:15 +00:00
mstarzinger@chromium.org
1dd2b094a5 Implement fast literal support in Crankshaft.
This extends the current support for nested object literals we already
have in Crankshaft, to also support nested array literals and mixed
nested literals containing arrays and objects. All three types are
generated by the unified HFastLiteral instruction.

All previous upper bounds on nested literal graphs remain unchanged,
keeping the size of generated code in check.

The main intention is to boost performance of two-dimensional array
literals containing constant elements (aka. matrices).

R=danno@chromium.org
TEST=mjsunit/compiler/literals-optimized

Review URL: https://chromiumcodereview.appspot.com/9403018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 17:32:30 +00:00
danno@chromium.org
a07e129e9a Relax TransitionElementsKind DependsOn/Changes dependencies.
Ensure that GVN eliminates all transitions that are dominated by an equivalent transition, even if there is a DependsOn-changing instruction in between.

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9365057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 15:37:52 +00:00
jkummerow@chromium.org
82a1adcb69 Reapply r10690 ("Temporarily disable inlining of Math.floor called as a function")
This reverts r10692.

Review URL: https://chromiumcodereview.appspot.com/9359035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 14:40:58 +00:00
fschneider@chromium.org
0be449d684 Enable optimization of top-level code and generate deoptimization support lazily.
This change enables optimization of top-level and eval-code. For this to work, it adds
support for declaring global variables in optimized code.

At the same time it disables the eager generation of deoptimization support data
in the full code generator (originally introduced in
 r10040). This speeds up initial compilation and saves 
memory for functions that won't be optimized. It requires
 recompiling the function with deoptimization
 support when we decide to optimize it.

Review URL: https://chromiumcodereview.appspot.com/9187005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 14:14:51 +00:00
fschneider@chromium.org
d462550446 Revert r10690. Enable inlining of Math.floor again.
The test failures reported in issue v8:1947 are unrelated to this change since it is not reproducible anymore.

BUG=v8:1947
Review URL: https://chromiumcodereview.appspot.com/9365048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 10:43:40 +00:00
fschneider@chromium.org
fd4ceab217 Temporarily disable inlining of Math.floor called as a function because of test failures.
BUG=v8:1947
Review URL: https://chromiumcodereview.appspot.com/9359032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 09:42:31 +00:00
rossberg@chromium.org
5498a6345a Extend AST with basic module constructs (yet unused).
R=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9373023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 13:40:41 +00:00
rossberg@chromium.org
751508d6aa Split AST Declaration class, in preparation for new module declaration forms.
Turns Declaration into an abstract class, and introduces VariableDeclaration as a concrete subclass.

R=kmillikin@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9348057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 13:39:26 +00:00
danno@chromium.org
d949c64688 Improve GVN handling of ElementTransitions.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9141016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 08:58:19 +00:00
erik.corry@gmail.com
53c6838cce Remove 5 unused flags.
Review URL: https://chromiumcodereview.appspot.com/9362014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 15:39:41 +00:00
fschneider@chromium.org
3f50663371 Remove remaining occurrences of the unused --opt-eagerly flag.
Fix a lint error.
Review URL: https://chromiumcodereview.appspot.com/9365015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 12:49:04 +00:00
fschneider@chromium.org
b8b50400d2 Inline builtin Math functions functions in more cases.
Until now we only could inline as specialized HIR instructions when called
as a method (e.g. Math.abs)

It is very common practice to abbreviate calls to those functions by defining
a global or local variable like:

var a = Math.abs;
var x = a(123);

This change allows inlining them when called as a function (global or local).
Review URL: https://chromiumcodereview.appspot.com/9365013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 12:08:46 +00:00
jkummerow@chromium.org
d795b7c620 Collect AstNode type information
Review URL: https://chromiumcodereview.appspot.com/9221011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 09:56:33 +00:00
fschneider@chromium.org
0ec7773680 Allow bailing out of the register allocator when running out of virtual registers.
1. Instead of checking upfront and estimating a limit for the number, we
now are able to stop register allocation and bailout when we don't
have enough virtual registers.

2. GCed some out-dated flags from flag-definition.h

3. Simplified the interface from the Lithium builder to the
register allocator in lithium-*.cc: For uses and definitions, we
just record the virtual register number given by the Hydrogen value id.
For temporaries, we request a new virtual register from the allocator.
For fixed temps, we don't need to do anything.

4. Increased number of deoptimization entries to 16K. Eventually we
probably want to make this array grow dynamically.
Review URL: https://chromiumcodereview.appspot.com/9325019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 12:05:08 +00:00
svenpanne@chromium.org
82d1f51534 Give uses within a loop a greater weight when doing representation inference.
Uses of a value are weighted by a factor of FLAG_loop_weight (default: 10) for
every loop they are in. This makes uses in inner loops "more important", which
should improve the result of the representation inference.

Review URL: https://chromiumcodereview.appspot.com/8277031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-01 08:49:18 +00:00
fschneider@chromium.org
1604871e80 Get rid of a useless helper method in the register allocator.
Reading the virtual register from a LOperand is only needed used for
unallocated LOperands (LUnallocated). There is no need for having a
method for that on LOperand.
Review URL: http://codereview.chromium.org/9293003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-30 15:40:50 +00:00
erik.corry@gmail.com
d6f476dd41 Fix intermittent stack overflow in Hydrogen code generation in tests.
Review URL: https://chromiumcodereview.appspot.com/9290044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-26 11:14:19 +00:00
vegorov@chromium.org
04289e8d17 Support inlining at call-sites with mismatched number of arguments.
Review URL: https://chromiumcodereview.appspot.com/9265004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 08:43:12 +00:00
svenpanne@chromium.org
fd2731a7e6 Replaced LookupResult::IsProperty by LookupResult::IsFound where possible.
Yak shaving for map sharing with accessor properties contd.: When CALLBACKS can
have map transitions, simply looking at the property type is not sufficient
anymore to decide if a property is there or not. One has to look at the actual
contents of the descriptor entry then, but this breaks down sometimes when the
lookup is being done with a NULL holder. Luckily enough, we can oftren replace
IsProperty by the simpler IsFound, because we inspect the type immediately
afterwards, anyway.

Review URL: https://chromiumcodereview.appspot.com/9280007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 12:01:47 +00:00
svenpanne@chromium.org
ed4343d982 Removed IsPropertyOrTransition method.
It had only 2 uses: One use could be rewritten in a simpler way, and the other
is actually more readable after inlining and fixing the comments.

Review URL: https://chromiumcodereview.appspot.com/9233006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 15:10:35 +00:00
danno@chromium.org
8d741a9add Split GVN flags from flags in Hydrogen instructions.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9233005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 14:08:20 +00:00
fschneider@chromium.org
ed5f9a4c77 Generate faster compares for === and !== with boolean constants.
Review URL: http://codereview.chromium.org/9195005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 12:14:11 +00:00
fschneider@chromium.org
98013d9824 Eliminate a superfluous map check when building generic array element access.
In the case where we generate a generic load or store, we don't need to emit a non-smi-check and a map-check before it.
Review URL: http://codereview.chromium.org/9252008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 14:05:11 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
svenpanne@chromium.org
a19e87b9a0 Improved output for bailouts on huge functions
Review URL: http://codereview.chromium.org/9190008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-12 07:17:46 +00:00
yangguo@chromium.org
339c9c12e7 Inlining Math.min and Math.max in crankshaft.
BUG=v8:1325
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 15:43:33 +00:00
ager@chromium.org
d59749f8b4 Support inlining and crankshaft optimization of Math.random.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 10:35:37 +00:00
danno@chromium.org
03c737625a Make sure transitioned arrays efficiently call builtin Array functions
Loosen the requirement for Map equivalency on several map checks, including checks up the prototype chain, that are not sensitive to ElementsKinds. These selected map checks should also match against FAST_DOUBLE_ELEMENT and FAST_ELEMENT transitions of the original map. This specifically helps all variants of transitioned JSArrays to still efficiently call builtins like push, pop and sort.

BUG=none
TEST=none

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-09 16:37:47 +00:00
danno@chromium.org
2335545108 Rollback 10331: Make sure transitioned arrays efficiently call builtin Array functions
Due to perf regressions

TBR=fschneider@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 17:29:01 +00:00
danno@chromium.org
69366adfb6 Make sure transitioned arrays efficiently call builtin Array functions
Loosen the requirement for Map equivalency on several map checks, including checks up the prototype chain, that are not sensitive to ElementsKinds. These selected map checks should also match against FAST_DOUBLE_ELEMENT and FAST_ELEMENT transitions of the original map. This specifically helps all variants of transitioned JSArrays to still efficiently call builtins like push, pop and sort.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 17:16:04 +00:00
fschneider@chromium.org
70056762f1 Remove unnecessary environment from LStoreKeyedFastElements.
This was a left-over from a time when bounds-check was performed
as part of this instruction.

I also refactored and improved the code for smi-only arrays.

R=vegorov@chromium.org
Review URL: http://codereview.chromium.org/9023006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-22 16:23:47 +00:00
jkummerow@chromium.org
106973c3d2 Create missing boilerplate for array literals instead of deoptimizing
BUG=107370
TEST=new additions to mjsunit/array-literal-transitions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 13:01:27 +00:00
fschneider@chromium.org
626454a61a [hydrogen] don't bailout assignments to consts
If constant variable is allocated in CONTEXT

Patch by Fedor Indutny <fedor.indutny@gmail.com>.

BUG=
TEST=
R=vegorov@chromium.org
Review URL: http://codereview.chromium.org/8857001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-13 17:10:34 +00:00
keuchel@chromium.org
f1649cf39c Hydrogen support for context allocated harmony bindings.
This CL adds support for loading from and storing to context slots
belonging to harmony let or const bound variables. Checks for the
hole value are performed and the function is deoptimized if they fail.
The full-codegen generated code will take care of properly throwing
a reference error in these cases.

TEST=mjsunit/harmony/block-let-crankshaft.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 09:50:30 +00:00
ricow@chromium.org
ec66c36fbf Reland 10216 - Optimize the equality check case of ICCompare stubs.
Now with arm and x64 support. Additionally, added default unreachable case to switch statement in CompareIC::TargetState to make win and mac compilers happy.

Reviewer guide:
This is an exact copy of 10216 except:
src/arm/*
src/x64/*
src/ic.cc (added default case to swith in CompareIC::TargetState)
Review URL: http://codereview.chromium.org/8872060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 09:26:14 +00:00
ricow@chromium.org
174532d23f Revert 10216 Optimize the equality check case of ICCompare stubs.
Missing arm and x64 implementations
Review URL: http://codereview.chromium.org/8883023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 17:28:44 +00:00
ricow@chromium.org
1028cf2631 Optimize the equality check case of ICCompare stubs.
This includes specialcasing the generation when we know that the maps
of the two objects are the same. In addition, a new specialized
compare ic known objects cache is created.

The reason for the cache is that we need to have access to the stub
code from the roots; if we do not, the GC will collect the stub. In
this specialized case we use the map pointer as key in the cache, and
we always do a lookup before generating code. Actually hitting
something in the cache will happen very rarely, but we could
potentially overwrite an existing stub, which again will lead to the
GC collecting this old stub (even if it is referenced from other code
objects)
Review URL: http://codereview.chromium.org/8520006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 17:17:21 +00:00
fschneider@chromium.org
ff6f2fa9b3 Remove unnecessary use of raw pointers in hydrogen graph builder.
This is potentially a source of bugs, if someone inserts some code
that causes allocation.
Review URL: http://codereview.chromium.org/8818015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 15:31:01 +00:00
keuchel@chromium.org
8b34f4630b Hydrogen support for stack local harmony bindings in function scope.
This is the first CL in a series that add support for the harmony scoping
features to crankshaft. This CL specifically adds support for stack
allocated 'let' and 'const' declared variables in function scopes.

TEST=mjsunit/harmony/block-let-crankshaft.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 09:41:06 +00:00
fschneider@chromium.org
7549b16413 Fix a bug with deoptimization from inside the default-clause of a switch-statement.
When generating a string-switch we have to use the correct ast id when
there is a default clause present.
Review URL: http://codereview.chromium.org/8776048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 15:15:23 +00:00
danno@chromium.org
25e3d2706d Optimize Crankshaft array literal initialization from boilerplate.
BUG=none
TEST=test/mjsunit/array-literal-transitions.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 12:42:35 +00:00
fschneider@chromium.org
8f7a1f7808 Revert r10118 from bleeding edge.
It causes several test failures which I need to investigate.
Review URL: http://codereview.chromium.org/8769008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 16:57:54 +00:00
fschneider@chromium.org
4ca20a1d35 Simplify stack check instruction in Crankshaft.
So far we had two types of stack checks: one used for function entries
and one used at loop back edges which uses a deferred code object to
avoid spilling of registers in the loop.

After refactoring lazy deoptimization the first stack check can also
use deferred code. This change removes the first type of stack check
instruction in Crankshaft and uses a deferred stack check in all
places.
Review URL: http://codereview.chromium.org/8775002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 09:54:05 +00:00
yangguo@chromium.org
dcc05b9fca Implement Math.tan in generated code.
Review URL: http://codereview.chromium.org/8700004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 13:15:31 +00:00
lrn@chromium.org
ebccde15bc Don't preparse large files to find boundaries of lazy functions.
Instead use the preparser inline to parse only the lazy function
bodies.

This is still disabled for small files.
More measurements are needed to determine if lazy-compiling small
sources is worth it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 09:36:31 +00:00
keuchel@chromium.org
1e9a7267ab Introduce extended mode.
This CL introduces a third mode next to the non-strict
(henceforth called 'classic mode') and 'strict mode'
which is called 'extended mode' as in the current
ES.next specification drafts. The extended mode is based on
the 'strict mode' and adds new functionality to it. This
means that most of the semantics of these two modes
coincide.

The 'extended mode' is entered instead of the 'strict mode'
during parsing when using the 'strict mode' directive
"use strict" and when the the harmony-scoping flag is
active. This should be changed once it is fully specified how the 'extended mode' is entered.

This change introduces a new 3 valued enum LanguageMode
(see globals.h) corresponding to the modes which is mostly
used by the frontend code. This includes the following
components:
* (Pre)Parser
* Compiler
* SharedFunctionInfo, Scope and ScopeInfo
* runtime functions: StoreContextSlot,
  ResolvePossiblyDirectEval, InitializeVarGlobal,
  DeclareGlobals

The old enum StrictModeFlag is still used in the backend
when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
* SetProperty runtime function, Delete builtin
* StoreIC and KeyedStoreIC
* StubCache

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:17:04 +00:00
mstarzinger@chromium.org
7e7d4dfd64 Implement crankshaft support for nested object literals.
This generates optimized code for deep-copying of nested object literal
boilerplates which are statically known. Most of the boilerplates have
already been generated at crankshaft time, so this optimization should
kick in for virtually every object literal. Only nested object literal
graphs up to a certain depth and containing up to a certain total number
of properties are considered for this optimization. This will prevent
explosion of code size due to large object literals (e.g. eval on JSON).
Improves splay performance because object literals are created often.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 13:42:52 +00:00
fschneider@chromium.org
8ebd1999f5 Propagate and combine constants in Hydrogen
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8473002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 10:18:47 +00:00
fschneider@chromium.org
8fbf1d5017 Landing: [hydrogen] optimize switch with string clauses. Patch by Fedor Indutny <fedor.indutny@gmail.com>.
Original code review: http://codereview.chromium.org/8373029/
Review URL: http://codereview.chromium.org/8589019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:57:55 +00:00
svenpanne@chromium.org
ee2cd4289b Re-added missing return in HInferRepresentation::TryChange.
It mysteriously disappeared about 800 revisions ago... :-} Thanks to Jakob for spotting this!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-16 07:46:19 +00:00
fschneider@chromium.org
33682c6b34 Implement inline runtime function %_SetValueOf for Crankshaft.
It is frequently used inside our builtins and is implemented purely
by HIR instructions: a smi check, an instance-type check and an
in-object property store for storing to the value field.
Review URL: http://codereview.chromium.org/8507016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 12:32:39 +00:00
rossberg@chromium.org
f936aac43e Make _CallFunction proxy-aware.
Change calling convention for CallFunction stub.
Some fixes regarding strict mode call traps.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 14:39:37 +00:00
fschneider@chromium.org
2a1f08a1c2 Improve dominator computation to avoid worst-case quadratic time.
In case of a degenerated CFG like in the example below processing
predecessors in the wrong order yields n^2 runtime.

  do {
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    // etc.
  } while (false);

Reversing iteration order avoids this.
Review URL: http://codereview.chromium.org/8502012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:18:25 +00:00
fschneider@chromium.org
4627023b38 Revert r9901 to make tree green again.
There was a test failure on x64 mozilla tests.

TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/8495011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 09:56:09 +00:00
fschneider@chromium.org
cac3008437 [hydrogen] optimize switch with string clauses
Hydrogen should optimize not only SMI clauses, but clauses with string literals
too.

Patch from fedor.indutny <fedor.indutny@gmail.com>.

R=vegorov@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8373029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 09:08:33 +00:00
keuchel@chromium.org
7385fef2ca Cleanup ScopeInfo and SerializedScopeInfo.
Both classes have been merged into a single ScopeInfo
class that implements the functionality from both.

This CL does not adapt the broken gdb-jit interface.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 10:36:55 +00:00
kmillikin@chromium.org
4e4a901d96 Remove the forward-bailout stack from the non-optimizing compiler.
This was pretty heavyweight.  It was kept in just for a few corner cases
that assumed it was there.  We can work around them by making sure that the
expression in a reified test context is always really the expression that
was visited in that context; and by inspecting the context manually and
consing up a pair of extra AST IDs for the unusual case of unary not in a
value AST context.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 16:53:32 +00:00
danno@chromium.org
0766a138a6 Add and use ElementsKind side effect
Also partition side effects into observable and not observable, with only observable requiring Simulates and non-observable changes able to participate in GVN and code hoisting.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:15:10 +00:00
fschneider@chromium.org
0df9569fe5 Merge IR classes for different bitwise operations AND, OR and XOR into one class.
Since we already have only one LIR class, it does not make much sense to separate
them at the HIR level.
Review URL: http://codereview.chromium.org/8426005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 13:06:26 +00:00
fschneider@chromium.org
a2240fc52b Eliminate some virtual function from AST classes.
1. Remove unused dead functions.

2. Replace the virtual As-* type cast functions with non-virtual version
that uses node_type().

Result is around 13K reduction in binary size.
Review URL: http://codereview.chromium.org/8335006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 11:11:26 +00:00
kmillikin@chromium.org
0df252b38b Handlify the remaining CallStubCompiler functions.
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

R=vegorov@chromium.org,ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:37:29 +00:00
fschneider@chromium.org
a5b40e27b8 Revert r9805.
It did not fix the original problem, but instead introduced new ones.

R=vegorov@chromium.org
Review URL: http://codereview.chromium.org/8404037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 12:12:53 +00:00
fschneider@chromium.org
4ded3ccf7c Fix bug in lazy deoptimization after HInvokeFunction.
The full code generator expects the function expression on top
of the stack until after the all. We have to emit the call + the
corresponding simulate before dropping it in the hydrogen code.

BUG=v8:1789
Review URL: http://codereview.chromium.org/8391042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 14:05:18 +00:00
fschneider@chromium.org
2d4bb1803d Fix bug in inlining call-as-function when inlining multiple levels deep.
This change fixes a off-by-one level error when dropping the
function from the environment. The function of the outermost
environment was not dropped.

BUG=v8:1785
TEST=test/mjsunit/compiler/regress-inline-callfunctionstub.js
Review URL: http://codereview.chromium.org/8341019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:31:06 +00:00
vegorov@chromium.org
f8c2d3847f Take loop side-effects into account when collecting side-effects on the path between two blocks.
R=fschneider@chromium.org
BUG=100409
TEST=test/mjsunit/regress/regress-100409.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 15:39:55 +00:00
keuchel@chromium.org
e8bccc2cb0 Block scoped const variables.
This implements block scoped 'const' declared variables in harmony mode. They
have a temporal dead zone semantics similar to 'let' bindings, i.e. accessing
uninitialized 'const' bindings in throws a ReferenceError.

As for 'let' bindings, the semantics of 'const' bindings in global scope is not
correctly implemented yet. Furthermore assignments to 'const's are silently
ignored. Another CL will introduce treatment of those assignments as early
errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:33:08 +00:00
fschneider@chromium.org
53e7502fa0 Fix bug in environment simulation after inlined call-as-function.
This change is based on my previous change enabling inlining calls-as-function
fixing the bugs related to deoptimization.

The function value on top of the environment was dropped too late in the old code.
As a result we could get a wrong value on top after deoptimization.

This change includes r9619. It was reverted because of test failures that are fixed
with this patch.
Review URL: http://codereview.chromium.org/8360001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:53:08 +00:00
ulan@chromium.org
f630ff0c67 Use handle lists in Map::FindTransitionedMap.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:45:19 +00:00
keuchel@chromium.org
c6464d500b Replace boolean indications of strict mode by an enum value.
Review URL: http://codereview.chromium.org/8344082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 07:47:22 +00:00
jkummerow@chromium.org
655b2332d7 ElementsKind transitioning support for keyed loads in Crankshaft
Review URL: http://codereview.chromium.org/8352012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 08:49:01 +00:00
jkummerow@chromium.org
deff312f25 Handle keyed stores after elements transition monomorphically if possible
Review URL: http://codereview.chromium.org/8354003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 08:41:38 +00:00
jkummerow@chromium.org
3a9d6c04ba Introduce HTransitionElementsKind instruction.
TEST=mjsunit/elements-kind

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:10:18 +00:00
fschneider@chromium.org
2791cd5a2c Allow inlining of named function expressions containing ThisFunction reference.
Named function expression have an implicit local variable that
refers to the current function (ThisFunction). Before we only could inline
anonymous function expressions like:

A.prototype.foo = function() {}

as opposed to

A.prototype.foo = function foo() {}

This change enables inlining function of expressions like this.
Review URL: http://codereview.chromium.org/8346032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:41:22 +00:00
danno@chromium.org
e5f23399b4 Support array literals with FAST_DOUBLE_ELEMENTS ElementsKind.
BUG=none
TEST=test/mjsunit/array-literal.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:36:55 +00:00
svenpanne@chromium.org
140ae348d2 Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.
This time, we initially leave the HTypeof instruction in the Hydrogen graph,
even for the special cases. We later try to remove this instruction (and any
HConstant) in the canonicalization pass, if possible. Always removing the
HTypeof during the initial graph construction is wrong if e.g. it is used in an
HSimulate.

The removals can be generalized a bit, but this will happen in a separate CL.

TEST=mjsunit/optimized-typeof.js
Review URL: http://codereview.chromium.org/8334021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 07:35:30 +00:00
kmillikin@chromium.org
56c763f023 Make the GC aware of JSReceiver pointers in LookupResults.
The LookupResult utility class is used in handlified code, but it can
contain a raw pointer to the lookup's holder object.  Create a per-thread
stack of live LookupResults and iterate all the live ones on GC.

R=vegorov@chromium.org,erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:18:55 +00:00
svenpanne@chromium.org
a8bb36f87b Revert r9612, it hits an assertion under special circumstances.
Problematic code is e.g.:

   function typeofViaVariable() {
     var foo = typeof({})
     return foo === "undefined";
   }
Review URL: http://codereview.chromium.org/8283036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 15:02:19 +00:00
fschneider@chromium.org
948a323819 Revert r9619.
It causes an assertion with deoptimizing from inlined code.
Review URL: http://codereview.chromium.org/8277034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 12:26:29 +00:00
fschneider@chromium.org
c68fc4126f Revert last revert.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/8286023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 12:03:53 +00:00
fschneider@chromium.org
85ab75df50 Revert r9619.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/8286022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 11:56:07 +00:00
fschneider@chromium.org
34534588fb Fix a number of bugs with inlining calls as function.
1. Record AST id for CallFunctionStub.

2. Correctly extract cached target from CallFunctionStub inline cache.

3. Fix a bug when inling call as a function in effect or value context:
   Handle abnormal exits correcty.

4. Fix a bug when inlining call as a function in test context: drop function
   correctly from true and false block.

5. Avoid inlining mutually recursive functions by checking the stack of function
   states before inlining. This was not a bug, but is just a more general
   check to avoid recursive inlining.
Review URL: http://codereview.chromium.org/8258012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 08:43:27 +00:00
svenpanne@chromium.org
baa29ebafa Recognize special comparisons via pattern matching on the hydrogen graph.
Previously, comparisons against null/undefined and comparisons of the result of
typeof against a constant string were done syntactically. Now we do this via
pattern matching on the hydrogen graph, which opens up more opportunities for
better code generation, e.g. the following comparisons are now recognized to be
special:

   var bar = typeof foo;
   var baz = "undefined";
   if (bar == baz) ...

   var blah = undefined;
   if (hurz == blah) ...

If we did this handling of special cases even later at lithium generation time,
even more cases could be recognized, but this would involve bigger changes and
this CL handles most common cases.
Review URL: http://codereview.chromium.org/8242002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 15:07:28 +00:00
fschneider@chromium.org
ba981deab0 Always limit inlining depth to avoid taking too much time for --stress-opt runs.
We run with --nolimit-inlining when --stress-opt is on.
Review URL: http://codereview.chromium.org/8267007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 13:41:47 +00:00
fschneider@chromium.org
876fa09feb Move declaration of SerializedScopeInfo from variables.h to objects.h
This eliminates compile-errors when assigning Handle<SerializedScopeInfo> to
Handle<Object> in a place where the declaration was not available because
variables.h was not included.

As a result I had to also move the enum Variable::Mode to v8globals.h and
rename it to VariableMode.
Review URL: http://codereview.chromium.org/8221004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 08:41:19 +00:00
fschneider@chromium.org
313f9505b4 Make accessors for oddball objects return Oddball* instead of Object*.
Fix a use of the hole value and the undefined value before initialization when
initializing V8. Before we just read a NULL value from them.
Review URL: http://codereview.chromium.org/8130002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 09:21:48 +00:00
danno@chromium.org
3b07abbdbe Activate smi-only optimizations for large array literals.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 08:31:06 +00:00
fschneider@chromium.org
9bc30dfe93 Small simplification of HChange instruction.
Use existing flag to mark HChange instructions that deoptimize on undefined.

Also there is no need to store the source representation explicitly.
Review URL: http://codereview.chromium.org/8066007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 14:01:40 +00:00
vegorov@chromium.org
fd2bac7e92 Remove HEnvironment::CheckDepth.
R=fschneider@chromium.org
BUG=v8:1727

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 11:58:40 +00:00
fschneider@chromium.org
f85bcba479 Limit depth of inlining for --stress-opt runs to avoid going into infinite recursion.
Review URL: http://codereview.chromium.org/8060033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 11:34:54 +00:00
fschneider@chromium.org
27e1a8d414 Improve our simple elimination of hole checks.
Currently we avoid checking for the hole value after array loads, if the
result is only used by instructions that definitely deoptimize in case
of the hole value (HChange instructions).

This change performs the same procedure for loading from deleteable/read-only
global variable where we can also avoid the check in the same cases.
Review URL: http://codereview.chromium.org/8054008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 13:03:19 +00:00
vegorov@chromium.org
2e08515d21 Check the depth of the constructed HEnvironment.
Temporary check to catch 1727 on the reliability bot.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 12:55:43 +00:00
kmillikin@chromium.org
bcb781d76a Record function call targets, use them for inlining.
Introduce a version of the CallFunctionStub that records monomorphic
call targets in a one-element cache in the instruction stream.  Use
the cache for inlining attempts in the optimizing backend.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 11:42:02 +00:00
kmillikin@chromium.org
c1b978c076 Fix a GC-safety issue in optimized code.
It's not safe to use an immediate heap object in generated unless we take
pains to ensure it's not in new space.  Continue using the caller's context
for inlined functions on all platforms except IA32.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 12:20:11 +00:00
jkummerow@chromium.org
0455aadbeb Add Crankshaft support for smi-only elements
Review URL: http://codereview.chromium.org/8002019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 12:09:04 +00:00
kmillikin@chromium.org
883f32695b Enable inlining functions with contexts different than their caller.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 09:17:56 +00:00
svenpanne@chromium.org
1311b8f0e2 Improve Hydrogen code for accessing undefined/null/Infinity.
In some special (but probably very common) cases we can do better than loading
from a global cell for these global properties by emitting the corresponding
constant directly. This opens up opportunities for further improvements, coming
in a separate CL...
Review URL: http://codereview.chromium.org/7992002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 08:00:06 +00:00
danno@chromium.org
f48c9f6557 Basic support for tracking smi-only arrays on ia32.
Activated by the flag --smi-only-arrays

Currently not crankshaft support, using flag on non-ia32 platforms will lead to write barrier misses and crashes.

BUG=none
TEST=elements_kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 11:30:04 +00:00
rossberg@chromium.org
fdade92c20 Reorganize object type enum, such that proxies are no longer in the middle
of the range of proper JS objects.

Unfortunately, callable types no longer form a range now. However, there
are only two anyway. We put them at either end of the range of JS object
types so that certain compares can be combined.

R=erik.corry@gmail.com,kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:46:54 +00:00
kmillikin@chromium.org
99eab94443 Reapply "Clean up Context::Lookup and its uses."
The threading test failures seem to be due to a GC-unsafe place, that
mixed handles and raw pointers, in the runtime code for context
lookup.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 08:51:44 +00:00