Commit Graph

6048 Commits

Author SHA1 Message Date
karlklose@chromium.org
30c169718d Remove unused but set variable.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 09:05:44 +00:00
svenpanne@chromium.org
5cd715cbc3 A tiny contribution for the IWYU day: Include allocation.h in every
header which uses BASE_EMBEDDED and/or AllStatic. Note that still only
45 out of 135 headers in src/ can be used stand-alone, but at least
this is a little bit more than before...
Review URL: http://codereview.chromium.org/6931031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 06:50:20 +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
cira@chromium.org
9695ce9f37 Trying to re-land http://codereview.chromium.org/6901141.
Changes from previus revision:
- Made my own strncpy in I18NUtils class (we can't use OS::SNPrintF nor snprintf).
- Fixed a crashing bug related to ICU call in LanguageMatcher::BCP47ToICUFormat.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 17:18:22 +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
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
sgjesse@chromium.org
34174f3899 ARM: Add GYP variables to control V8 code generation
Added the GYP variables:
  v8_can_use_unaligned_accesses
  v8_use_arm_eabi_hardfloat

Refer to the comments in v8.gyp on their uses.

R=karlklose@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 06:18:49 +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
797cbc68b7 Delete empty test/mjsunit/function-call.js file
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 14:20:19 +00:00
karlklose@chromium.org
8b917d4d96 Replace long running loops by OptimizeFunctionOnNextCall in some tests that are often timing out on ARM.
Review URL: http://codereview.chromium.org/6910022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 13:53:08 +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
sgjesse@chromium.org
6b3f10b482 Remove the Visual Studio project files
R=ager@chromium.org

BUG=885
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 13:43:13 +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
ager@chromium.org
19e9667be5 Fix XCode project.
This is temporary. The XCode project will be deleted soon once support for generating it with gyp is in place.

R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 11:39:16 +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
ager@chromium.org
30ef211fcf Fix presubmit.
TBR=mnaganov

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 11:08:44 +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