Commit Graph

4486 Commits

Author SHA1 Message Date
sgjesse@chromium.org
4c6329c8f8 ARM: Try to fix broken commit r6504
Commit contained wrong assert and was missing call to the runtime system for MUL.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/6338019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 21:15:46 +00:00
karlklose@chromium.org
3141494c3e Refactor recording of safepoints.
Refactor SafepointTableBuilder::DefineSafepoint and ARM LCodeGen::RecordSafepoint to use an enum for different kinds of safepoints. This change removes a lot of duplicated code and makes it easier to include new kinds of safepoints in the future. The remaining variants of LCodeGen::RecordSafepoint remain as a convinient way to record common safepoint kinds.

BUG=http://code.google.com/p/v8/issues/detail?id=1043
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 20:48:48 +00:00
sgjesse@chromium.org
33c591b4ad ARM: Add multiplication to the type recording binary operation stub
Review URL: http://codereview.chromium.org/6391004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 20:25:33 +00:00
mmaly@chromium.org
d07f1d62ff Strict mode eval/arguments LHS.
Review URL: http://codereview.chromium.org/6335013/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 19:21:46 +00:00
mmaly@chromium.org
498e3ce3cc Compress Variable class.
Review Link: http://codereview.chromium.org/6246019/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 18:15:43 +00:00
kmillikin@chromium.org
c1bbd04dce Remove the HInstruction utilities taking flag mask arguments.
It is a type error to treat a flag (an enum) as if it were a flag mask (an
int derived from shifting a bit by the enum value).  It is error prone to
have functions that take flag mask arguments because they will silently
accept flags.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 17:32:02 +00:00
kmillikin@chromium.org
09e967b38f Use more detailed compilation info for inlined functions.
Construct the statically-known compilation info for inlined functions using
the target closure (which knows about its scope chain) and not from the
shared function info (which doesn't).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 17:30:22 +00:00
fschneider@chromium.org
38b91a4ffe Fix issue 1076 by resetting labels of switch-clauses before use.
If we compile a function literal twice with the full code generator,
we must make sure that the labels embedded in the AST are reset.

BUG=1076

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:28:17 +00:00
ager@chromium.org
eb3970c822 Fix another message object leak.
Review URL: http://codereview.chromium.org/6269021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:16:13 +00:00
antonm@chromium.org
be9f5d8548 Fix indentation.
TBR=serya@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:02:02 +00:00
kmillikin@chromium.org
884221f8f0 Change the default implementation of DataEquals for Hydrogen instructions.
The former default was true. The new default is false and the default
implementation is UNREACHABLE so it asserts in debug builds.  The function
is overridden in all concrete instruction classes that might have the flag
kUseGVN set.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 14:51:21 +00:00
whesse@chromium.org
75c6bffbd1 X64 Crankshaft: Fix compilation error on Windows X64.
Review URL: http://codereview.chromium.org/6338018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 13:54:25 +00:00
kmillikin@chromium.org
a1a46fb1ce Clean up Hydrogen's HLoadFunctionPrototype.
This instruction was setting an incorrect collection of Changes/Depends
flags.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 13:37:51 +00:00
whesse@chromium.org
cd935a417b X64 Crankshaft: Remove relative jump to deoptimization code. Fixes logical error, and compilation error on Windows.
Review URL: http://codereview.chromium.org/6310018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 13:24:19 +00:00
sgjesse@chromium.org
9d463bd6a1 ARM: Fix the type recording binary operation stub subtract
Failure exposed by Sputning tests where the generic case tried to string add for subtract.
Review URL: http://codereview.chromium.org/6339013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 12:31:35 +00:00
kmillikin@chromium.org
97f09782fa Disable all code motion on the final optimization attempt.
Before, we disabled code motion for check instructions on the final
optimization attempt.  It is unsafe to prevent movement of check
instructions but to allow movement of instructions that assume the checks
were performed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 10:25:43 +00:00
sgjesse@chromium.org
26a8dc3818 ARM: Make the ARM hardware builder green
Fix a bug in the --debug-code alignment check in the C entry stub.

Don't force the --debug-code flag in the ARM disassembler tests. The framework does support passing flags and the test runner will when running tests in debug mode.

Skip some deserialization tests which crashes from time to time.
Review URL: http://codereview.chromium.org/6393007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 09:52:25 +00:00
ager@chromium.org
0e183035a2 ARM: Merging constants in simulator and assembler header files and other cleanup.
First stab at a general ARM cleanup patch. It merges ARM constants so that they can be used across simulator, assembler and disassembler, and tidies up some syntax and ambiguities.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:32:54 +00:00
erik.corry@gmail.com
591eb3f406 Minor cleanup: Use MaybeObject instead of bool and Failure** in
stub cache generation.
Review URL: http://codereview.chromium.org/6392003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:12:56 +00:00
fschneider@chromium.org
1c4dfa30fa Revert r6543 and r6441.
This fixes a crash in the code generator.

BUG=1074

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:03:48 +00:00
sgjesse@chromium.org
0282f707af Fix presumbit.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/6250031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:00:51 +00:00
sgjesse@chromium.org
06515b6f1b ARM: Change BranchOnSmi/BranchOnNotSmi to JumpIfSmi/JumpIfNotSmi
Review URL: http://codereview.chromium.org/6272019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 07:44:45 +00:00
sgjesse@chromium.org
12c74ba0c6 ARM: Add subtract to the type recording binary operation stub.
Review URL: http://codereview.chromium.org/6324013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 07:41:02 +00:00
mmaly@chromium.org
2b47762e3a Strict mode object property validation.
Review URL: http://codereview.chromium.org/6335010/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 18:42:35 +00:00
mmaly@chromium.org
f5a2860534 Strict mode parameter validation.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 17:21:45 +00:00
whesse@chromium.org
948265619b Revert change 6468: X64 Crankshaft functions added.
Review URL: http://codereview.chromium.org/6260018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 16:37:18 +00:00
vitalyr@chromium.org
76483f871b Support StringLength in hydrogen (similar to ArrayLength).
To avoid deopts a few extra changes were needed:

o Enable megamorphic state for special property loads on
  primitives. We used to flip between monomorphic stubs.
o Extract pure string (no string wrapper support) version of the
  string length stub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 15:51:10 +00:00
sgjesse@chromium.org
99a5b9f713 ARM: Initial type recording binary operation stub
This implements the type recording binary operation stub for ARM. This first iteration only supports ADD. Handling of 32-bit integers is currently not implemented but just transitions. The generic case for now delegates to the generic binary operation stub.
Review URL: http://codereview.chromium.org/6342019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 14:52:35 +00:00
lrn@chromium.org
1494beed42 X64 Crankshaft: Added some functions needed for delta-blue.
Review URL: http://codereview.chromium.org/6262013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 14:03:20 +00:00
ager@chromium.org
d57f91aa15 Prepare push to trunk. Now working on version 3.0.12.
Review URL: http://codereview.chromium.org/6324012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 13:59:23 +00:00
kmillikin@chromium.org
013860d42e Revert "Reapply change to with/arguments interaction."
Revert this change again.  Somewhat mysteriously we sometimes get empty
contexts that we do not expect in the context chain.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 13:01:45 +00:00
sgjesse@chromium.org
a6a80b9121 Fixed typo in calling Thread::set_name() on freebsd.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:59:43 +00:00
whesse@chromium.org
4c9254c054 Add compilation guard to new x64-only file, for Mac platform.
Review URL: http://codereview.chromium.org/6249016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:50:18 +00:00
sgjesse@chromium.org
c5e4800963 Adding GC hooks to support LiveObjectList functionality.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:35:06 +00:00
sgjesse@chromium.org
63378e2e5d Script changes so that we can build debug/release with
liveobjectlist=on/off and objectprint=on/off.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:28:45 +00:00
vitalyr@chromium.org
331b482332 Fix bug 1070: set correct holder for primitive checks.
Code generated for checks starting with primitive receivers skips one step
in the usual prototype checking algorithm, so the holder must always be set.

Not setting the holder did not cause an immediate failure because our
primitives have additional hidden prototypes before the real prototypes.
These extra objects in the chain usually contain no properties and so
allowed the right holders to be selected.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:21:03 +00:00
ricow@chromium.org
2a741d4946 Do not shuffle parameters when doing sub on ia32 and arm.
Review URL: http://codereview.chromium.org/6283012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:17:02 +00:00
sgjesse@chromium.org
17cb50b926 IA32: Refactor common string add code.
Review URL: http://codereview.chromium.org/6279011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:14:56 +00:00
ricow@chromium.org
6c800fa6fd Implement x64 lithium instructions DoGlobalObject and DoSub
Review URL: http://codereview.chromium.org/6324011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 11:33:03 +00:00
lrn@chromium.org
43d7951677 X64 Crankshaft: Added a bunch of operations.
Review URL: http://codereview.chromium.org/6366010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 11:30:47 +00:00
fschneider@chromium.org
2444e3f247 Port to ARM and x64: Record the lazy deoptimization environmnent only at LLazyBailout-instructions.
This is a port of the change http://codereview.chromium.org/6348016/
to ARM and x64 platform.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 10:35:57 +00:00
whesse@chromium.org
136db7b861 Port new version of ParallelMove's LGapResolver to X64.
Review URL: http://codereview.chromium.org/6366003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 10:10:36 +00:00
ricow@chromium.org
cadb9cb635 Port changes from x64 deoptimizer to ia32 and remove commented out code from last patch.
Review URL: http://codereview.chromium.org/6368013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 08:59:16 +00:00
ager@chromium.org
d69ef26f7d Another fix for leaking error objects. User code can overwrite
ReferenceError.prototype.__proto__ which will make "error instanceof
Error" fail. However, the ReferenceError.prototype object itself
cannot be modified. Therefore, the error checks must check for
concrete error instances instead of only checking for Error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 08:48:59 +00:00
ricow@chromium.org
d5cab38a33 Add support for deoptimization on x64.
I did not take out the code relating to osr from the generate method
since this makes it easier to compare to ia32 (we will abort anyway when we hit the osr code so there should be no issues with having this in)
 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:57:56 +00:00
sgjesse@chromium.org
161d631b5e Change ARM exit frame layout and alingment handling
Change the ARM exit frame to have the same layout as the IA32 exit frame. This basically re-arranges the order of fp and sp and changes the sp location of the entry frame to hold the sp used by the gc and not the sp for popping the arguments. This removes the option of tearing down the frame and returning using one ldm instruction.

The main motivation for this is to avoid pushing an alignment word before generating the entry frame. The GC handling of optimized frames process the registers pushed as part of a safepoint and asumes that these are at the top of the frame, so if an alignment word is pushed this processing will be one off.

The alignment handling in the C entry stub have also been simplified. Now the value of lr is stored to a stack slot already reserved avoiding pushing it and keeping track of "frame skew".

This does result in more instructions in the exit frame on ARM, but we can look into improving this later.
Review URL: http://codereview.chromium.org/6247019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:49:39 +00:00
lrn@chromium.org
2e8b8d3ddf Fix bad assumption in object literal interpretation.
We allow symbols that are array indices.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:48:19 +00:00
mmaly@chromium.org
8d79f3a788 Strict mode octal literals.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 18:13:18 +00:00
ager@chromium.org
4c8fbaffa1 Move stack check patching to the architecture dependent deoptimizer
files. On ARM it is not enough to iterate the relocation information
because that will only give us access to the constant pool and not to
the place in the instruction stream where the target in the constant
pool is called.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 14:54:45 +00:00
kmillikin@chromium.org
9c2d52eb0e Fix a bug in delete for lookup slots.
The function Runtime_LookupContext searches the context chain for a
LOOKUP slot and returns the object holding the slot.  It returned the
global context if the slot was not found or if it was found in a
function's context or arguments object.  This is not the correct
object to use for 'delete'.

Since this lookup function is only ever used when deleting LOOKUP
slots (those that have to go through a with or a scope with eval), it
is simply replaced with a Runtime_DeleteContextSlot function that does
the appropriate thing for all kinds of context lookups.

This fixes Chromium bug 70066.
http://code.google.com/p/chromium/issues/detail?id=70066

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 14:03:30 +00:00
fschneider@chromium.org
811e778592 Record the lazy deoptimization environmnent only at LLazyBailout-instructions.
This saves one pointer per LIR instructions. The change relies on the fact
that there is a LazyBailout instruction at all the places where we need
to register a lazy deoptimization environment.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 13:29:39 +00:00
ager@chromium.org
883a56717d ARM: Implement DoIsObject and DoIsObjectAndBranch in the lithium code generator.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 12:28:38 +00:00
vegorov@chromium.org
3650601588 Prepare push to trunk. We are now working on 3.0.11.
Review URL: http://codereview.chromium.org/6272015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 12:01:42 +00:00
fschneider@chromium.org
672f5ffab6 Port lithium template classes to ARM.
This is a port of the IA32 version and is needed to allow 
changing the register allocator interface in a later change.



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 09:43:14 +00:00
ager@chromium.org
b5151d118d Avoid calling overwritten toString methods for internal error
formatting. I missed a couple of places. Extracting the error object
check to a separate function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 07:59:40 +00:00
ricow@chromium.org
8a1416c78d Fix double allocation of register on arm in DoDeferredMathAbsTaggedHeapNumber.
This should fix the sputnik issue on the arm simulator.

Priorly tmp2 and tmp3 could potentially be the same register as input.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 07:56:57 +00:00
ager@chromium.org
73e8bc9e1a WebKit build needs to be told where to look for ICU package.
Chromium already sets this variable in common.gypi which is force included to all gyp files in the build.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 06:54:51 +00:00
kbr@chromium.org
cbc1c0fca6 Truncate rather than round to nearest when performing float-to-integer
conversions for external array types, which implement the Typed Array
spec. (Revision of http://codereview.chromium.org/6315004 .)

Prefer SSE2 code path on x86 processors. Non-SSE2 processors now make
a slow runtime call for float-to-int conversions. Use SSE3 for 32-bit
signed and unsigned int array types where possible.

The movement of code from ic-arm.cc to stub-cache-arm.cc caused the
VFP3 code path to be tested for the first time. Fixed bugs in the
register usage and in the constant value stored into integer arrays
for NaN and +/-Infinity.

Added new truncation test to test-api.cc. Storage of NaN and +/-Inf
was already covered. Ran unit tests on x86, x64 and ARM simulator.
Tested ia32 and x64 code in Chromium on Mac and Linux respectively
with Typed Array unit tests and WebGL content.

BUG=http://code.google.com/p/chromium/issues/detail?id=50972
TEST=test-api/ExternalArrays

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 23:58:00 +00:00
ager@chromium.org
bb9c9fe92c Change recursive error printing to just replace recursively
encountered error objects with the empty string. This actually does
match the Safari behaviour.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 14:11:35 +00:00
ager@chromium.org
ca14680556 Return the empty string when formatting recursive error messages. This
matches the behavior of Safari and Firefox. Our old behavior was to
throw a stack overflow exception.

BUG=crbug.com/70334
TEST=mjsunit/cyclic-error-to-string.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:44:29 +00:00
vegorov@chromium.org
fd250a2244 GDBJIT: do not register NULL lineinfo when gdbjit integration is disabled.
Review URL: http://codereview.chromium.org/6255008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:36:19 +00:00
kmillikin@chromium.org
8a9eeaf8da Reapply change to with/arguments interaction.
This is svn r6415 with a bugfix.

The bug was that we can have scopes with 0 heap slots (functions with
such scopes do not need a local context) and scopes with at least
Context::MIN_CONTEXT_SLOTS.  The code generator only allocated a local
context if there were strictly more than Context::MIN_CONTEXT_SLOTS.
Before the change to with/arguments, it was impossible to actually get
a function scope with exactly Context::MIN_CONTEXT_SLOTS because every
such scope included a heap-allocated arguments (and arguments shadow)
slot.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:28:35 +00:00
fschneider@chromium.org
c630134ed2 Remove default template parameter T for the number of temps.
Instead require that the number of temps be specified at each declaration.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 10:31:28 +00:00
vitalyr@chromium.org
7d96f2d40f Fix Smi::IsValid assert in StringCharCodeAt deferred code.
Review URL: http://codereview.chromium.org/6303013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 08:30:13 +00:00
mmaly@chromium.org
4cb51b51e6 First part of strict mode.
- var eval | arguments
- catch (eval | arguments)
- 'with' is disabled
- function can't be named eval or arguments

Add FLAG_strict_mode

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 18:51:47 +00:00
karlklose@chromium.org
f914324293 Implement fast code for the common cases of left hand sides that are less than three times larger as the right hand side and and right hand sides that are powers of two up and including 32.
In the covered special cases the result is computed directly, else the generic stub is called. The implementation deoptimizes only for mod 0 and if the result may be a negative zero.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 17:42:29 +00:00
fschneider@chromium.org
5b2dff9806 Remove unused function AddGapMove from the register allocator.
Review URL: http://codereview.chromium.org/6355009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 14:37:28 +00:00
ager@chromium.org
49d646b14c ARM: Implement StringLength and StringCharCodeAt in the lithium-arm
backend.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 14:20:54 +00:00
kmillikin@chromium.org
6b89b5975f Revert "Make 'with' mark only variables occurring in the body as used."
This reverts SVN revision 6415 due to layout test failures.

TBR=ricow

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:58:57 +00:00
kmillikin@chromium.org
3d15b43393 Begin changing Hydrogen branch instructions.
Rename HBranch (the instruction that coerces an arbitrary HValue to
control flow) to HTest to free up the term Branch to refer to any
control instruction with two successors.

Change the virtual FirstSuccessor and SecondSuccessor functions on
control instructions to a pair of data members.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:56:34 +00:00
fschneider@chromium.org
89e74000a0 Use typefeedback for bitwise operations.
Add a generic tagged version for all bitwise operation that
invoke the generic stub. This allows us to perform generic
bitwise operations (i.e. on non-integers) without deoptimizing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:47:22 +00:00
kmillikin@chromium.org
7f43cf0539 Make 'with' mark only variables occurring in the body as used.
Before, we conservatively marked every variable in a scope as used if the
scope contained 'with'.  Instead, just mark the variables occurring in the
body of the with.  This avoids marking 'arguments' as used whenever 'with'
occurs, which incurs an extra performance penalty (a use of arguments is
seen as an instruction to redirect all parameter accesses to the arguments
object).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:32:43 +00:00
sgjesse@chromium.org
198bcbaa13 Adding build script changes to support LiveObjectList functionality.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:38:01 +00:00
sgjesse@chromium.org
4653cc0aff Fix Windows compile
Review URL: http://codereview.chromium.org/6260014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:21:40 +00:00
sgjesse@chromium.org
e528223fe2 Stubbed out empty liveobjectlist files.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:11:53 +00:00
ager@chromium.org
1c2fddb4c8 ARM: Implement Math.abs in lithium code generator for the integer and
tagged case. I couldn't find a way to test the double case yet so I'm
leaving that unimplemented for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:08:36 +00:00
vitalyr@chromium.org
b4ff318e4b Support StringCharCodeAt in hydrogen/lithium.
This patch adds H- and L-variants of StringCharCodeAt and StringLength.

StringCharCodeAt is used to inline a constant function call of
String.prototype.charCodeAt and to implement the corresponding inline
runtime function. It does not yet use the recently introduced extra IC
state. (We can specialize on string encoding and avoid deopts because
of out of bounds accesses.)

StringLength needs more work because the stub version of it also
supports strings wrappers and it matters in some cases. (We have to
separate the string only case.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 20:05:22 +00:00
ager@chromium.org
f6e177f075 Fix the ARM simulator's stop support and add conditional breakpoint.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 15:39:40 +00:00
kmillikin@chromium.org
70910af7a0 Fix an assertion failure in the full code generator.
We hit an assertion failure when we tried to record the AST ID of
the (shared) .arguments variable proxy more than once.  This was hit
when we had multiple calls to the same parameter in a function that
used the arguments object.  The fix is to not visit the subexpressions
of the (shared) property access expression.

BUG=1060

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 15:26:54 +00:00
sgjesse@chromium.org
3ff8e4d3fa ARM: Implement DoInstanceOfKnownGlobal stub
BUG=none
TEST=none

Patch by Martyn Capewell from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 14:53:38 +00:00
mikhail.naganov@gmail.com
0f1a2bda1a Fix Linux x64 compilation
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 14:51:01 +00:00
mikhail.naganov@gmail.com
7984684ec9 Introducing MemoryMappedExternalResource for creating an external
resource from a memory mapped file for creating strings.

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

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

Relanded with Windows compilation issues fixed.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 14:28:15 +00:00
fschneider@chromium.org
ac0b1ded7b Move LOperand class to lithium.h and move implementations out of .h into .cc files.
Review URL: http://codereview.chromium.org/6378004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:55:56 +00:00
lrn@chromium.org
93a0b80609 X64: Fix bug in DoBranch that miss detecting NaN as falsy.
Review URL: http://codereview.chromium.org/6369005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:52:08 +00:00
ager@chromium.org
56073b733f ARM: Implement HasInstanceType in lithium backend.
Review URL: http://codereview.chromium.org/6283006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:04:21 +00:00
ager@chromium.org
fb43b16e2b ARM: Implement DoCmpJSObjectEqAndBranch.
Review URL: http://codereview.chromium.org/6381001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:56:32 +00:00
vegorov@chromium.org
1db0a6a000 Make V8 more Valgrind-friendly.
While we don't have to flush icache on Intel CPUs when we patch code we still have to call CPU::FlushICache() to notify Valgrind otherwise Valgrind will run incorrect translations which will lead to strange crashes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:42:43 +00:00
ager@chromium.org
e65647eafc ARM: Implement StringCharAtStub.
Review URL: http://codereview.chromium.org/6334007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:35:41 +00:00
mikhail.naganov@gmail.com
53cbbe4a23 Revert "Introducing MemoryMappedExternalResource for creating an external"
Windows compilation is broken. Will fix and reland later.

This reverts commit fe13ffaa6d0c3435bfe1ae930813e456650ec980.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:20:10 +00:00
antonm@chromium.org
b0abe13ed2 Using unsigned shifts and masks when dealing with 64-bit addresses.
BUG=v8:1037

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:16:23 +00:00
mikhail.naganov@gmail.com
890a0f6b52 Introducing MemoryMappedExternalResource for creating an external
resource from a memory mapped file for creating strings.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 10:48:06 +00:00
lrn@chromium.org
e66ceb9079 X64 Crank: Implemented DoBranch and all *AndBranch comparisons.
Review URL: http://codereview.chromium.org/6374002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 10:17:18 +00:00
erik.corry@gmail.com
8d3b675586 Prepare push to trunk. We are now working in 3.0.10.
Review URL: http://codereview.chromium.org/6380003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 09:42:17 +00:00
sgjesse@chromium.org
7d4e4a325b Fix possibly wrong use of strncpy_s
This should also fix MinGW build.
Review URL: http://codereview.chromium.org/6376003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:34:24 +00:00
ager@chromium.org
6b4d29766c Revert r6376 and r6373 which changes external array support. The ARM
version did not work.

TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/6295013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:20:42 +00:00
antonm@chromium.org
49144ee6b6 Properly create variables to access outer arguments and function names.
Review URL: http://codereview.chromium.org/6266007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:16:17 +00:00
sgjesse@chromium.org
9e23f65bec Adding inspector module and macro-ized object type list.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:04:48 +00:00
ager@chromium.org
9ab1970860 Fix ARM compilation after external array changes.
TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/6261014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 07:18:04 +00:00
mmaly@chromium.org
d6f88b6688 Revert strict mode (Mozilla test failure).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 23:01:50 +00:00
kbr@chromium.org
27f0ae7aad Truncate rather than round to nearest when performing float-to-integer
conversions for external array types, which implement the Typed Array
spec. The new code paths are for SSE3 and SSE2 capable processors.
The code for non-SSE2 processors is unchanged for now. The ARM port
appears to already be correct.

Moved the generation of the external array load and store intrinsics
to the stub cache (on all platforms) so that they are generated at run
time and can take advantage of CPU features.

This functionality is covered by the array-unit-tests.html test in the
WebGL conformance test suite:
http://khronos.org/webgl/wiki/Testing/Conformance
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/array-unit-tests.html

Manually verified all of the SSE3/SSE2/non-SSE2 code paths by enabling
each in turn. Tested in Chromium on 32-bit Mac OS X and 64-bit Linux.

BUG=http://code.google.com/p/chromium/issues/detail?id=50972
TEST=none (see above)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 21:51:50 +00:00
vitalyr@chromium.org
11a4cb5718 Introduce extra IC state to record additional feedback from IC-s.
Extra IC state is only two bits and only supported for call IC-s for
now. To change its extra state an IC stub jumps to a new miss stub
that goes to runtime as usual but then instead of going megamorphic
generates a monomorphic stub with the updated state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:54:48 +00:00
mmaly@chromium.org
b4c88d5de4 First part of ES5 strict mode.
- var eval | arguments
- catch (eval | arguments)
- 'with' is disabled
- function can't be named eval or arguments
- function parameter name cannot be eval or arguments
- no duplicate parameter names allowed

Add FLAG_strict_mode

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:43:53 +00:00
vegorov@chromium.org
80b7a0e164 Fix lint error introduced by r6367.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:16:00 +00:00
vegorov@chromium.org
3003b2156b Basic GDB JIT Interface integration.
It has certain overheads even when gdb is not attached so it is guarded by ENABLE_GDBJIT_INTERFACE define and --gdbjit flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:11:01 +00:00
whesse@chromium.org
9cee28138a X64 Crankshaft: Add addition of tagged and int32 values to Crankshaft on x64. Enable CallIC to global function to call optimized code.
Review URL: http://codereview.chromium.org/6329006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 14:32:13 +00:00
fschneider@chromium.org
2ecfe94997 Fix operand type for keyed calls.
Record the key as a input operand for keyed call instructions instead
of wrongly making it a temp operand.

This bug does currently not show up as a problem because the 
uses are recorded only in the instruction summary.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 14:25:05 +00:00
antonm@chromium.org
ec16aa9a17 Do not optimize functions which are in new space.
If there are many shortliving closures, they pollute sampler window and
delay optimizations of functions which should be optimized.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 13:59:49 +00:00
vitalyr@chromium.org
c919bb7d4a Disable aggressive optimizations on the last optimization attempt.
Only has effect on the loop invariant code motion and Check instructions
for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 13:43:48 +00:00
ager@chromium.org
2729e09caf ARM: Implement double constants in the lithium ARM backend and fix
missing minus zero check in MathFloor implementation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 11:31:17 +00:00
lrn@chromium.org
94a0444b7b Incremented preparse version number.
Revision 6309 changed which functions were considered lazy.
That also means that there must be preparse data for now non-lazy functions.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 10:00:36 +00:00
ager@chromium.org
e61725c525 Landing for Mark Larson.
Add a README.chromium and LICENSE file for Strongtalk assembler.

This allows the Chromium license tool to automatically include
Strongtalk in about:credits.

BUG= None
TEST= Strongtalk section in Chrome's about:credits
R= ager

Codereview URL: http://codereview.chromium.org/6357004/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 07:25:05 +00:00
antonm@chromium.org
4b6981f74d Do not use possibly stale values for cache size, etc.
Those value can become invalid if cache gets cleared by GC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 16:54:56 +00:00
lrn@chromium.org
d2df943bde Merge changes to LTemplateInstruction to X64 (Issue 1048).
Implement ConstantD and ConstantI.

BUG=1048

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 13:51:59 +00:00
ricow@chromium.org
3d245133a3 Enable compilation of very simple functions in x64 crankshaft.
This change includes support for safepointtables and adding deoptimization info (but not for deoptimizing).

Implemented crankshaft functions:
CallCode
GenerateSafepointTable
RegisterEnvironmentForDeoptimization
EmitGoto


This change allows us to compile very simple functions with crankshaft:
An empty function
A function returning a constant.
A function returning a parameter.

There is 6 disabled tests that require us to be able to deoptimize
which is currently not supported.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 13:11:39 +00:00
fschneider@chromium.org
e7610a3e14 Add UseAny to create a LOperand without register preference.
The result can be a register, a stack slot or a constant operand.

Right now it is only used for enviroment uses.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 12:54:52 +00:00
ager@chromium.org
7095d1ec26 ARM: Reenable Div and Mod in the ARM lithium codegenerator. The
crashes uncovered by this were caused by constant pool in safe-point
tables. This should be safe to enable now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 12:52:06 +00:00
ager@chromium.org
ac320205b9 ARM: Fix ARM safepoint tables by ensuring that constant pools are not
emitted as part of the safepoint tables.

Always emit the constant pool as part of generating deferred code
(whether or not there actually is any deferred code) and ASSERT that
there is no pending relocation info while using db and dd to write
tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 12:45:39 +00:00
fschneider@chromium.org
87e82b0452 Remove the remaining LOperand-members from concrete LIR instructions.
This change introduces the third template parameters for LIR instructions
to specify the number of temp-operands. This is one step towards
removing the instruction-summaries.

I also added hydrogen-accessors in more places and refactored
the LIR-branch instructions to have common super-classes to 
avoid code duplication.

Added MUST_USE_RESULT to the functions that record uses
and definitions so that all LOperands are stored in the
LIR instructions (and not only in the summaries).



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 12:22:31 +00:00
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
sgjesse@chromium.org
3342871af5 Prepare push to trunk. We are now working in 3.0.9.
Review URL: http://codereview.chromium.org/6354006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 10:38:47 +00:00
fschneider@chromium.org
3ff2cebd96 Remove unnecessary recording of temp operands in the register allocator.
When processing register contraints we used to add writable input operands
also as temp operands to the same instruction.

This does not seem necessary since we create a fresh virtual register
for writable inputs and insert a definition in the gap before the instruction.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 10:08:58 +00:00
lrn@chromium.org
f09705ab9b Make invalid break/continue statements an early syntax error.
Previously we delayed the throwing of syntax errors until runtime, so
unreachable errors didn't get reported.
To match a change in JSC, we now stop parsing and report the error immediately.

BUG=69736
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 09:36:10 +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
antonm@chromium.org
3afbf69f53 Relax verification of JSFunction result caches.
As invocation of a functin may trigger GC and hence clear all the caches,
it's hard to ensure previous invariants.

Current invariant is both a key and a value should be the holes or not holes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 07:03:19 +00:00
sandholm@chromium.org
dd242e3fe1 Optimize JSON stringify by allowing QuoteJSONString to prefix with a comma.
Review URL: http://codereview.chromium.org/6335004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-16 21:29:32 +00:00
whesse@chromium.org
762f9cf72c Fix typo that breaks compilation on x64.
Review URL: http://codereview.chromium.org/6342003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 16:15:40 +00:00
whesse@chromium.org
5187615943 Fix accidental change to ia32 in r6329.
Review URL: http://codereview.chromium.org/6362001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 16:10:00 +00:00
sgjesse@chromium.org
da1f6926e1 Avoid trashing the FPSCR when calculating Math.floor
The restoring of FPSCR could restore a random value as the restore point could be jumped to from before FPSCR was loaded.
Review URL: http://codereview.chromium.org/6344002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 15:39:18 +00:00
karlklose@chromium.org
4e274ca11d Fix compilation failure on ia32 and x64.
TBR=ager

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 15:24:41 +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
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
ager@chromium.org
fd3edaf074 Fix name of the toString method on error objects. Bug caught by layout tests.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/6258004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 14:51:19 +00:00
lrn@chromium.org
2b4767b584 X64: Fix allocated register name table.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 14:03:05 +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
ager@chromium.org
c1306244a6 Make the 'name' property on error prototypes read-only and dont-delete
to avoid leaking of error objects to accessor methods when formatting
error messages internally.

Also, do not call overwritten toString methods on error objects when
formatting messages internally.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 12:51:04 +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
ricow@chromium.org
8a3bd712ad Fix win64 build by using int instead of size_t for position in StringBuilder
Review URL: http://codereview.chromium.org/6353002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 11:54:38 +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
ricow@chromium.org
7954752479 Implement DoStackCheck in x64 crankshaft
Review URL: http://codereview.chromium.org/6257002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 11:35:02 +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
lrn@chromium.org
3800b24f69 Don't lazily compile functions that are immediately receded by '('.
We heuristically expect those functions to be called immediately.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:50:13 +00:00
lrn@chromium.org
2cccc4009f Fix bug when the scanner does a pushback at the end of input.
We don't advance the input cursor past the end of input, so we shouldn't
decrease it when we pushback the kEndOfInput marker.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:49:18 +00:00
ricow@chromium.org
463d722a8b Fix presubmit
Review URL: http://codereview.chromium.org/6326002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:33:41 +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
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
podivilov@chromium.org
3a167b1fbe Add function for setting breakpoint by scriptId and position to debugger script
Review URL: http://codereview.chromium.org/6301001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 17:32:10 +00:00
antonm@chromium.org
8805509f28 Wrap external pointers more carefully.
On 32-bit platforms any pointer with 0 as LSB can be wrapped into Smi.  However, on 64-bit
platforms it's currently not the case as x64 Smis must have 0s in lower 32 bit word.
Even worse, macroassembler Move instruction will try to fetch integer value from Smi
and will shift by 32 bits to the right rendering stored pointer incorrect.

BUG=v8:1037

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 15:56:33 +00:00
vitalyr@chromium.org
ac9b035a45 Expose receiver check type in call type feedback.
This a preparatory step to support fast function calls on primitive
values. Not really used yet in hydrogen.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 14:16:08 +00:00