Commit Graph

1166 Commits

Author SHA1 Message Date
karlklose@chromium.org
b606195012 ARM: Fix disasm for strh, vabs, vneg. Add load/store tests.
Patch from ARM Ltd.

BUG=none
TEST=added to test/cctest/test-disasm-arm.cc

Original review at http://codereview.chromium.org/7013024/.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 14:44:49 +00:00
sgjesse@chromium.org
b9c771c106 ARM: Reduce amount of code generated for context save on deopt.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-12 13:33:14 +00:00
vitalyr@chromium.org
03c00ee6a6 Support symbol comparison in crankshaft.
Review URL: http://codereview.chromium.org/7000021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 12:50:04 +00:00
whesse@chromium.org
b77f131914 Don't emit code for HContext values with no uses.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 12:11:23 +00:00
vitalyr@chromium.org
4cc800b3cf Support %_IsUndetectableObject in crankshaft.
Review URL: http://codereview.chromium.org/6995046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:53:43 +00:00
fschneider@chromium.org
6db15ae34b Remove peephole optimiziations from IA32 and ARM assembler.
They are not used with Crankshaft anymore.
Review URL: http://codereview.chromium.org/7003025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:29:53 +00:00
whesse@chromium.org
bf06fbdbf1 Recommit "First step in letting Crankshaft inline functions with a different context.""
This reverts r7810, thus recommitting 7807.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 11:03:12 +00:00
erik.corry@gmail.com
291781ed3c Limit the generation of regexp code with large inlined constants.
Review URL: http://codereview.chromium.org/6997015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 06:39:27 +00:00
jkummerow@chromium.org
944a388412 Avoid using a register for constant external array indices.
This CL is based on and obsoletes CL 6879037.

TEST=mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 15:25:17 +00:00
vitalyr@chromium.org
c10267f1fa Refactor HCheckInstanceType to allow mask/tag tests.
This allows us to get rid of totally fake LAST_STRING_TYPE and makes
it possible to test for symbols.

I considered splitting HCheckInstanceType into two instructions, but
it seems nice to be able to hide the instance type implementation
details from the hydrogen level.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-10 14:17:23 +00:00
vegorov@chromium.org
d9c80d4771 Propagate a Failure from GenerateDictionaryNegativeLookup instead of causing GC.
Review URL: http://codereview.chromium.org/6973001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 16:15:18 +00:00
fschneider@chromium.org
45d07bcd32 Simple elimination of redundant array-hole checks.
If the result of an fast elements load is converted to an untagged
representation we can omit the hole check if the value is not used
anywhere else except for HChange instructions converting it to
an untagged representation since those will deoptimize for the hole
value anyway.
Review URL: http://codereview.chromium.org/6964012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 15:21:40 +00:00
vitalyr@chromium.org
07ed2f1263 Compare IC: add SYMBOLS state.
Review URL: http://codereview.chromium.org/6960011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 13:30:04 +00:00
whesse@chromium.org
912ec759da Revert "First step in letting Crankshaft inline functions with a different context."
This reverts commit r7807.  TBR=kmillikin@chromium.org.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 15:02:15 +00:00
vitalyr@chromium.org
913ce07e2f Extract common code in string compare loops.
Review URL: http://codereview.chromium.org/6927044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 14:19:51 +00:00
whesse@chromium.org
efc43746df First step in letting Crankshaft inline functions with a different context.
Use a special slot for HContext, and fetch the value from there each time it is used.  Allocate space for special slots in every HEnvironment.  Fill them with constant undefined.  Do not copy them to LEnvironment.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 13:26:22 +00:00
dslomov@chromium.org
2500f14868 This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

Committed: http://code.google.com/p/v8/source/detail?r=7734

Committed: http://code.google.com/p/v8/source/detail?r=7784

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 18:55:31 +00:00
vegorov@chromium.org
9a9211e22d Unroll more StringDictionary lookup probes both for positive and negative dictionary lookups.
Review URL: http://codereview.chromium.org/6932010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 12:30:57 +00:00
vitalyr@chromium.org
5b2e2636b7 Faster string equals in generated code.
In my previous change I mixed up "compare" and "equals". This made us
miss the fast length check before comparing strings for equality.

Now we have a separate helper for "equals". It shares some of the
inner loop details with "compare". I'll see if this can be cleaned up
without making it unreadable.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 11:40:08 +00:00
ager@chromium.org
0af052870f Support polymorphic loads of constant functions as well as fields.
R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 09:22:09 +00:00
ager@chromium.org
4e85fab9f9 Fix overflow in arm simulator.
Don't copy 64 bits to a 32 bit value.

R=karlklose@chromium.org,sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 06:22:58 +00:00
ricow@chromium.org
e0eb110130 Reapply 7763, including arm and x64 variants.
The only difference to revision 7763 is the implementation in the
builtins file for arm and x64, plus a move of Array.prototype.toString
and Array.prototype.toLocaleString from should throw on null or
undefined to the non generic test cases in the function-call test (due
to us not currently supporting generic cases with these to functions)
Review URL: http://codereview.chromium.org/6928007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 05:21:30 +00:00
vitalyr@chromium.org
4ca7b50990 Compare IC: add STRINGS state.
BUG=1340

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 18:30:37 +00:00
whesse@chromium.org
788db8aedc Tiny refactoring - change compilation phase parameter for CopyForInlining from a boolean to an enum.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 15:00:04 +00:00
svenpanne@chromium.org
1b833ff35e Additional minor cleanup regarding CallWrapper: Use the null object pattern.
Review URL: http://codereview.chromium.org/6909026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 15:12:40 +00:00
svenpanne@chromium.org
5197bff4f2 Unified CallWrapper and PostCallGenerator classes, the former is a
generalization of the latter. This makes CallWrapper architecture-independant,
so it can be pulled up into assembler.h, nuking 3 copy-n-paste classes. Only a
small improvement, but nevertheless...
Review URL: http://codereview.chromium.org/6893156

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 09:30:06 +00:00
sgjesse@chromium.org
01707c7106 ARM: Changed the handling of compiletime CPU feature detection
Always use CpuFeaturesImpliedByCompiler() when selecting CPU features. This checks both for CAN_USE_ARMV7_INSTRUCTIONS and CAN_USE_VFP_INSTRUCTIONS and for GCC preprocessor symbols. This will support using the CAN_USE_XXX for a simulator build used for generating a snapshot followed by a crosscompile using -march= and -mfpu= for selecting the (minimal) target device CPU features. The snapshot will use instructions based on the CAN_USE_XXX whereas the target will at least use features based on both CAN_USE_XXX and -march= and -mfpu=, but will try runtime CPU feature detection a well looking for somethis better.

Remove the compiler based CPU feature detection from the OS::CpuFeaturesImpliedByPlatform() as it did not belong there. Also was already in the CpuFeaturesImpliedByCompiler().

Add the variable 'v8_can_use_vfp_instructions' to the GYP file which can be used to turn on CAN_USE_VFP_INSTRUCTIONS when building V8. I did not add any -mfpu= cflags for this, as there are several options here (e.g. vfp and neon).

R=erik.corry@gmail.com, karlklose@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 06:51:59 +00:00
svenpanne@chromium.org
b60baa0b70 Removed InvokeJSFlags enum, we already have InvokeFlag for the same purpose.
Review URL: http://codereview.chromium.org/6880321

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 20:07:41 +00:00
svenpanne@chromium.org
238349f2a7 Removed dead code: GenericUnaryOpStub is not used anymore, as a consequence, NegativeZeroHandling and UnaryOpFlags are dead, too.
Review URL: http://codereview.chromium.org/6903124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 17:49:53 +00:00
karlklose@chromium.org
03459506e8 ARM: Fix handling of return value of compare_doubles in the simulator.
Review URL: http://codereview.chromium.org/6904124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 11:16:09 +00:00
sgjesse@chromium.org
00bc2db28f ARM: Support hardfloat in SCons build and make it a build time setting
Add option armeabi to the SCons build for selecting the floating point variant to use. Also add externally defined CCFLAGS environment for all targets. Run test.py with option -S armeabi=hardfloat to test with hardfloat enabled.

Make selecting hardfloat EABI variant a build-time option instead of a runtime option.

Add a simple check of the EABI variant during V8 initialization to exit if the compilation was not configured correctly. The reason for this is that GCC does not provide a compile time symbol defining the EABI variant. This check is not fool-proof as it cannot check the compilation configuration used for the snapshot if any.

R=karlklose@chromium.org, erik.corry@gmail.com

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 08:50:38 +00:00
svenpanne@chromium.org
fd5bff856e Fixed compilation breakage due to warnings. TBR...
Review URL: http://codereview.chromium.org/6880286

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 21:02:14 +00:00
svenpanne@chromium.org
e013d4f0a4 Type recording for unary ops
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 17:49:55 +00:00
kmillikin@chromium.org
bae61ba619 Sometimes avoid checking whether the receiver is an object in generated code.
In unoptimized code, use the version of the CallFunctionStub that does not
check whether its receiver is an object in all the cases where we statically
know that it is an object.

R=ager@chromium.org,sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 09:03:15 +00:00
whesse@chromium.org
d96dc0755b Add AST ID to RelocInfo for type-recording ICs. Changes 7644 and 7632, combined.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 15:02:59 +00:00
karlklose@chromium.org
7ba01a83e9 Implement hardfloat calling convention in macro assembler and simulator.
Review URL: http://codereview.chromium.org/6874007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 14:29:25 +00:00
fschneider@chromium.org
cbe2652682 Refactor lithium classes to reduce the number of virtual functions.
This reduces the binary size by making the Is* type-test functions non-virtual.

I had to change Gap and Label instructions to have a common abstract superclass because both act as gap-instructions for the register allocator.
Review URL: http://codereview.chromium.org/6880204

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 11:41:42 +00:00
vegorov@chromium.org
db2cb44b55 Fix an edge case in non-vfp3 version of TypeRecordingBinaryOpStub.
Review URL: http://codereview.chromium.org/6903030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 16:40:20 +00:00
vegorov@chromium.org
b62bdda7d1 Crankshaft support for IN.
In JavaScriptFrame::Print avoid printing optimized frame as if it is unoptimized.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 15:22:44 +00:00
jkummerow@chromium.org
75cfdf24e1 fix compile error in doublearray code on ARM
TEST=Bots are green

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-21 10:02:58 +00:00
jkummerow@chromium.org
bc8f6943bb Support Float64Arrays
BUG=None
TEST=mjsunit/external-arrays.js; updated cctest; existing unit tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-21 07:15:43 +00:00
kmillikin@chromium.org
4d1b2b1d38 Change the Hydrogen representation of uses.
Rather than representing a use as a pointer to an HValue and then searching
for the specific (ambiguous) operand, we now represent a use as a pair of an
HValue and the input operand index.  Additionally, use a linked list instead
of a growable array list since we never use random access.

This allows us to remove a bunch of similarly named and subtly different
functions from the HValue API.  The cost in extra zone allocation per use is
partially offset by reusing use list nodes when replacing a use of one value
with another.

R=danno@chromium.org,fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-20 10:38:08 +00:00
fschneider@chromium.org
a4283a5440 Revert r7665.
Review URL: http://codereview.chromium.org/6873106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-20 09:08:26 +00:00
fschneider@chromium.org
6197c1566a Lithium LLabel instruction are no longer used as gap instructions.
Instead we use the first part of the first gap after
the label to insert gap-moves for resolving control-flow
and phis.
Review URL: http://codereview.chromium.org/6873075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 16:14:42 +00:00
ricow@chromium.org
69a4c52bbf Revert revisions 7644 and 7632, they are causing assertion failures in interactive_ui_tests debug mode.
Review URL: http://codereview.chromium.org/6873076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 16:04:49 +00:00
fschneider@chromium.org
5f7eb953a1 Revert r7662.
Review URL: http://codereview.chromium.org/6878042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 13:43:36 +00:00
fschneider@chromium.org
cb70c1eaa4 Make predicates on lithium instruction classes non-virtual.
This is the lithium analog to the refactoring of the HIR classes in r7659.
Review URL: http://codereview.chromium.org/6877036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 12:34:07 +00:00
karlklose@chromium.org
26fda9bf32 ARM: Optimisations for call, jump and untag.
Improves some V8 benchmarks by a few % on A9.

Patch by ARM Ltd.

BUG=none
TEST=Added to test-assembler-arm.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 13:53:11 +00:00
fschneider@chromium.org
2d8556827e Fix x64 typefeedback for property assignments.
There was not ast-id recorded. I removed the default arguments
for the helper functions that emit IC calls to make sure
we are not missing other places.
Review URL: http://codereview.chromium.org/6878009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 10:51:57 +00:00
whesse@chromium.org
46164ee24e Record AST ids in relocation info at spots where we collect dynamic type feedback.
Review URL: http://codereview.chromium.org/6793016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 13:18:53 +00:00
karlklose@chromium.org
dab8f48ebc ARM: Implement correct rounding in the lithium codegenerator.
This patch provides testing for values that have a fraction part of 0.5 and uses a different rounding method for them. The original method of VFPTruncating the value with round-to-nearest is not correct because it does not round to the larger number in case of a tie.

BUG=http://code.google.com/p/v8/issues/detail?id=958

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 11:29:01 +00:00
ricow@chromium.org
edd2e6bb27 Fix presubmit.
Review URL: http://codereview.chromium.org/6869006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 08:40:16 +00:00
fschneider@chromium.org
ef24af119e Land Kevin's patch for supporting %_CallFunction in Crankshaft.
Original code review: http://codereview.chromium.org/6838018/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 07:58:22 +00:00
fschneider@chromium.org
348501ae01 Remove support for inlined property loads and stores.
The full code generator does not generate inline code for
property loads and stores. All this code is unused with
Crankshaft.
Review URL: http://codereview.chromium.org/6850015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 07:48:58 +00:00
vitalyr@chromium.org
cc782be64e Support string add in crankshaft:
o The type recording binary stub got a new type for string + string.

o Added HStringAdd and LStringAdd based on the new type info.

o Started using HValue types to avoid unneccesary checks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 06:39:36 +00:00
fschneider@chromium.org
418501faef Refine allocation policy for input operands at calls.
For instructions that are marked as calls we can use:

1. Fixed input registers

2. Use-at-start policy (register, memory or constant).

(Memory or constant would not need the use-at-start policy, but
not specifying use-at-start prevents the allocator from using
a register even if there is one available. That's why use-at-start
is required and guarded by assertion)
Review URL: http://codereview.chromium.org/6853010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 11:10:00 +00:00
karlklose@chromium.org
f7840f65f0 Isolates: Cleanup usage of FACTORY in code stubs and bootstrapper.
Review URL: http://codereview.chromium.org/6720014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 08:01:19 +00:00
sgjesse@chromium.org
6b12b41f30 ARM: Fix a number of issues with running without VFPv3 support
The type recording binary operations stub contained a number of issues which broke V8 when running without VFPv3 supoort.

1. The order of the high/low words of doubles in core register pairs where wrong
2. Missing allocation of a heap number for the result
3. Missing call to runtime

Added the option for printing the double values in register pairs to the simulator.

R=karlklose@chromium.org

BUG=v8:1315
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 11:59:17 +00:00
karlklose@chromium.org
bb1fe3ed9c Revert revision 7582.
The changes caused mozilla date test failures on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 08:00:59 +00:00
jkummerow@chromium.org
1d774ac5ca Fix load/store of external float arrays on ARM
BUG=1323
TEST=mjsunit/regress/regress-1323.js, run with simulator=arm

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 15:20:26 +00:00
karlklose@chromium.org
72fff00e48 ARM: Add optimization for constant RHS in DoMulI.
Patch by ARM Ltd.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 06:44:15 +00:00
sgjesse@chromium.org
af7804f3b7 ARM: Always enable ARMv7 when VFPv3 is enabled.
R=vegorov@chromium.org, rodolph.perfetta@gmail.com

BUG=v8:1317
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 06:12:45 +00:00
fschneider@chromium.org
544a436425 Remove code from the deprecated GenericBinaryOpStub.
All platforms are now using the TypeRecordingBinaryOpStub.

I also removed the ARM IntegerModStub which was called from
the GenericBinaryOpStub.
Review URL: http://codereview.chromium.org/6826032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 09:39:21 +00:00
sgjesse@chromium.org
75759805a9 ARM: Remove support for ABI prior to EABI
The support for the old ABI is known to be broken and has been deprecated for some time now. Removed the instructions for loading and storing co-processor registers as they where only used to support the old ABI.

R=karlklose@chromium.org

BUG=v8:1316
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 09:04:30 +00:00
sgjesse@chromium.org
a700211937 ARM: Fix wrong fall through handling
Looks like a copy/paste mistake.

R=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 08:59:29 +00:00
mmaly@chromium.org
164e3a4173 Strict mode fixes.
- mutual inlining strict and non-strict functions in crankshaft.
- assignment to undefined variable with eval in scope.
- propagation of strict mode through lazy compilation.

BUG=
TEST=test/mjsunit/strict-mode.js test/mjsunit/strict-mode-opt.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-08 14:30:10 +00:00
sgjesse@chromium.org
3ba56badb3 ARM: Fix a crash bug in code for %_IsStringWrapperSafeForDefaultValueOf
Turned out out that the setting of bit Map::kStringWrapperSafeForDefaultValueOf in Map::kStringWrapperSafeForDefaultValueOf was not done on the map but in some other memory location causing crashes.

R=vegorov@chromium.org

BUG=none
TEST=mozilla/data/js1_2/String/slice.js (crashed only on ARM hardware)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-08 11:37:30 +00:00
fschneider@chromium.org
3dbbb3d771 Add ToBoolean-conversion of constants in Crankshaft and use it when generating a branch based on a constant.
Review URL: http://codereview.chromium.org/6801050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-08 06:54:50 +00:00
danno@chromium.org
7f288c3a00 Fix cow fixed array map check in optimized arm code.
R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 15:01:20 +00:00
whesse@chromium.org
85363049ac Restart AST node numbering when we enter a function.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 14:45:34 +00:00
ager@chromium.org
95c76ed464 Remove some dead code.
- virtual-frame*
- register-allocator*
- jump-target*
- most of codegen*
- AstOptimizer and fields on AST

There is a lot of additional cleanup that we should do but this gets
rid of a lot.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 14:42:37 +00:00
vegorov@chromium.org
8a8d3bbbee In LCodeGen::DoDeferredLInstanceOfKnownGlobal emit safepoint with registers for the call to stub.
Review URL: http://codereview.chromium.org/6793017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 13:32:45 +00:00
danno@chromium.org
fa69fd0817 Fix opmitized external array access for compound assignments and count operations, also implement missing ARM typed array Hydrogen loads and stores.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 09:51:25 +00:00
mmaly@chromium.org
eb1443eb5b Fix build break on Mac.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 09:18:06 +00:00
fschneider@chromium.org
f983244124 Remove unnecessary AST node for ++ and -- operations.
Instead of adding an extra AST node we can just use an auxiliary
bailout id for named and keyed property count operations.
Review URL: http://codereview.chromium.org/6810015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 07:56:43 +00:00
mmaly@chromium.org
68482dbc10 Fix arm and x64 build break.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 22:47:14 +00:00
mmaly@chromium.org
76b5dc7bfb Strict mode renamings.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 20:20:31 +00:00
sgjesse@chromium.org
6255476028 ARM: Add support load/store multiple VFP registers
Enter/exit frames with save doubles use these instructions instead of generating 16 load/store instructions.

R=karlklose@chromium.org, rodolph.perfetta@gmail.com

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 09:06:23 +00:00
fschneider@chromium.org
7ef5cec9ae Remove environment length from HSimulate instructions.
It was only used in an ASSERT when reconstructing environments
at lithium translation time.
Review URL: http://codereview.chromium.org/6693062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-05 09:55:18 +00:00
sgjesse@chromium.org
1244225ba8 Extend crankshaft support for global stores
All global stores are now supported in crankshaft by using the normal store IC when other optimizations are not possible due to the state of the global object.

R=fschneider@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-04 15:03:34 +00:00
ager@chromium.org
ea8312ba33 Reapply: Never use classic code generator.
Crankshaft is now the default on all platforms. This is the first
patch on the way to removing the classic code generator from the
system.

This time with no removal of the crankshaft flag. --nocrankshaft is
not at all the same as --always-full-compiler which I had used instead
for testing. That was what caused timeouts on the buildbots because of
repeated attempts to optimize hot functions. It makes sense to keep
the crankshaft flag in case you want to run only with the full
compiler and with no adaptive compilation.

R=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 19:46:21 +00:00
vitalyr@chromium.org
6952f68ee3 Fix non-ia32 build.
Review URL: http://codereview.chromium.org/6771052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 15:37:59 +00:00
sgjesse@chromium.org
8099bf3531 Revert "Never use classic code generator."
This reverts r7469 which might have caused the timeouts on the buildbot.

TBR=ager@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 14:38:30 +00:00
karlklose@chromium.org
b8d5fd7d32 Cleanup usage of HEAP in mark-compact.
Review URL: http://codereview.chromium.org/6760025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 11:59:00 +00:00
sgjesse@chromium.org
1e8079fcc9 Increase coverage of global loads in optimized code
In the cases where a global property cell cannot be used in the optimized code
use standard load ic to get the property instead of bailing out.

This is re-committing r7212 and r7215 which where reverted in r7239 with the addition of recoring the source position in the hydrogen code for the LoadGlobalCell instruction. To record that position an optional position field has been added to the variable proxy AST node.
Review URL: http://codereview.chromium.org/6758007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 11:54:04 +00:00
vegorov@chromium.org
ae65366f0b Fix SlotRef::SlotAddress for parameters indices.
Fix %NewObjectFromBound to correctly handle optimized frames (including those with inlined functions).

Fix %_IsConstructCall handling in hydrogen: when called from inlined function return false constant directly instead of emiting HIsConstructCall.

Fix success case in TraceInline.

BUG=v8:1229
TEST=test/mjsunit/regress/regress-1229.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 11:41:36 +00:00
ager@chromium.org
1528bf7240 Never use classic code generator.
Crankshaft is now the default on all platforms. This is the first
patch on the way to removing the classic code generator from the
system.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 10:52:18 +00:00
ager@chromium.org
9eb3bfadd6 Implement %_IsStringWrapperSafeForDefaultValue in full code generators.
R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 08:02:12 +00:00
vitalyr@chromium.org
179aef2b8f VM initialization refactoring.
This patch introduces global once per-process initialization and moves
the OS and CPU setup there. This makes CPU features isolate-independent.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-31 16:17:37 +00:00
vitalyr@chromium.org
d89c753152 Only pass isolate parameter to C helper functions that need it.
Review URL: http://codereview.chromium.org/6778018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 18:05:16 +00:00
ager@chromium.org
d495f4934c Cleanup usage of HEAP and FACTORY in the cache stub compiler.
Review URL: http://codereview.chromium.org/6770011
Patch from Karl Klose <karlklose@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 08:18:56 +00:00
sgjesse@chromium.org
1eb224c2a2 ARM: Check for minus zero when converting binary operation result to smi
The result of an Int32 binary operation will be converted to a smi if it fits. However a minus zero check was missing.

BUG=v8:1278
TEST=test/mjsunit/regress/regress-1278.js

R=ager@chromium.org
Review URL: http://codereview.chromium.org/6755009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 07:43:27 +00:00
fschneider@chromium.org
fb457a8b87 Add binary-op stub variant to handle oddball objects more efficiently.
Review URL: http://codereview.chromium.org/6744006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 16:36:08 +00:00
sgjesse@chromium.org
5310b07c04 Add more details the --trace-deopt output
R=ager@chromium.org
Review URL: http://codereview.chromium.org/6735007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 12:27:56 +00:00
vitalyr@chromium.org
3216346258 Fix arm compilation on OS X 10.5 gcc.
Review URL: http://codereview.chromium.org/6758003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 09:32:11 +00:00
danno@chromium.org
f4e06e8a0b Fix ARM external array crankshaft bailout
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-25 11:16:29 +00:00
ager@chromium.org
cdf65ca087 Reimplement the padding of relocation information for lazy deoptimization on ia32.
The previous implementation attempted to keep track of the needed
relocation size for deoptimization while generating the optimized
code. That was error prone. This patch moves the relocation resizing
to the deoptimizer as the last step of creating an optimized code
object.

The down side to this approach is that two relocation information byte
arrays are created for all optimized functions that do not have enough
relocation space for lazy deoptimization.

R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-25 10:29:34 +00:00
sgjesse@chromium.org
3a1c4d9b78 mprove code generation for DoAddI, DoSubI and DoBitI when the right hand
side is a constant.

TEST=none
BUG=none

Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-25 07:41:35 +00:00
danno@chromium.org
ea45f6719e Support external arrays in Crankshaft
Add specialized hydrogen and lithium instructions to support loading and storing to external arrays.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-24 22:14:15 +00:00
fschneider@chromium.org
7d8e6c929d Enable GVN for polymorphic loads by not expanding them at the HIR level.
This change adds a new IR instruction for polymorphic loads. It performs
map compares and loads in one IR instruction instead of splitting each
load into a graph of map-compares and field loads.
 
The advantage is a smaller IR and less basic blocks, plus it allows to
do GVN on polymorphic loads.
Review URL: http://codereview.chromium.org/6708085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-24 10:11:51 +00:00