Commit Graph

799 Commits

Author SHA1 Message Date
fschneider@chromium.org
c1d4d89a31 Remove unused Temp() function form LChunkBuilder.
Review URL: http://codereview.chromium.org/6217003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:38:13 +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
fschneider@chromium.org
9cace6b5f0 Use HIR accessor for CheckPrototypeMaps to remove the duplicate members in lithium.
Review URL: http://codereview.chromium.org/6221003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:10:11 +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
whesse@chromium.org
a139094016 Crankshaft: Move LParallelMove to lithium.h, add LGap to lithium-x64.h.
Review URL: http://codereview.chromium.org/6132002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 11:31:21 +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
whesse@chromium.org
7c94bf13b9 Create platform-independent lithium files, move LGapResolver and LGapNode there
Review URL: http://codereview.chromium.org/6121001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 11:49:22 +00:00
sgjesse@chromium.org
426f13e084 Fix GC issue in instanceof stub
The the call of the builtin in InstanceofStub was not correctly protected with an internal frame leading to the return address being handled as a pointer during GC.

Marked the Instanceof stub as allowing stub calls (the RecordWriteStub was removed some days ago).

This issue was not caught by the assertion designed for this when debug mode is run with --debug-code (which out tests always does) as generating code for Abort set the allow stub calls flag to true. This has been fixed by restoring the allow stub calls flag correctly.
Review URL: http://codereview.chromium.org/6097010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 10:37:26 +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
1eb68a859f Fix presubmit (r6209).
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 16:20:45 +00:00
fschneider@chromium.org
5fbaece14c Use a separate marker value to allocate the arguments object on deoptimzation.
Before we used the hole value for this purpose, but this does not work once we
start using the hole value for other purposes in the optimizing compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 15:53:56 +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
kmillikin@chromium.org
dde853a4ad Small change to stack checks in unoptimized code.
The stack checks include a loop nesting depth encoded in the code stream
after the call to the stack check stub.  Change the code to jump around this
instruction as well as the call when the stack check is OK.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 13:48:12 +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
2b7596a516 Instanceof slow case bind is incorrect.
Currently, the bind for the slow label is after the pushing of the
args registers which renders the args pushing dead code because there
is a Ret preceeding it. The comments also imply that the arg pushing
should be part of the InvokeBuiltins tail call.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 12:41:41 +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
806368bc92 Fix presumbit error
TBR=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6046012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:35:34 +00:00
fschneider@chromium.org
5bd44d212a Remove unused policy from register allocator.
DefineSameAsAny is never used and currently does exactly the 
same as DefineSameAsFirst.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:35:01 +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
sgjesse@chromium.org
d5b94e9704 Addresses some performance regression in the GenericBinaryOpStub on ARM following Crankshaft introduction.
BUG=none
TEST=none

Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:02:58 +00:00
kmillikin@chromium.org
c1fd8bcf60 Fix a bug in deoptimization environments.
The function HEnvironment::SetExpressionStackAt did not update the
environment's history.  This function is used to patch the bailout
environment for count operations and global function calls.

Reorganize class HEnvironment to make it fit V8's style a bit better
and to try to add some sanity to which C++ functions are intended to
be inlined.

Remove the flag --trace-environment which merely duplicated data in
the hydrogen.cfg file except without enough context to be useful.

BUG=1004

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 16:57:46 +00:00
whesse@chromium.org
3d7d258339 Remove RecordWriteStub from X64 and ARM platforms.
Review URL: http://codereview.chromium.org/5986014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 14:59:12 +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
sgjesse@chromium.org
d559d8c6c0 IA32: Optimize instanceof
The instanceoff stub now supports arguments in registers and checks for null,
smi and string values without going to runtime.

Needs porting to X64 and ARM.
Review URL: http://codereview.chromium.org/5828004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 08:58:42 +00:00
kmillikin@chromium.org
ace6290452 Fix issue 974.
When entering a finally block in unoptimized code, we unconditionally
save the accumulator register in the stack in case it holds a return
value or an exception.  In the case of a break, continue, or falling
off the end of the try or catch block, this value is unpredictable and
not necessarily safe for GC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 16:14:29 +00:00
fschneider@chromium.org
b93a0f5d9a Second attempt: Improve our type feedback by recogizining never-executed IC calls for binary operations.
This is an improved version of my earlier change r5970. It avoids degrading the
non-optimized code.

Initially we emit a conditional branch that is either always- or never-taken
after a smi-check (depending on whether we test for smi for for non-smi)
Since test-eax always sets the carry-flag to 0 we use jump-if-carry and
jump-if-not-carry.

The first invocation of the stub patches a jc with a jz and
jnc with a jnz-instruction so that the code looks exactly as it was
without patching. The only difference is the test- or nop-instruction
after the IC-call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 13:56:41 +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