Commit Graph

5322 Commits

Author SHA1 Message Date
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
fschneider@chromium.org
b4022f7b73 Fix bug in x64 >>> operator.
Whenever >>> produces a non-smi result, the binary op stub would
return a wrong result in case of a failed new-space allocation.

This also fixes the (flaky) sparse-array-reverse test which was failing
sometimes because of this.

BUG=v8:1359
TEST=mjsunit/sparse-array-reverse.js
Review URL: http://codereview.chromium.org/6927013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 08:17:31 +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
03852da3b8 Remove extra debug line from Object.prototype.toString
Fixes mozilla failures
Review URL: http://codereview.chromium.org/6935020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 05:51:43 +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
dslomov@chromium.org
6e4629a81c Revert "This implements per-isolate locking and unlocking, including tests"
This reverts commit 1aa40d0c278e195e9e69dcf8b29a212aa1817c0b.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 22:35:42 +00:00
dslomov@chromium.org
d54fe47fad This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 21:04:32 +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
ager@chromium.org
82a04c7fdc Add CallAsFunction method to the Object class in the API
Patch by Peter Varga.

BUG=v8:1336
TEST=cctest/test-api/CallAsFunction

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 13:03:08 +00:00
fschneider@chromium.org
23b770759d Prepare push to trunk. Now working on version 3.3.5.
Review URL: http://codereview.chromium.org/6933004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:55:09 +00:00
sgjesse@chromium.org
dfed2ce8a3 Revert r7768
This broke the Chromium Windows shared build.

BUG=none
TEST=Windows shared build works when pushed to Chromium
Review URL: http://codereview.chromium.org/6932007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:12:06 +00:00
sgjesse@chromium.org
79fba38d6f Fix the Windows shared build
R=fschneider@chromium.org

BUG=none
TEST=Windows shared build works when pushed to Chromium

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:10:49 +00:00
ager@chromium.org
24f19608d4 Actually revert "Add Call method to the Object class in the API"
Tests are failing in debug mode.

This also reapplies the change "Make Date and RegExp inherit from
Object in the API" that I accidentally reverted.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 11:07:09 +00:00
ager@chromium.org
26c775da94 Revert "Make Date and RegExp inherit from Object in the API."
Tests are failing in debug mode.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:51:07 +00:00
ager@chromium.org
b8cdecb517 Add Call method to the Object class in the API
Patch by Peter Varga.

BUG=v8:1336
TEST=cctest/test-api/CallAsFunction

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 10:03:49 +00:00
ager@chromium.org
87f225936f Make Date and RegExp inherit from Object in the API.
They are objects and the API inheritance hierarchy should reflect that.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 07:28:27 +00:00
cira@chromium.org
5a9fa7a8c6 Change v8Locale to match proposal - constructor is different (takes settings object, not a plain string) and I've added derive method to it.
Added comments to i18n.js methods and properties, and util functions to check settings and locale validity.

Added LanguageMatcher class until ICU gets C implementation (in progress, but late for our current deadline). I added TODO to remove LanguageMatcher code. 

TEST=Visit http://i18n.kaziprst.org/locale.html.
Review URL: http://codereview.chromium.org/6901141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 20:43:51 +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
ricow@chromium.org
4d890da191 Revert 7763, missing implementation on x64 and arm for call and apply with null or undefined.
Review URL: http://codereview.chromium.org/6913024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:45:19 +00:00
ricow@chromium.org
2b730c2bf6 Don't exchange null and undefined with the global object in function.prototype.{call, apply} for natives.
This makes us compatible with firefox in throwing an exception when
call is invoked on a builtin with null as the this argument.
Review URL: http://codereview.chromium.org/6902104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:19:04 +00:00
lrn@chromium.org
569574b7bf Fix implementation of == to correctly convert Date objects to primitives.
Fix issue 1356

BUG=v8:1356
TEST=mjsunit/double-equals

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 12:15:14 +00:00
ager@chromium.org
eda2a0d4d2 Cleanup: use xorps to zero out an xmm register on ia32 too.
Encoding is one byte shorter.

R=lrn@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 12:00:54 +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
fschneider@chromium.org
3e94ac952d Change heuristics for deciding phi-representation types to use int32 more frequently.
Until now we conservatively chose a double representation if
at least one use occurs in a double operation. This causes performance
degradation in many cases where there are mixes uses (integer and double)

e.g.:

for (int i = 0; i < 10; i++) {
  var t = i / 3.5;
  a[i] = t;
}

where the use in i/3 requires a double, where as the keyed store requires i
as an integer.

For these cases we want to have i as an integer and convert it only before the
double division.

In order to avoid unconditional deoptimization in some rare cases, we check
phis if there is any conversion that will always fail when converting a
heap-number constant to int32.
Review URL: http://codereview.chromium.org/6905166

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 08:31:35 +00:00
kmillikin@chromium.org
d0fcbb4ece Simplify include dependencies.
Try to make sure that accessors.h, data-flow.h, list-inl.h, and
scopeinfo.h are included only where needed, but without introducing
implicit dependencies.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 08:23:58 +00:00
lrn@chromium.org
d1411602a7 Don't allow whitespace after sign characters in parseInt.
BUG=v8:955
TEST=mjsunit/regress/regress-955

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 07:11:17 +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
ager@chromium.org
8aeaa5e90a Implement API to disallow code generation from strings for a context.
R=sgjesse@chromium.org
BUG=v8:1258
TEST=test-api/AllowCodeGenFromStrings

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 05:40:47 +00:00
ager@chromium.org
be15ea860d Fix lint.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 15:12:50 +00:00
ager@chromium.org
4f8dc51e34 Make component=shared_library gyp build work for Linux.
Review URL: http://codereview.chromium.org/6902128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 15:06:49 +00:00
ager@chromium.org
ccafbca61d Use JSON.parse instead of eval for the debugger JSON protocol.
R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 14:20:34 +00:00
sgjesse@chromium.org
5b0f739408 Prepare push to trunk. We are now working on version 3.3.4
R=ager@chromium.org
Review URL: http://codereview.chromium.org/6902200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 14:10:14 +00:00
whesse@chromium.org
014e42a81f Fix unary sub IC heap number code on x64: an untagged double was pushed on the stack and GCd.
BUG=1352
TEST=mjsunit/math-abs

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 12:55:44 +00:00
kmillikin@chromium.org
1af840ad4c Be more discriminating about uses of the arguments object in optimized code.
Because we track the value of the arguments object, we need to check
values whenever plugged into a forbidden value context.  It is not
enough to check at only variable references as we did previously.

R=fschneider@chromium.org
BUG=1351
TEST=regress-1351.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 11:35:51 +00:00
vegorov@chromium.org
cf239c4ea8 Fix two bugs the LAllocator::FindOptimalSplitPos.
- It was calculating start_block and end_block incorrectly.

- It was not considering the case when end_block is a loop header itself when searching for the header of the outermost loop.

These bugs do not affect correctness of the allocation but can severely degrade it's quality (cause spills in loop bodies).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 07:47:10 +00:00
dslomov@chromium.org
7088aea3eb Revert "This implements per-isolate locking and unlocking, including tests"
This reverts commit 76c78febb70e75b18214f5fe45de95c7fb515386.

This change has broken test-thread-termination/TerminateMultipleV8Threads

TBR=vitalyr

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 22:16:45 +00:00
dslomov@chromium.org
f4c120d615 This implements per-isolate locking and unlocking, including tests
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 21:26:03 +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
vitalyr@chromium.org
9af0a4e4a3 Fix windows build.
TBR=mnaganov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 16:26:37 +00:00
vitalyr@chromium.org
a9ea3f98b0 ll_prof: Reduce profiling hooks overhead from >400% to 25%.
Switched to using binary low-level log instead of the textual log used
by the ticks processor. The binary log contains code-related events,
code object names, and their bodies. When writing to the log we ask
glibc to use a larger buffer. To avoid complex processing of the
snapshot log (which is still textual) the serializer emits final
snapshot position to code name mappings that can be quickly be read
without replaying the snapshot log. (This might be useful for the
ticks processor.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 16:06:25 +00:00
mmaly@chromium.org
796ac25a4f Strict mode eval declares its locals in its own environment.
BUG=
TEST=strict-mode.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 15:31:39 +00:00
mikhail.naganov@gmail.com
9a2cb3009c Fix whitespace error after r7726
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:47:34 +00:00
mikhail.naganov@gmail.com
7a8996b626 Fix Linux builds after r7724
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:43:24 +00:00
sgjesse@chromium.org
1f96aa3772 ARM: Enhance the hardfloat support
The "simple" function with inline assembly for detecting hardfloat have been changed to handle compiling without VFP and with thumb.

The SCons setting for the float abi now follows then naming used by the GCC -mfloat-abi and soft has been added.

R=karlklose@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:13:46 +00:00
mikhail.naganov@gmail.com
ec58c05f4e Add support for startup data (snapshot) compression.
This is for mobile platforms where application footprint size is
important. To avoid including compression libraries into V8, we assume
that the host machine have them (true for Linux), and rely on embedder
to provide decompressed data.

Currently, only snapshot data can be comressed. It is also possible to
compress libraries sources, but it is more involved and will be
addressed in another CL.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:08:33 +00:00
whesse@chromium.org
cad92b4d33 Remove unused constructor BinaryOperation(Assignment* compound_assignment).
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 11:25:01 +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
whesse@chromium.org
4f41d895b0 Use type info for count operation in Crankshaft.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 09:21:18 +00:00
lrn@chromium.org
f470cf2777 Handle join of sparse arrays with non-empty separator more efficiently.
BUG=v8:1028

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 08:53:36 +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
sgjesse@chromium.org
122133e800 Improve modulo operation in lithium on x64.
This is the x64 porting of http://codereview.chromium.org/6816049/

Patch by: Yuqiang Xian from Intel

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 07:22:39 +00:00
danno@chromium.org
f6f5e5ce43 Fix build
TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 05:36:27 +00:00
danno@chromium.org
71f15faf70 Fix assert in KeyedLoadIC constructor
Don't assert when external array ICs are also handled by the KeyedLoadIC.

BUG=1346
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 05:03:39 +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
peter.rybin@gmail.com
e04dd7199e LiveEdit: optimize substring comparison
Review URL: http://codereview.chromium.org/6899011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 20:24:47 +00:00
svenpanne@chromium.org
f7ecf95e95 Fixed build on Mac, where g++ is a bit too dumb to see that a variable is always initialized.
Review URL: http://codereview.chromium.org/6893105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 20:11:39 +00:00
peter.rybin@gmail.com
265c362925 Support LiveEdit when standing on return operator
Review URL: http://codereview.chromium.org/6894014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 20:05:50 +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
vegorov@chromium.org
1c950e04cc Fix missing writebarrier in ArraySplice builtin.
Review URL: http://codereview.chromium.org/6883227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 16:03:40 +00:00
sgjesse@chromium.org
37f33a7087 Improve modulo operation in lithium on IA32.
Implement fast paths for the special cases like PowerOfTwo divisors
and the dividend being smaller than the divisor (non-negative).

BUG=v8:1314

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 14:58:45 +00:00
ager@chromium.org
34d1ea45d7 Fix broken cases in x64 disassembler.
R=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 14:56:09 +00:00
karlklose@chromium.org
32732fbc86 Expose hasOwnProperty() through API.
BUG=http://code.google.com/p/v8/issues/detail?id=1342
TEST=test-api/HasOwnProperty

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 09:27:40 +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
kmillikin@chromium.org
dc28280a82 Fix a bug in a corner case of direct eval detection.
The corner case is calling a function named 'eval' that is looked up at
runtime and found in a non-global context (but not an extension object).
The bug is that we used the function itself as the receiver rather than
using the global object.

R=ager@chromium.org
TEST=has been added to the eval mjsunit test

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 05:04:48 +00:00
vitalyr@chromium.org
cfb8d1c346 Atomic ops: put the CPU features struct in v8::internal.
Review URL: http://codereview.chromium.org/6880238

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 17:29:01 +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
sgjesse@chromium.org
145ec569c9 Initial support for generating Visual Studio solution and project files using GYP
The Windows specific part of the common.gypi now reflects the options used for 'msvc' in the SCons build.
Review URL: http://codereview.chromium.org/6880237

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 14:20:21 +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
erik.corry@gmail.com
038fa0b408 Prepare push to trunk. Now working on version 3.3.3.
Review URL: http://codereview.chromium.org/6893053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 08:50:06 +00:00
erik.corry@gmail.com
7b451068b7 Fix raw pointer misuse in StringReplaceRegExpWithEmptyString. Committing http://codereview.chromium.org/6905035/ for vegorov
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 08:20:38 +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
vegorov@chromium.org
08e7b94924 Fix compilation with debuggersupport=off.
Review URL: http://codereview.chromium.org/6901026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 13:53:19 +00:00
sgjesse@chromium.org
24a9d52d3d Fix compilation of D8 with console=readline
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 13:26:05 +00:00
vegorov@chromium.org
74c258f281 Add prototype transitions cache to Map.
Review URL: http://codereview.chromium.org/6902029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 09:44:55 +00:00
vitalyr@chromium.org
bde82b06c0 Avoid hidden TLS access in CpuProfiler::is_profiling().
Review URL: http://codereview.chromium.org/6895014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-22 06:40:22 +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
ricow@chromium.org
e59208527f Prepare push to trunk. Now working on version 3.3.2.
Review URL: http://codereview.chromium.org/6880065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-20 09:23:19 +00:00
karlklose@chromium.org
3b6fe22c4d Make throw inlineable only if the exception is inlineable.
BUG=1337
TEST=regress-1337

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-20 09:15:52 +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
fschneider@chromium.org
202c7f61d3 Use movaps instead of movsd in the gap resolver on ia32 as well.
This is ok since we don't care about preserving the upper half
of xmm registers in Crankshaft code.
Review URL: http://codereview.chromium.org/6880007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 09:16:34 +00:00
fschneider@chromium.org
6b7a4f154d Reduce the number of virtual function in hydrogen-instruction.h classes
Instead of using virtual type-tester functions we can just
generate non-virtual ones for all concrete IR classes.

This is changes reduces the V8 binary size by ~2%.

I also simplified the macros to declare new hydrogen instructions slightly.
The name used for debug output is no longer passed as a separate string.
Instead we just use the class name.
Review URL: http://codereview.chromium.org/6880014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 09:11:21 +00:00
vegorov@chromium.org
c300769741 Maintain proper pointer map for branches when resolving phis.
The same was done for gap moves connecting live ranges in r6858.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 20:26:24 +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
antonm@chromium.org
dc99761f31 Minor cosmetic changes.
Review URL: http://codereview.chromium.org/6875003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 13:28:00 +00:00
danno@chromium.org
ac039b508e Prepare push to trunk. Now working on version 3.3.1.
R=fschneider@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 12:37:57 +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
ricow@chromium.org
06932d0e6b Revert 7634, Fix experimental.gyp to include i18n-empty-js.cc so that js2c.py get correct parameters.
This caused all chromium based builds to fail (e.g., DumpRenderTree)
Review URL: http://codereview.chromium.org/6882003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-18 08:01:50 +00:00
vitalyr@chromium.org
0f6f6a0e93 Initialize ThreadLocalTop.
ThreadLocalTop used to be static and was zero initialized by the
linker. With isolates we have to give it a constructor.

BUG=http://crbug.com/79393

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 20:47:27 +00:00
cira@chromium.org
d637c32e63 Fix experimental.gyp to include i18n-empty-js.cc so that js2c.py get correct parameters.
Bug occured somewhere in the merge process.
Review URL: http://codereview.chromium.org/6875013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 20:31:30 +00:00
yurys@chromium.org
5d70a291fe Fix debuger evaluation on a breakpoint inside eval
Corresponding Chromium issue: http://code.google.com/p/chromium/issues/detail?id=74412
Review URL: http://codereview.chromium.org/6875005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 14:09:45 +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
lrn@chromium.org
3b445f14f8 X64 tweaks.
Use movapd instead of movsd to move between xmm registers. Avoids partial
register writes and potential stalls.

Use xorps instead of xorpd to zero a register. Same effect and latency, but
one byte smaller.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 13:06:41 +00:00
ager@chromium.org
5fd4fa2a9e Introduce experimental natives that are enabled by a runtime flag.
Clean up the use of js2c. We generated two identical files.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 12:31:03 +00:00
lrn@chromium.org
1eaa4d603d Fix bug in X64 Math.abs optimization
Review URL: http://codereview.chromium.org/6875002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 11:43: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
vitalyr@chromium.org
3b23719d2a Make HConstant a bit more compact.
Review URL: http://codereview.chromium.org/6850031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 06:04:50 +00:00
cira@chromium.org
8aaa0c6b18 Add v8Locale.Collator
This is a partial implementation of Collator per what's agreed upon at the last
ECMAScript meeting + mailing list. Only the following three options are implemented: ignoreAccent, ignoreCase, numeric. 

ChromeOS and Chrome need this feature for M12. This could be added as chrome extension API. Giiven that we have a rough agreement on the collation part of ECMAScript API, we thought it'd save us some duplicated work adding this to v8 (experimental i18n api) now rather than implementing it in Chrome now and moving it later. 


BUG=28604
TEST=http://i18nl10n.com/chrome/coll2.html
Review URL: http://codereview.chromium.org/6673011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 19:10:51 +00:00
fschneider@chromium.org
f20ff991f7 Remove unused AssignedVariableAnalyzer.
Not used in Crankshaft anymore.
Review URL: http://codereview.chromium.org/6849023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 14:31:43 +00:00
karlklose@chromium.org
86577062a9 Fix presubmit errors in bootstrapper.cc.
Review URL: http://codereview.chromium.org/6851015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 12:05:03 +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
lrn@chromium.org
3bbcab1ca9 X64: Use roundsd for DoMathFloor.
TEST=mjsunit/math-floor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 09:05:43 +00:00
vegorov@chromium.org
68a8cf365f In ProfilerSignalHandler ensure that thread we are trying to sample locked the isolate.
BUG=http://crbug.com/77725

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-14 08:53:50 +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
cira@chromium.org
261318b6a1 Moving locale code from i18n-extension.cc. Each part of the API now has separate cc file, and only extension related code is left in i18n-extension.{cc,h}.
There are no functional changes in this CL.
Review URL: http://codereview.chromium.org/6840024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 21:09:22 +00:00
fschneider@chromium.org
9783526239 Enable inlining functions containing throw.
After Kevin's change to the graph builder to allow aborting graph construction
inside arbitrary expressions this just works.

BUG=v8:1143
Review URL: http://codereview.chromium.org/6839017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 13:09:58 +00:00
kmillikin@chromium.org
db91b43ace Fix a just-introduced bug in polymorphic inlining.
When inlining a polymorphic variant, the inlined function indicates we
should bailout of the entire compilation by setting the stack overflow flag
on the visitor.  We need to check this flag and bailout if a call to
TryInline succeeds and it is not in tail position in a graph builder
function.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 11:59:23 +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
kmillikin@chromium.org
6d7b88b5bc Fix typo which broke build.
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 11:30:36 +00:00
kmillikin@chromium.org
c25c2784d9 Relax assumptions about control flow in the hydrogen graph.
Previously we assumed that control was always live after visiting an
expression, and that control was live to both basic block targets of an
expression in a test context.

Now we allow any expression to exit the graph.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 11:24:06 +00:00
whesse@chromium.org
5a6ec1a46e Fix optimized code for Math.round on ia32 platform.
Review URL: http://codereview.chromium.org/6838012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 10:32:05 +00:00
lrn@chromium.org
caee8a3ccf Fix Math.round in runtime.cc and x64 optimized code.
Make math-round.js test check both normal and optimized version.
Add some cases to the tests.

BUG=v8:958
TEST=mjsunit/math-round

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 09:35:56 +00:00
ager@chromium.org
f7170df2af Prepare push to trunk. Now working on version 3.3.0.
Review URL: http://codereview.chromium.org/6833021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 08:34:46 +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
vitalyr@chromium.org
09dfc4b5d3 Add global setup for runtime profiler.
Whether it's enabled or not must not change while we're running. Let's
not waste time recomputing it. This also makes the VM state tracking
code slightly more lightweight.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 19:15:53 +00:00
vitalyr@chromium.org
34d50b3d5c Fit Representation and HType in one word to make HValue smaller.
Review URL: http://codereview.chromium.org/6813091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 19:05:48 +00:00
cira@chromium.org
df453b1203 Moving JavaScript code from i18n-extension.cc into i18n.js file using
tools/js2c.py script.
Added new type I18N to natives.h enum.
Review URL: http://codereview.chromium.org/6825049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 18:19:40 +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
lrn@chromium.org
c0aa591bbb X64: Tweak code generation slightly.
Uses a shorter opcode for movl and movb with immediates.
Make movl preferable to movq in Set(register, int64_t) and use Set in more places.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 13:20:51 +00:00
fschneider@chromium.org
fee9845599 Enable inlining of functions containing loops.
Review URL: http://codereview.chromium.org/6813107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 10:27:09 +00:00
fschneider@chromium.org
4618b186ef Change the list of statements that are inlineable into a black-list.
Before we had a white-list of things that we allow inside inlined functions.

This way we can enable new constructs one-by-one.
Review URL: http://codereview.chromium.org/6825042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 08:37:29 +00:00
lrn@chromium.org
a932441a0c Cleanup of ScannerConstants, now named UnicodeCache.
The ScannerConstants class was originally static fields on the scanner class.
During creation of the stand-alone preparser and later isolates, it has been
moved into a separate class with a per-isolate instance.
It is used to hold caching unicode Predicate values.

This change renames the class to UnicodeCache, and passes a reference
to the instance down to methods that doesn't have an easy access to
an isolate (to avoid, e.g., having to do an Isolate::Current() for every
number parsed).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 08:27:38 +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
vitalyr@chromium.org
d26ba633a8 Fix retained object info leak.
Review URL: http://codereview.chromium.org/6813101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 05:08:13 +00:00
dimich@chromium.org
13bfbe8226 Another attempt to fix Win build.
Review URL: http://codereview.chromium.org/6825061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 00:49:30 +00:00
dimich@chromium.org
097b09bff3 Fix build borkage due to r7575
(landing for Dmitry Lomov)
Review URL: http://codereview.chromium.org/6823065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 00:42:27 +00:00
vitalyr@chromium.org
d932b5f768 Do not rely on uniqueness of pthread_t
Patch by Dmitry Lomov.

pthreads implementations are free to reuse pthread_t (thread id) after
the thread has died. This change gets rid of ThreadHandle class and
replaces it with v8-managed thread identifiers.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 23:46:22 +00:00
antonm@chromium.org
0b30898379 Allow recursive messages reporting as it is already used.
Instead discard unhandled exceptions thown while running
message listeners.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 16:16:52 +00:00
jkummerow@chromium.org
ed968b1042 Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization.
TEST=existing unit tests still pass

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 13:24:50 +00:00
karlklose@chromium.org
d8f0b3bea2 Prepare push to trunk. Now working on version 3.2.10.
Review URL: http://codereview.chromium.org/6820029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 12:14:53 +00:00
mikhail.naganov@gmail.com
576660e182 Fix x64 build after r7567
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 11:49:55 +00:00
mikhail.naganov@gmail.com
690093effe Mark single-argument inline constructors as 'explicit'.
There is currently a bug in cpplint.py hiding this problem.

R=sgjesse@chromium.org
BUG=1304
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 11:38:34 +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