kmillikin@chromium.org
437914da90
Change the algorithm and generated code for parallel moves on IA32.
...
Instead of spilling and then immediately restoring eax to resolve
memory to memory moves, the gap move resolver now tracks registers
that are known to be free and uses one if available. If not it spills
but restores lazily when the spilled value is needed or at the end of
the algorithm.
Instead of using esi for resolving cycles and assuming it is free to
overwrite because it can be rematerialized, the gap move resolver now
resolves cycles using swaps, possibly using a free register as above.
The algorithm is also changed to be simpler: a recursive depth-first
traversal of the move dependence graph. It uses a list of moves to be
performed (because it mutates the moves themselves), but does not use
any auxiliary structure other than the control stack. It does not
build up a separate list of scheduled moves to be interpreted by the
code generate, but emits code on the fly.
Review URL: http://codereview.chromium.org/6263005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 11:25:36 +00:00
antonm@chromium.org
fae90d4f32
Make closures optimizable by Crankshaft compiler.
...
Currently only closures which only read from the context are supported.
Review URL: http://codereview.chromium.org/5753005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 08:11:03 +00:00
ager@chromium.org
0819ac76f6
Landing for Martyn Capewell.
...
ARM: Implement DoInteger32ToDouble in lithium codegen. Clean up
temporary register use.
Code review URL: http://codereview.chromium.org/6257003/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 07:26:36 +00:00
karlklose@chromium.org
d2d81743c9
Disable DivI and ModI again until the bug with SafepointWithRegistersAndDoubles is solved.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6295004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 15:08:44 +00:00
kmillikin@chromium.org
199846b786
Move class LGapResolver to the platform specific backend implementation files.
...
This change is in preparation for introducing platform-specific strategies
for resolving parallel moves.
Review URL: http://codereview.chromium.org/6324003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 12:50:03 +00:00
karlklose@chromium.org
0e26f42bc1
ARM: Implement DoModI stub in the lithium code generator.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6314003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 11:48:43 +00:00
karlklose@chromium.org
da03f275d2
ARM: Implement DoDivI in the lithium code generator.
...
This change provides fast code for a few special cases and calls the GenericBinaryOpStub for the rest.
It also changes the register allocation in the generation of lithium instructions to use fixed registers that are compatible with the generic stub. This allocation can be change once we use a more flexible implementation.
Finally, this change provides infrastructure to save double registers at safepoints, which is need to call the stub in deferred code.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6164005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 08:49:52 +00:00
ager@chromium.org
0ec74d5829
Landing for Rodolph Perfetta.
...
Implementing Math.floor and Math.sqrt for crankshaft.
BUG=none
TEST=none
Code review URL: http://codereview.chromium.org/6250002/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 12:21:47 +00:00
vitalyr@chromium.org
9e204dd5df
Simplify CheckPrototypeMaps.
...
This instruction only depends on the prototype and the holder and can
completely ignore the receiver and its map.
This change also fixes a small bug on arm where a cell was loaded
instead of the prototype from new space.
Review URL: http://codereview.chromium.org/6094020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 00:34:08 +00:00
sgjesse@chromium.org
8f54606109
ARM: Always use the overflow flag to check for NaNs participating in a floating point compare.
...
Looks as if we don't need to use the vcmpe instruction instead of the vcmp, as the overflow FPSCR bit suits our purpose. If we at some point need vcmpe lte's implement it as a separate instruction.
Review URL: http://codereview.chromium.org/6197003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 07:47:13 +00:00
whesse@chromium.org
b6ebcd58c6
Crankshaft: Move LEnvironment and LPointerMap classes to platform-independent lithium.h. Move WriteTranslation method from LEnvironment class to LCodeGen class.
...
Review URL: http://codereview.chromium.org/6142011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 15:51:08 +00:00
karlklose@chromium.org
43b0399505
Implement DoApplyArguments.
...
ARM: Implement DoApplyArguments in the lithium code generator.
This patch also introduces an optional SafepointGenerator argument to InvokeFunction, InvokeCode and InvokeProloque.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6164003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:11:03 +00:00
ager@chromium.org
59c158e43f
ARM: Implement ClassOf in the lithium arm backend.
...
Review URL: http://codereview.chromium.org/6201004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:01:53 +00:00
kmillikin@chromium.org
a7c743d3ac
Reuse the gap move resolver.
...
Rather than allocating a fresh gap move resolver for every parallel
move, use a single one per Lithium code generator. This avoids always
reallocating the temporary zone-allocated lists used by the gap move
resolver.
Review URL: http://codereview.chromium.org/6128007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 13:50:12 +00:00
sgjesse@chromium.org
c4550bc6d5
ARM: Add instructions VFPCompareAndSetFlags and VFPCompareAndLoadFlags to macro assembler
...
Also removed the SBit from the vcmp instruction as it is not part of the instruction.
Review URL: http://codereview.chromium.org/6117003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:45:25 +00:00
ager@chromium.org
a314fa4581
ARM: Add deferred stack overflow checks to goto code generation in ARM
...
lithium when needed.
Review URL: http://codereview.chromium.org/6192005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:32:00 +00:00
fschneider@chromium.org
6b00bdf2f2
Fix ARM debug build by moving an assert.
...
Review URL: http://codereview.chromium.org/6127005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:20:22 +00:00
ager@chromium.org
b3d4ea357c
ARM: use existing transcendental cache stub for tagged inputs.
...
Review URL: http://codereview.chromium.org/6167004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:54:37 +00:00
fschneider@chromium.org
b9f5ab9ef1
Remove duplicate members from some LIR instruction by using the HIR accessors.
...
Remove unused LOperands from keyed-loads. We do not have multiple representations
for load instructions anymore.
Correct number of output operands as for a couple of instructions form 1 to 0
because they do not produce a result (e.g. PushArgument)
Review URL: http://codereview.chromium.org/6158004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:41:01 +00:00
ager@chromium.org
cd4ae721e2
ARM: Implement delete operation in lithium codegen.
...
I'm using the post call generator for the macro assembler
InvokeBuiltin call to be consistent with the ia32 version. It only
generates one call, but using the post call generator it should be
easier to catch if we change that at some point.
Review URL: http://codereview.chromium.org/6119004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 12:24:19 +00:00
ager@chromium.org
5e3381c9c7
Landing for Martyn Capewell.
...
ARM: Fix comparison of NaN values.
Enables the cumulative exception flag when comparing values, and uses it to
detect NaN results.
BUG=1023
TEST=none
Code review URL: http://codereview.chromium.org/6142004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 08:04:30 +00:00
ager@chromium.org
d9e5078bbc
Landing for Martin Maly.
...
Implement DoCallKeyed for arm lithium compiler.
Code review URL: http://codereview.chromium.org/6139002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 07:59:13 +00:00
sgjesse@chromium.org
dae44fd3ee
ARM: Fix lithium codegeneration of TypeofIs
...
The previous implementation was incomplete and wrong.
TBR=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6113003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 14:27:32 +00:00
sgjesse@chromium.org
97621e7e32
ARM: Implement lithium codegen for DoTypeof, DoTypeofIs and DoSmiUntag
...
Review URL: http://codereview.chromium.org/6174001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 13:44:05 +00:00
karlklose@chromium.org
e74b0ae7db
ARM: Support DoCallGlobal in lithium code generator.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6094011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 12:34:39 +00:00
sgjesse@chromium.org
a6c5fa6993
ARM implementations of LoadElements, LoadKeyedFastElement, StoreNamedField, StoreKeyedFastElement.
...
BUG=none
TEST=none
Patch by Martyn Capewell from ARM Ltd.
Review URL: http://codereview.chromium.org/5967008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 07:33:46 +00:00
karlklose@chromium.org
d4bbad8e4e
ARM: Support DoCheckInstanceType in lithium codegenerator.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/6040008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 15:25:03 +00:00
danno@chromium.org
90445b33a4
Implement DoFunctionLiteral on ARM.
...
Review URL: http://codereview.chromium.org/6112001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 12:53:59 +00:00
sgjesse@chromium.org
68ddff5f90
ARM: Change a number of lithium instruction operands to be in registers
...
Using operands which could possible be in stack slots would require a load instruction anyway, so having the register allocator putting them into registers seems most logical.
Review URL: http://codereview.chromium.org/6046014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 12:21:06 +00:00
sgjesse@chromium.org
7c0c72eb2c
ARM: Fix a bug in the lithium arguments support
...
Got the comparison wrong and fortot to actually set the flags.
Review URL: http://codereview.chromium.org/6085010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 10:56:23 +00:00
ager@chromium.org
af09d94ecd
ARM: support regexp literals in lithium-codegen-arm. Also, update
...
comment on the AllocateInNewSpace macroassembler method.
Review URL: http://codereview.chromium.org/5965014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 08:56:29 +00:00
sgjesse@chromium.org
c26bd162f8
ARM: support arguments access in lithium-codegen-arm.
...
Review URL: http://codereview.chromium.org/5989013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 07:28:51 +00:00
sgjesse@chromium.org
f5fb75ce09
Fix comparison bug on ARM.
...
Retrieves the result of VFP comparison from the VFP status register.
BUG=none
TEST=none
Patch by Martyn Capewell from ARM Ltd.
Review URL: http://codereview.chromium.org/6020014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:06:32 +00:00
sgjesse@chromium.org
0cd558a355
Fix the build breakge on x64 and ARM after r6173
...
The instanceof changes was not fully ported to x64 and ARM.
Review URL: http://codereview.chromium.org/6031013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:01:53 +00:00
danno@chromium.org
498841c743
Implement ARM lithium support for ObjectLiteral.
...
Review URL: http://codereview.chromium.org/6099006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 09:04:06 +00:00
danno@chromium.org
d44f3a0223
Implement Lithium ARM support for ArrayLiteral.
...
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/5988008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:48:25 +00:00
sgjesse@chromium.org
71d863e5de
Set a fixed scratch register for ARM code generation
...
r9 is now set as a fixed scratch register for ARM code generation. removed some unneeded allocation of temporary registers and use the scratch register instead.
Review URL: http://codereview.chromium.org/5976014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:32:54 +00:00
karlklose@chromium.org
20c858d514
First part of lithium ARM port.
...
Implement LoadNamedField, CallConstantFunction, CmpMapAndBranch, JSArrayLength, BoundsCheck, IsNull, CallFunction, and CallStub in the ARM lithium codegenerator.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6069010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 13:02:51 +00:00
fschneider@chromium.org
0a128e5ae7
Optimize array-length and fast element loads.
...
1. Separating out the instance-type check from the array-length operation.
2. I also changed the bounds-check on keyed loads to use the length property
for JS arrays (like we do for array stores).
The new pattern should use less registers and allow more checks to be eliminated.
Review URL: http://codereview.chromium.org/5961016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-30 19:30:42 +00:00
karlklose@chromium.org
16800adf57
Fix inlining of instanceof stub for ARM (r6093).
...
Review URL: http://codereview.chromium.org/6055006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-23 16:33:30 +00:00
vitalyr@chromium.org
c5916f552f
Support load function prototype in hydrogen/lithium.
...
Review URL: http://codereview.chromium.org/6009005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 15:43:32 +00:00
karlklose@chromium.org
16837c1f33
Implement inlining of instanceof tests on ARM.
...
TBR=sgjesse
BUG=
TEST=
Review URL: http://codereview.chromium.org/6004005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:52:50 +00:00
whesse@chromium.org
5656d64ece
Add untagged double versions of Math.sin and Math.cos. Merge classes TranscendentalCacheStub and TranscendentalCacheSSE2Stub.
...
Review URL: http://codereview.chromium.org/5996002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 13:52:14 +00:00
erik.corry@gmail.com
2996dca6aa
Support %_IsObject in Crankshaft.
...
Review URL: http://codereview.chromium.org/5806001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 12:32:19 +00:00
ager@chromium.org
48d884de48
ARM: Fix heap number allocation in lithium-codegen-arm that assumed
...
that ip can be used as a scratch register. This is not true because
ip is already used for something else in AllocateInNewSpace in the
macro assembler.
Explicitly allocate a temp register for use in the heap number
allocation instead.
Review URL: http://codereview.chromium.org/5788001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:10:54 +00:00
ager@chromium.org
5e80d5df5d
ARM: Fix missing SetCC in crankshaft code emitted when running with
...
the --debug-code flag.
Review URL: http://codereview.chromium.org/5736003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 12:12:06 +00:00
kasperl@chromium.org
90b3370374
Update V8 to version 3.0 (re-land r5920).
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096
Revert r5920. Will re-land shortly.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8
Update V8 to version 3.0.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00