Commit Graph

2150 Commits

Author SHA1 Message Date
jkummerow@chromium.org
20cedf9a4b Liveness analysis for environment slots in Hydrogen
R=titzer@chromium.org

Review URL: https://codereview.chromium.org/15533004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 16:41:24 +00:00
mvstanton@chromium.org
8a02fd3be3 Turn off allocation site info for crankshafted array constructor calls.
Once we crankshaft a method, we should turn off allocation site info for
constructed arrays. Additionally, the semantics for doing this were
awkward because the constructed array code stubs get an
AllocationSiteMode as a minor key, but it's used as a permission to
determine the final mode locally based on ElementsKind. I refactored
this to a simpler boolean for override or local control.

BUG=
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/16206007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 12:48:51 +00:00
mstarzinger@chromium.org
f8db2414f2 Deprecate FACTORY helper macro.
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16337005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 10:30:05 +00:00
mstarzinger@chromium.org
d7975dfdab Deprecate HAllocateObject in favor of HAllocate.
This models the instantiation of an implicit receiver for CallNew nodes
in hydrogen using HAllocate together with generic stores instead of one
specialized HAllocateObject instruction, hence creating a single choking
point for inlined allocation in optimized code.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/15714005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 08:28:33 +00:00
svenpanne@chromium.org
b9e025a8dc Collect type feedback for power-of-2 right operands in BinaryOps.
Improved --trace-ic output for unary/binary ops a bit on the way. Moved int32_t/uint32_t conversion helpers around.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/15735005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-04 07:49:45 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
mvstanton@chromium.org
3d3c6b1599 Special Array constructor type feedback erroneously recorded when Array
was called as a function. Issue was found with optimize_constructed_array
turned on. This patch makes the fix, and turns the flag back on.

BUG=244461
R=danno@chromium.org

Review URL: https://codereview.chromium.org/16057005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 14:46:23 +00:00
verwaest@chromium.org
d0d7619d09 Remove duplicated initialization of stack_parameter_count_ of hydrogen stub descriptor.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-31 10:48:37 +00:00
verwaest@chromium.org
5b08a1a119 Fix DeferredTaggedToINoSSE2 to not unconditionally untag undefined to 0.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-31 08:37:34 +00:00
verwaest@chromium.org
1a4a904bef Replace DeoptimizeOnUndefined with whitelisting AllowUndefinedAsNan
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-30 09:11:06 +00:00
olivf@chromium.org
88755fb22a Convert ToBooleanStub to a HydrogenStub. Currently just using the existing HBranch instruction, which is still fully implemented in Lithium. Will refactor HBranch in a next CL.
[
CL breaks mips, since the deoptimizer in Deoptimizer::DoTranslateCommand(...) does not convert smis passed to the stub via a0.
]

BUG=
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/15302004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 14:49:28 +00:00
verwaest@chromium.org
7d32e7451f Don't explicitly pass requested representations to constants; implement ConstantS
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 10:47:55 +00:00
verwaest@chromium.org
290909268a Update the gap resolver to support Smi constants.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 12:37:29 +00:00
hpayer@chromium.org
5b469a6f41 Added old data space allocation infrastructure for pretenuring.
BUG=

Review URL: https://codereview.chromium.org/16099004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 09:38:28 +00:00
verwaest@chromium.org
cf9b1170d1 Support Smi in CompareIDAndBranch
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-28 09:24:39 +00:00
verwaest@chromium.org
aa2444269b Fix the hole loading optimization.
- Holes are only ever loaded as double or tagged.
- Change to tagged has to deoptimize on undefined (no implicit
  conversions from double the hole NaN -> tagged undefined).

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 17:33:14 +00:00
dcarney@chromium.org
81e5778718 make isolate accessible from returnvalue
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/16021010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 11:50:08 +00:00
verwaest@chromium.org
a64b7f926f Remove HCheckSmi, LCheckSmi and rename LCheckSmiAndReturn to LCheckSmi.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 09:58:46 +00:00
verwaest@chromium.org
3cb8f95c91 Tag smi-constants as smi. This also fixes code that copies holes into arrays.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-27 08:43:58 +00:00
verwaest@chromium.org
2a28f53b18 Fix hole handling, and ensure smi representation is handled properly
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 13:40:02 +00:00
titzer@chromium.org
77f85fa0d3 Remove offset() and is_in_object() from hydrogen and lithium LoadNamedField and StoreNamedField and use the appropriate methods on HObjectAccess instead
BUG=

Review URL: https://codereview.chromium.org/15881003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 12:40:08 +00:00
verwaest@chromium.org
eaec0b106f DummyUse if Representation::Tagged()+Type::Smi() to Representation::Smi()
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 12:30:24 +00:00
olivf@chromium.org
7aa74c3dc5 fix some names in compare nil ic
The compare nil ic introduces a mechanism called lightweight miss. The
idea is to insert a direct call to the miss handler instead of going
through the deopt routine. This can be use for uninitialized stubs, to
directly jump to the runtime.

This cl
1. Cleans up naming
2. localizes the lightweight miss functionality on the only user (compare nil ic)
3. fixes DoCodegen, to actually call the correct method (uninitialized vs initialized)

BUG=
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/15806005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 11:44:55 +00:00
svenpanne@chromium.org
7c0f77a4a5 Make (most of) --trace-codegen available in release mode. Better output.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/15941004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 10:57:59 +00:00
verwaest@chromium.org
c9a22a3c8d Replace tagged keys for fast access by smi, and use smi in boundscheck.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 08:52:35 +00:00
titzer@chromium.org
94b4240f5c Introduce ObjectAccess, which is used by LoadNamedField and StoreNamedField to denote what parts of an object are referred to by a given load or store. Refactor HGraphBuilder to use ObjectAccess, which removes the need to manually set GVN flags and simplifies the code as well.
Review URL: https://codereview.chromium.org/14284010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-24 08:38:21 +00:00
verwaest@chromium.org
d057410e20 Require smi for keyed store to smi.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 15:01:17 +00:00
verwaest@chromium.org
632f591884 Tag length of FixedArrayBase and smi-array[x] as smi representation
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 14:38:39 +00:00
mstarzinger@chromium.org
8fb2086847 Fix embedded new-space pointer in LCmpObjectEqAndBranch.
R=mvstanton@chromium.org
BUG=chromium:240032
TEST=mjsunit/regress/regress-crbug-240032

Review URL: https://codereview.chromium.org/15779004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 14:06:28 +00:00
mvstanton@chromium.org
1a4482ab3f Missing type cell on ia32 from bindings.
Javascript constructors called from C++ code didn't have a type cell
properly filled in on ia32. This showed up as a bug in webkit bindings.
Re-enabled flag optimize-constructed-arrays.

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/15870002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 13:45:33 +00:00
yangguo@chromium.org
a1e18bdf3c Improve SeqStringSetChar implementation.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 09:51:06 +00:00
verwaest@chromium.org
06b7bf60e1 Always require exact maps.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 09:19:18 +00:00
verwaest@chromium.org
d41f929080 Omit smi-check for write-barrier unless tagged.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 09:18:52 +00:00
verwaest@chromium.org
308e69755b Implement HChange support for Smis and use it in Load/StoreNameField
BUG=
R=verwaest@chromium.org

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

Patch from Daniel Clifford <danno@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-23 08:32:07 +00:00
verwaest@chromium.org
d1b5a2518d Handle holes in smi-untag from LoadKeyed requiring hole handling.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-22 16:32:33 +00:00
dcarney@chromium.org
881476a7af new style of property/function callbacks
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12494012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-21 06:36:24 +00:00
mstarzinger@chromium.org
80da843e22 Unify deoptimizer for JavaScript frames.
This unifies the translation of an optimized frame to a full JavaScript
frame. Only the frame's context and fp register as well as alignment
padding are different on each architecture and can be factored out.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14843020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-17 08:27:56 +00:00
titzer@chromium.org
5746d38351 Fix code gen bug on arm and mips; SeqStringSetChar overwrites a register; Add better default PrintDataTo for HInstruction
BUG=

Review URL: https://codereview.chromium.org/14895019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-16 14:27:39 +00:00
svenpanne@chromium.org
a14adc418a Cleaned up deopt output a bit.
Be a bit more consistent it what is printed. Removed the now superfluous
"*** DEOPT"-like output.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14612012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-16 09:44:59 +00:00
mstarzinger@chromium.org
365b2eb91e Preserve optimized code map during GCs weakly.
This change preserves the contents of optimized code maps during GCs but
treats the references in this cache weakly. It uses infrastructure from
code flushing to maintain a list of all caches.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/14794007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 16:09:25 +00:00
olivf@chromium.org
8bbe48c7b9 Add a HBreak instruction for debugging
BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14997008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 14:24:47 +00:00
verwaest@chromium.org
85949ac260 Shift additional_index by element_shift_size, not shift_size.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-15 14:04:44 +00:00
yurys@chromium.org
69c2f54d32 Skip samples where top function's stack frame is not setup properly
Stack iterator takes return address based on the frame pointer (ebp) and detects JS frames based on value at fp + StandardFrameConstants::kMarkerOffset. So in order the iterator to work correctly this values should be already setup for the current function. Stack frame is constructed at the very beginning of JS function code and destroyed before return. If sample is taken before before the frame construction is completed or after it was destroyed the stack iterator will wrongly think that FP points at the current functions frame base and will skip callers frame. To avoid this we mark code ranges where  stack frame doesn't exist and completely ignore such samples.

This fixes cctest/test-cpu-profiler/CollectCpuProfile flakiness.

BUG=v8:2628
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14253015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 22:51:33 +00:00
wingo@igalia.com
8f602260d3 Implement yield* (delegating yield)
Ideally this would have been implemented via desugaring at parse-time,
but yield* is an expression, and its desugaring includes statements like
while and try/catch.  We'd have to have BlockExpression in the AST to
support that, and it's not worth it for this feature.

So instead we implement all of the logic in
FullCodeGenerator::VisitYield.  Delegating yield AST nodes now have a
try handler index, for the try/catch.  Otherwise the implementation is
straightforward.

R=rossberg@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14582007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 16:26:56 +00:00
wingo@igalia.com
b7ecb8cb8d Revert mistakenly committed r14667 and r14666.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 16:17:26 +00:00
wingo@igalia.com
19b869549b Avoid loading "iter" twice.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 15:59:37 +00:00
wingo@igalia.com
25c1d78e3d Implement yield* (delegating yield)
Ideally this would have been implemented via desugaring at parse-time,
but yield* is an expression, and its desugaring includes statements like
while and try/catch.  We'd have to have BlockExpression in the AST to
support that, and it's not worth it for this feature.

So instead we implement all of the logic in
FullCodeGenerator::VisitYield.  Delegating yield AST nodes now have a
try handler index, for the try/catch.  Otherwise the implementation is
straightforward.

R=mstarzinger@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 15:59:25 +00:00
mvstanton@chromium.org
673cd2d674 Error found in test262 on ARM: BinaryOpStub could call out to a built-in and push parameters without an enclosing frame. This corrupted stackwalking.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/14813029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 15:30:55 +00:00
danno@chromium.org
6862babfd6 Remove HIsNilAndBranch (it's now unused)
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14971005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 12:56:53 +00:00
danno@chromium.org
b65b6d735f Ensure that soft-deopts don't count against opt_count
This makes sure that Crankshaft doesn't disable optimization to early on hot functions that still contain unexecuted code without type information.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14738009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 11:45:33 +00:00
mvstanton@chromium.org
604eb35515 BinaryOpStub::GenerateSmiStub() on 32bit would erroneously patch the IC in case of a gc requirement. Brought the behavior into line with ARM and x64. Also some cleanup to label names.
BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/15102006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 06:53:46 +00:00
danno@chromium.org
ddd72aa14f Only flush SharedFunctionInfo optimized code cache when necessary
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14604007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 19:22:18 +00:00
danno@chromium.org
cf1b80703f Improve trace_opt output to help find compilation problems
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14978003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 11:10:31 +00:00
danno@chromium.org
05e8e0e7b4 Elide hole checks on KeyedLoads of holey double arrays
Improves NavierStokes by about 5%

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/15014020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-13 07:35:26 +00:00
verwaest@chromium.org
df57747fc4 Track heap objects.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 17:17:50 +00:00
svenpanne@chromium.org
22159a1cf2 Robustification: Always assign an environment to LModI when a deopt is possible.
Currently things only work because of a very fragile interaction between minus
zero propagation and range analysis.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/14904008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 12:45:14 +00:00
mstarzinger@chromium.org
8829a94c24 Remove obsolete HArrayLiteral instruction.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/14847013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 09:52:08 +00:00
mstarzinger@chromium.org
efe91b56f6 Remove obsolete HObjectLiteral instruction.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/14972008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-10 09:47:05 +00:00
mvstanton@chromium.org
ef5211d8af Parallel compilation bug: LCallNewArray dereferenced a handle unnecessarily.
BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14761010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 16:48:27 +00:00
verwaest@chromium.org
52008429b7 Use mutable heapnumbers to store doubles in fields.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 15:02:08 +00:00
danno@chromium.org
bd9274436c Bias commutative single-use register inputs and support lea adds
This improves register allocation for many common add and multiply patterns on ia32 and x64 by reducing register pressure.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14856015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-08 08:37:24 +00:00
mvstanton@chromium.org
d7b013de57 Becuase of cross-context calls, hydrogen-based Array constructor needs to ensure
the array constructor pointer passed in matches that of the current context.

BUG=
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/14846017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 21:01:53 +00:00
wingo@igalia.com
3cd73ebc2f Generators return boxed values
Generators now box their return values in object literals of the form

  { value: VAL, done: DONE }

where DONE is false for yield expressions, and true for return
statements.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/13870007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 08:46:42 +00:00
mmassi@chromium.org
77924e7e5b Fix occasional crash when lithium goes out of vregs.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/14850013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-06 09:27:06 +00:00
mvstanton@chromium.org
84188e348b Before comparing input with a constant smi in GenerateRecordCallTarget(), make sure the input register is actually a smi.
BUG=

Review URL: https://codereview.chromium.org/14803005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 15:18:31 +00:00
titzer@chromium.org
dbcd0e925a Remove HLoadElements instruction and replace with use of more general HLoadNamedField. This removes the need for both the hydrogen and lithium instructions and allows both kinds of loads to be GVN'd.
Review URL: https://codereview.chromium.org/14556020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 12:21:16 +00:00
hpayer@chromium.org
ce3345123c Pretenure ASCII cons string in high promotion mode.
BUG=

Review URL: https://codereview.chromium.org/14451003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 10:36:16 +00:00
verwaest@chromium.org
51dded6e9c Turn the load field code stub into a hydrogen code stub.
Review URL: https://chromiumcodereview.appspot.com/14847004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 16:32:47 +00:00
verwaest@chromium.org
8b25614aa9 Always tag number candidate as smi if it does not come from load-keyed.
Review URL: https://chromiumcodereview.appspot.com/14556007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 14:41:06 +00:00
mstarzinger@chromium.org
47608c900a Allow more virtual registers to be encoded in LUnallocated.
This is a preparation which allows us to bump the virtual register width
from 15 to 18 bit without sacrificing width for other fields inside an
unallocated lithium operand.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14639008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 09:51:07 +00:00
dslomov@chromium.org
acf1a7c91c Accurate function prototypes for native calls from ARM simulator.
This is a resubmit of codereview.chromium.org/13818012 with the following modifications:
- src/x64/code-stubs-x64.cc for changes specific to Win64   calling conventions.
- src/sampler.cc for Native Client support

BUG=v8:2614

Committed: https://code.google.com/p/v8/source/detail?r=14491

Review URL: https://codereview.chromium.org/14305029

Patch from Brad Chen <bradchen@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:34:43 +00:00
dslomov@chromium.org
c5252a1bcd Revert "Accurate function prototypes for native calls from ARM simulator."
This reverts commit r14991. (one file missing)

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:31:09 +00:00
dslomov@chromium.org
d362e727e3 Accurate function prototypes for native calls from ARM simulator.
This is a resubmit of codereview.chromium.org/13818012 with the following modifications:
- src/x64/code-stubs-x64.cc for changes specific to Win64   calling conventions.
- src/sampler.cc for Native Client support

BUG=v8:2614

Review URL: https://codereview.chromium.org/14305029

Patch from Brad Chen <bradchen@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:16:40 +00:00
mstarzinger@chromium.org
04fdcad547 Fix HConstant::InNewSpace() for parallel compilation.
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/13977019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 08:00:43 +00:00
danno@chromium.org
d728493929 Allow setting debugger breakpoints on CompareNilICs
BUG=v8:2660
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14106011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 07:56:09 +00:00
svenpanne@chromium.org
f1e9ec2e12 Do not use repeated subtractions in mod-i, it hurts performance in general.
ARM only: Check for -0 only when really necessary. Tiny code de-duplication.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/14499011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-29 13:45:34 +00:00
verwaest@chromium.org
99e17bb12a Track storage types of instance variables.
Review URL: https://chromiumcodereview.appspot.com/14146005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 15:30:41 +00:00
mvstanton@chromium.org
84355ae411 Lithium: avoid registers for constants when possible.
BUG=

Review URL: https://codereview.chromium.org/14364010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 14:04:07 +00:00
dcarney@chromium.org
0a32b57594 HasOnlyAsciiChars can return incorrect results. Fixup usages and rename.
R=ulan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/14509012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 11:34:44 +00:00
mvstanton@chromium.org
e751ad06d9 Constructed arrays can be created with Hydrogen code stubs. The feature is still off by default (--optimize-constructed-arrays).
BUG=

Review URL: https://codereview.chromium.org/12385014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 16:00:32 +00:00
mstarzinger@chromium.org
8f1fc88f8c Relax --debug-code checks that runtime returns are not the hole
ia32, unlike the other architectures, includes a --debug-code check that
asserts that runtime functions do not return the hole.  However the new
SuspendJSGeneratorObject runtime does return the hole at times.

This CL adds a wee hack that only signals an error if the callee was not
SuspendJSGeneratorObject.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/13856011

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 12:00:07 +00:00
mstarzinger@chromium.org
71dc9e165f Capture receiver in generator object
Previously there has been no reason to context-allocate the receiver, so
access to the receiver always goes through the stack.  This was failing
with generators, which assumed that forcing context allocation would
relieve the need of storing anything but the context and the function on
the stack.

This CL adds a slot in generator objects to capture the receiver, and
restores it when resuming a generator.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14158006

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-25 10:59:09 +00:00
yangguo@chromium.org
d1df0e631d Clean up VMState a little bit.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 14:44:08 +00:00
mstarzinger@chromium.org
23f39546b9 Generators can resume
The generator object methods "next", "send", and "throw" now
include some inline assembly to set up a resumed stack frame.  In some
common cases, we can just jump back into the frame to resume it.
Otherwise the resume code calls out to a runtime to fill in the operand
stack, rewind the handlers, and possibly to throw an exception.

BUG=v8:2355
TESTS=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14066016

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 13:00:16 +00:00
danno@chromium.org
f8ddf3a262 Add monomorphic CompareNilICs and Crankshaft support
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/14367018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 11:32:17 +00:00
yangguo@chromium.org
cd99870ee7 Refactor ExternalReference::isolate_address() to not rely on Isolate::Current().
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 07:39:35 +00:00
yangguo@chromium.org
b2888632ea Fix clang build.
R=mvstanton@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 09:40:49 +00:00
yangguo@chromium.org
28bbe46a98 Disallow dereferencing deferred handles when generating optimized code.
R=mvstanton@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-23 09:23:07 +00:00
mvstanton@chromium.org
54a11734ac Fixed issue in StoreNamedField codegen where integer32 constants were not converted to a smi.
BUG=

Review URL: https://codereview.chromium.org/14075014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 15:35:23 +00:00
svenpanne@chromium.org
07a2a9cd19 Various improvements regarding the way we print code code comments.
* All Lithium instructions have an associated Hydrogen instruction now,
  simplifying things.

* Consistently print <Lithium instruction number,Hydrogen value id> prefixes.

* Do not print uninteresting Lithium instructions like empty gaps, jumps to the
  next instruction, etc.

* Removed special handling of HChange-like instructions, it is totally unclear
  why they had this special treatment. If we really want to print more
  information about Lithium instructions, we should do it in a totally way,
  anyway (e.g. by unifying things with the generation of hydrogen*.cfg files).

* Made deferred code and the jump table stand out a little bit more.

* Print info about special blocks like loop headers and OSR entries.

Review URL: https://codereview.chromium.org/14371005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 09:48:35 +00:00
mvstanton@chromium.org
37d11fb0f0 Improvements in lithium code generation. Recognizing if some operands are constants, we can often save on registers and instructions.
BUG=

Review URL: https://codereview.chromium.org/14022011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-22 07:47:25 +00:00
jkummerow@chromium.org
7155b96d41 OS::MemMove/OS::MemCopy: Don't call through to generated code when size == 0 to avoid prefetching invalid memory
BUG=chromium:233500

Review URL: https://codereview.chromium.org/14365011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 16:38:19 +00:00
mstarzinger@chromium.org
0f348e5592 Generator objects can suspend
* src/ast.h:
* src/parser.cc: Differentiate between the different kinds of yields, in
  anticipation of boxing return values.  Parse `return' into `yield' in
  a generator.

* src/runtime.h:
* src/runtime.cc (Runtime_SuspendJSGeneratorObject): New horrible
  runtime function: saves continuation, context, and operands into the
  generator object.

* src/arm/full-codegen-arm.cc (VisitYield):
* src/ia32/full-codegen-ia32.cc (VisitYield):
* src/x64/full-codegen-x64.cc (VisitYield): Arrange to call
  SuspendJSGeneratorObject.  If the call returns the hole, we suspend.
  Otherwise we resume.

BUG=v8:2355
TEST=These codepaths are tested when the generator is first invoked, and so
are covered by mjsunit/harmony/generators-objects.js.

Review URL: https://codereview.chromium.org/13704010

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 14:11:23 +00:00
svenpanne@chromium.org
0af76e96ea Simplified LCodeGen::GetNextEmittedBlock and LCodeGen::EmitGoto a bit.
GetNextEmittedBlock is always called with the same argument (an instance
variable), so let's remove it. In EmitGoto, avoid assignment to an argument.

This CL is split off another CL for easier reviewing.

Review URL: https://codereview.chromium.org/14246031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 12:02:12 +00:00
mvstanton@chromium.org
dfdd17fc2a Removed redundant instruction in VerifyX87StackDepth()
BUG=

Review URL: https://codereview.chromium.org/14353004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 07:23:09 +00:00
danno@chromium.org
80adb58933 Add infrastructure to automatucally generate IC miss stubs
Review URL: https://codereview.chromium.org/13886013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 20:37:27 +00:00
mvstanton@chromium.org
bfb3e6ce9c HArgument instructions currently require a frame. In Lithium we can ensure a frame
is created for these instructions via a compile info flag.

BUG=

Review URL: https://codereview.chromium.org/14354003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 15:44:38 +00:00
svenpanne@chromium.org
275891079a Cleaned up and fixed code comment handling a bit.
* Let GCC check the arguments of LCodeGen::Coment.
* Fixed a few call sites.
* Made basic blocks a little bit more visible in the code output.
* Sorted #includes.

Review URL: https://codereview.chromium.org/14079007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 13:45:19 +00:00
danno@chromium.org
fded35e019 Fix bugs in IfBuilder and improve functionality
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14344004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 10:51:24 +00:00
danno@chromium.org
f85f1e0d60 Improve generated code for HDoCompareObjectEqAndBranch on ia32/x64
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/14083008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 09:53:49 +00:00