Commit Graph

930 Commits

Author SHA1 Message Date
whesse@chromium.org
2810c2c044 X64 Crankshaft: Add DoParallelMove to x64
Review URL: http://codereview.chromium.org/6290004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 15:07:44 +00:00
lrn@chromium.org
9f5c1bfba1 X64 Crnakshaft: Added GeneratePrologue implementation.
Review URL: http://codereview.chromium.org/6326003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 13:16:48 +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
whesse@chromium.org
962d7019aa Speed up FastAsciiArrayJoin on ia32 by improving hand-written assembly code.
Review URL: http://codereview.chromium.org/6148007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:57:49 +00:00
ricow@chromium.org
5e557d3624 Add implementations of some more x64 lithium methods.
This puts us very close to being able to compile the empty function.

This changes only has a small number of 64 bit specific assembler instructions.

The remaining changes are much more platform specific and will go in another change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:27:25 +00:00
fschneider@chromium.org
9b7525fa3e Fix number of result operands for LThrow.
This instruction does not produce a result. We don't need a result
LOperand for it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 09:45:30 +00:00
ricow@chromium.org
4ea3e060bb Fix the xcode build by not including x64 specific code when generating
32 bit code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 14:10:26 +00:00
lrn@chromium.org
ba023c5405 X64 Crankshaft: Ported lots of boilerplate code.
Small tweaks to make X64 compliant.
A few UNIMPLEMENTED left, but most empty functions call Abort to bail out.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 10:04:02 +00:00
sgjesse@chromium.org
33006e3d70 Revert r6284 and r6283 as they caused the fuzzer tests to fail.
Review URL: http://codereview.chromium.org/6295002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 08:24:19 +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
fschneider@chromium.org
ad58227fcf Use hydrogen accessor in a few more places to save space in the lithium IR.
Review URL: http://codereview.chromium.org/6207007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 15:46:39 +00:00
vitalyr@chromium.org
e2f8c938c3 Allow arguments in safepoints with registers.
This should enable calling runtime functions with arguments from
deferred lithium code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 14:14:14 +00:00
sgjesse@chromium.org
855ffcd15b Fix bug in r6283
Make sure that arguments are pushed only once before calling runtime

TEST=11 sputnik tests
Review URL: http://codereview.chromium.org/6151009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 14:00:19 +00:00
sgjesse@chromium.org
1db3db1784 IA32: Refactor to avoid duplicate code.
Review URL: http://codereview.chromium.org/6226006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 12:52:15 +00:00
sgjesse@chromium.org
6a4df3791e IA32: Remove an invalid assert
Review URL: http://codereview.chromium.org/6129005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 11:53:30 +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
fschneider@chromium.org
b85538bc16 Introduce two more template parameter for Lithium instructions for input and temp operands.
Each LInstruction is now a subclass of LTemplateInstruction<R, I, T>

where R is number of outputs, I number of inputs and T number of temps.

This change only actually uses the parameter I for input operands. 
Since the parameter T for temps is 0, it incurs no extra cost. 

A separate change will introduce using the temps parameter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 15:47:34 +00:00
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
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
vitalyr@chromium.org
404fbb5b0b SSE2 truncating double-to-i.
Review URL: http://codereview.chromium.org/6049008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 13:48:49 +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
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
whesse@chromium.org
14cb39e543 X64 Crankshaft: Add LTemplatedInstruction and some derived classes to lithium-x64.cc.
Review URL: http://codereview.chromium.org/6128008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:33:52 +00:00
fschneider@chromium.org
f89ce8159a Split LInstruction into multiple variant to make our LIR more compact.
This change introduces LTemplateInstruction which is a specialized version
of LInstruction and takes one template parameter to indicate whether the
instruction produces a result operand.

All instruction that do not have a result inherit from LTemplateInstruction<0>.
Instructions that have a result operand from LTemplateInstruction<1>

All the Define* function only operate on instructions with a result.

For this to work I also refactored the places where we do 

  LInstruction* result = new Lxyy

into

  Lxyz* result = new Lxyz 



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 12:19:15 +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
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
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
1152cab095 Use hydrogen accessor instead of copying members.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 14:02:46 +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
whesse@chromium.org
2655060546 Fix errors in x64 crankshaft port, add failing tests to test expectations.
Review URL: http://codereview.chromium.org/6104004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 13:29:22 +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
9bc3a16af0 Fix bug in instanceof stub
If the instanceof stub was requested to deliver true/false objects as the result instead of 0/1 then 0/1 was actually returned if the builtin INSTANCE_OF ended up being called. This is now fixed.

BUG=v8:1020
TEST=test/mjsunit/regress/regress-1020.js
Review URL: http://codereview.chromium.org/6014013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 14:19:12 +00:00
sgjesse@chromium.org
344e534bde Change a static_cast to BitCast
Hopefuly this will make the Win32 builder happy

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 13:03:21 +00:00
whesse@chromium.org
3055ca216d Add private members to lithium classes on X64. Add implementation file lithium-x64.cc.
Review URL: http://codereview.chromium.org/6015014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:31:31 +00:00
whesse@chromium.org
7cdd2f6494 Add partially-implemented TypeRecordingBinaryOpStub to x64 platform.
Review URL: http://codereview.chromium.org/6084010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:28:47 +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
sgjesse@chromium.org
7311e10fdb Optimize instanceof further
If the instance of is performed against what is beliwed to be a constant global function inline the instance of check and have the call to the instanceof stub in deferred code. The inlined check will be patched by the instanceof stub when called from deferred code. This is indicated by the lithium instruction LInstanceOfKnownGlobal.

To help the patching the delta from the return address to the patch site is placed just below the return address in the edi slot of the pushad/popad ares. This is safe because the edi register (which is pushed last) is a temporary for the lithium instruction.

As the instanceof stub can call other JavaScript an additional marking for saving all double registers have been added.

Also tweaked the instanceof stub to produce true/false objects instead of 0/1 for the case with deferred code.
Review URL: http://codereview.chromium.org/5990005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 11:17:37 +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
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
vegorov@chromium.org
4dc3282556 Add constraints verification to LAllocator::MarkAsCall().
Review URL: http://codereview.chromium.org/6069012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:36:20 +00:00
whesse@chromium.org
7fa57552fa Cleanup of x64 code. Rearrange functions in ic-x64.cc to match order in ic-ia32.cc. Remove unused declarations, and move a constant to assembler-x64.h.
Review URL: http://codereview.chromium.org/6020012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:50:35 +00:00
whesse@chromium.org
c28bde775c Reorder the functions in stub-cache-x64.cc, so they are in the same order as in stub-cache-ia32.cc.
Review URL: http://codereview.chromium.org/6085006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:02:53 +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
sgjesse@chromium.org
04bf6c5c61 Use the macro assembler Set instead of explicit xor for clearing registers.
Review URL: http://codereview.chromium.org/6015011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 11:39:22 +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
vitalyr@chromium.org
24e560fe11 Don't emit a write barrier when storing a known old space value.
Review URL: http://codereview.chromium.org/6072009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-25 14:14:16 +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