Commit Graph

7302 Commits

Author SHA1 Message Date
erik.corry@gmail.com
248adeb110 Revert 10502 (smaller number string cache) due to test failures.
Review URL: https://chromiumcodereview.appspot.com/9113060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 15:17:26 +00:00
vegorov@chromium.org
67d72eab45 When preparing heap for breakpoints make sure not to flush away non-optimized code for inlined functions.
Debug::PrepareForBreakPoints was not fully populating active_functions list.

R=erik.corry@gmail.com
TEST=test/mjsunit/regress/regress-debug-code-recompilation.js

Review URL: https://chromiumcodereview.appspot.com/9290013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 15:11:59 +00:00
erik.corry@gmail.com
a49c8a19ee Flush number string cache on GC (bug 1605). Also start with a small
number string cache and only grow it if needed, which will be useful
for saving boot time memory use.
Review URL: https://chromiumcodereview.appspot.com/9235029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 14:27:58 +00:00
svenpanne@chromium.org
7719981078 Refactoring only: Extracted 2 methods from ClearNonLiveTransitions
This simple refactoring makes it very clear that clearing non-live transitions
actually consists of 2 quite separate things. Things would even be nicer if the
prototype transitions were represented by a separate data structure instead of
reusing FixedArray in an interesting way once again.

As an additional bonus, this CL makes it possible to read each of the methods in
question on a 30" screen without scrolling!

Review URL: https://chromiumcodereview.appspot.com/9169045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 14:22:59 +00:00
mstarzinger@chromium.org
4b913965a9 Fix responsiveness of high promotion mode heuristics.
This changes the heuristics for the high promotion mode to be checked
on all GCs (including scavenges), so that changes in the applications
behavior are recognized earlier. It also fixes miscalculations in the
survival counter and rate which caused heuristics to fail completely.

R=vegorov@chromium.org
BUG=v8:1899

Review URL: https://chromiumcodereview.appspot.com/9196003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 13:46:42 +00:00
yurys@chromium.org
09ff5c4c44 Provide access to function inferred name in v8 public API
Review URL: https://chromiumcodereview.appspot.com/9146039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 12:45:54 +00:00
danno@chromium.org
557e2cd90e Fix disasm assertions for undefined instructions.
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9228006
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 12:43:32 +00:00
danno@chromium.org
adc196d86e Silence warning from presubmit lint script
R=yangguo@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9234025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 12:32:05 +00:00
svenpanne@chromium.org
6859247172 Do not follow accessor map transitions when marking descriptor arrays.
Note that we currently have no such transitions, but we will in the future, and
we have to avoid keeping maps live too long.

Review URL: https://chromiumcodereview.appspot.com/9212045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 08:50:55 +00:00
svenpanne@chromium.org
891f0efa3f Handle map transitions in CALLBACKS when doing map tree traversal.
We will have such transitions in the future and this CL is necessary to keep
slack tracking working then.

Review URL: https://chromiumcodereview.appspot.com/9285008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 07:26:07 +00:00
kmillikin@chromium.org
12f982cf6a Include what you use in accessors.{h,cc}.
R=fschneider@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9113041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 00:16:07 +00:00
jkummerow@chromium.org
6c85119c6a Fix building with clang
BUG=v8:1912

Review URL: https://chromiumcodereview.appspot.com/9285013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 16:36:55 +00:00
erik.corry@gmail.com
be288cf2b4 Initially unmap one of the semispaces to reduce memory use at boot time.
Review URL: https://chromiumcodereview.appspot.com/9117035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 16:00:19 +00:00
erik.corry@gmail.com
ee1d0fc5c6 Reduce the space used by the stack for the profiling thread.
Review URL: https://chromiumcodereview.appspot.com/9117032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 15:48:16 +00:00
yangguo@chromium.org
22f97d99be Fix shared library build.
Review URL: https://chromiumcodereview.appspot.com/9117028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 12:10:28 +00:00
yangguo@chromium.org
4aa558f22d Introduce readbinary function in d8 to read binary files.
Review URL: https://chromiumcodereview.appspot.com/9283015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 11:55:11 +00:00
vegorov@chromium.org
d16c6a9874 Fix Win64 compilation failure introduced by r10483.
R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/9284017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 09:05:15 +00:00
vegorov@chromium.org
04289e8d17 Support inlining at call-sites with mismatched number of arguments.
Review URL: https://chromiumcodereview.appspot.com/9265004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 08:43:12 +00:00
fschneider@chromium.org
0b3ce1dd9e Remove unnecessary IGNORE policy from Lithium operands.
1. This policy was only used for unused spill operands. I'm assigning
an INVALID LOperand to those instead. As a result, we only need
3 bits to encode the policy and have one more available for virtual
registers.

2. Furthermore, corrected the calculation of the maximal number of virtual
registers and changed the upper limit for the size of the Hydrogen IR
accordingly.

3. Doubled the maximal number of deoptimization entries to 8K.
Review URL: http://codereview.chromium.org/9160018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 02:13:28 +00:00
fschneider@chromium.org
c6e1d11885 Put a slow assert under the enable_slow_asserts flag.
Otherwise really large functions take too long to compile
in debug mode.
Review URL: http://codereview.chromium.org/9212040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 01:46:26 +00:00
fschneider@chromium.org
2284996cc1 Add range information to external array loads.
Review URL: http://codereview.chromium.org/9226014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 18:11:36 +00:00
erik.corry@gmail.com
83b439a0f9 Further robustify the keyed lookup cache against unlucky hash
seeds.  This change is performance neutral on most snapshot
VM builds, but provides a big improvement on string-fasta
on around 5% of builds.
Review URL: https://chromiumcodereview.appspot.com/9193015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 16:18:10 +00:00
jkummerow@chromium.org
5da21118e8 Prepare push to trunk. Now working on version 3.8.9.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9270044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 14:34:49 +00:00
svenpanne@chromium.org
fd2731a7e6 Replaced LookupResult::IsProperty by LookupResult::IsFound where possible.
Yak shaving for map sharing with accessor properties contd.: When CALLBACKS can
have map transitions, simply looking at the property type is not sufficient
anymore to decide if a property is there or not. One has to look at the actual
contents of the descriptor entry then, but this breaks down sometimes when the
lookup is being done with a NULL holder. Luckily enough, we can oftren replace
IsProperty by the simpler IsFound, because we inspect the type immediately
afterwards, anyway.

Review URL: https://chromiumcodereview.appspot.com/9280007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 12:01:47 +00:00
svenpanne@chromium.org
e2af8fd68a Refactored iterative map traversal.
The main goal is to cleanly separate between the several parts involved in the traversal:

 * iterating over all transitions in a descriptor array

 * iterating over all prototype transitions

 * storing the parent and the current local traversal position in a map

 * the iterative traversal algorithm itself

The previous algorithm for iterating over prototype transitions did a little bit too much here, iterating over the whole array instead only the filled part. This has been fixed on the way, too.

With this CL, it will be much easier to make the necessary changes to the descriptor array iterator to correctly handle map transitions for accessor properties. Furthermore, perhaps we represent transitions a bit different in the future, making finding them a bit easier. This would make some code in this CL (and elsewhere) quite a bit shorter and more efficient.

Review URL: https://chromiumcodereview.appspot.com/9252007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 10:50:14 +00:00
yangguo@chromium.org
504fff1118 Cleaning up after r10471.
Review URL: https://chromiumcodereview.appspot.com/9193007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 08:39:49 +00:00
yangguo@chromium.org
bc091f31c8 Removing experimental i18n code from v8 repository. Internationalization support is hosted under code.google.com/p/v8-i18n for couple months now.
TEST=Chromium/WebKit builds should pass.

Review URL: https://chromiumcodereview.appspot.com/9016034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 08:09:22 +00:00
vegorov@chromium.org
8c776261c2 Limit number of loop iterations in Heap::ReserveSpace.
This allows to avoid infinite loops in pathalogical cases e.g. when OS refuses to give new pages to V8.

R=erik.corry@gmail.com
BUG=99027

Review URL: https://chromiumcodereview.appspot.com/8286020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 17:21:26 +00:00
yangguo@chromium.org
11e779185b Parallelize cpplint in presubmit and fix usage of DISALLOW_* macros.
BUG=v8:1653

Review URL: https://chromiumcodereview.appspot.com/9192010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 16:17:08 +00:00
danno@chromium.org
e9139ffa71 Remove stray GVN flag in TransitionElementsKind
TBR=mstarzinger@chromium.org
BUG=none
TEST=build turns green

Review URL: https://chromiumcodereview.appspot.com/9270010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 15:55:06 +00:00
yangguo@chromium.org
89591097aa Fix solaris build (VirtualMemory).
BUG=v8:1761
TEST=

Review URL: https://chromiumcodereview.appspot.com/9233002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 15:43:38 +00:00
svenpanne@chromium.org
ed4343d982 Removed IsPropertyOrTransition method.
It had only 2 uses: One use could be rewritten in a simpler way, and the other
is actually more readable after inlining and fixing the comments.

Review URL: https://chromiumcodereview.appspot.com/9233006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 15:10:35 +00:00
danno@chromium.org
960923078b MIPS: Make sure transitioned arrays efficiently call builtin Array functions
Port r10356 (69da81).

Original commit message:
Loosen the requirement for Map equivalency on several map checks, including checks up the prototype chain, that are not sensitive to ElementsKinds. These selected map checks should also match against FAST_DOUBLE_ELEMENT and FAST_ELEMENT transitions of the original map. This specifically helps all variants of transitioned JSArrays to still efficiently call builtins like push, pop and sort.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9265007
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 14:17:26 +00:00
danno@chromium.org
8d741a9add Split GVN flags from flags in Hydrogen instructions.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9233005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 14:08:20 +00:00
rossberg@chromium.org
c61665604b Fix handling of function proxies in higher-order array and string methods,
which use yet another way to determine strict vs non-strict function receivers.

R=kmillikin@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9270004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 13:59:37 +00:00
erik.corry@gmail.com
9672a04de2 Fix keyed lookup cache to have 2 entried per bucket instead
of one in order to reduce collisions.
Review URL: https://chromiumcodereview.appspot.com/9269004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 13:43:21 +00:00
vegorov@chromium.org
1f4ec772f7 MIPS: Change inlined cache of intanceof stub to use indirection through cell.
Port r10380 (46f646).

Original commit message:
The stub was directly patching caller's code without issuing write barrier which violated incremental marking invariants.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9159008
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 12:50:39 +00:00
vegorov@chromium.org
4de11a7bee MIPS: Allow call-known-global and call-constant-function to be used
for call-sites with mismatched number of arguments.

Port r10424 (92a05c9c).

Original commit message:
Adjust InvokeFunction to avoid generating dead code when number when arity mismatch is detected in compile time.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9150026
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 12:49:43 +00:00
yangguo@chromium.org
af98ee9492 Enable asynchronous remote debugging with d8.
BUG=v8:1691
TEST=

Review URL: https://chromiumcodereview.appspot.com/9138015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 11:59:00 +00:00
mstarzinger@chromium.org
dffb78e312 Fix missing write-barrier for prototype transitions.
R=vegorov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9150041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 18:50:01 +00:00
yangguo@chromium.org
8e7194e62e Fix shared library build.
Review URL: https://chromiumcodereview.appspot.com/9265010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 17:04:34 +00:00
yangguo@chromium.org
41b7c56031 Fix remote debugger crash.
Review URL: https://chromiumcodereview.appspot.com/9200006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 16:52:16 +00:00
ulan@chromium.org
4f882a86a4 Prepare push to trunk. Now working on version 3.8.8.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9264011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 15:28:48 +00:00
jkummerow@chromium.org
606c996a67 Revert "Immediately use the generic stub when storing into COW arrays"
Due to unexpected performance implications.

This reverts r10429.

Review URL: https://chromiumcodereview.appspot.com/9150032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 14:58:54 +00:00
erik.corry@gmail.com
d4cf1699ec Add missing SmiUntag for string hash calculation in
in-snapshot code on IA32.
Review URL: https://chromiumcodereview.appspot.com/9254027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 14:43:25 +00:00
erik.corry@gmail.com
ae698e73f4 MIPS: Use shift and add instead of mul on ARM for integer hash. This is a commit of http://codereview.chromium.org/9192011/ for Daniel Kalmar
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 14:08:48 +00:00
erik.corry@gmail.com
60f1618970 Add an assert to the serializer.
Review URL: https://chromiumcodereview.appspot.com/9159010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:51:45 +00:00
kmillikin@chromium.org
b571bd2ce9 MIPS: Fix for an ARM register allocation bug.
Port r10374 (03bbe39).

Note: the MIPS version was not affected by the bug. This is merely a style cleanup.

Original commit message:
An off-by-one in the register allocator could lead to allocating (and
clobbering) the reserved 0.0 double register.  This required a function with
14 or more live double values.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9150025
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:41:11 +00:00
mstarzinger@chromium.org
77f6a6fc31 Fix prototype transition clearing during full GC.
R=vegorov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9195008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:38:37 +00:00
erik.corry@gmail.com
504ef4f243 Robustify the clearing of the cache of map-related ICs on the map.
Review URL: https://chromiumcodereview.appspot.com/9159009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:22:16 +00:00
fschneider@chromium.org
48a24b9224 MIPS: Tiny improvement of register constraints in LClassOfTest instructions.
Port r10379 (3399d6).

Original commit message:
The input register does not need to be made writable. We already
allocate enough temp registers and the input register will always
be preserved.

BUG=
TEST=
Review URL: http://codereview.chromium.org/9254025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:07:46 +00:00
yangguo@chromium.org
5b81bd0f0c MIPS: Inlining Math.min and Math.max in crankshaft.
Port r10391 (7900f3c).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9195009
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 12:42:20 +00:00
fschneider@chromium.org
ed5f9a4c77 Generate faster compares for === and !== with boolean constants.
Review URL: http://codereview.chromium.org/9195005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 12:14:11 +00:00
vegorov@chromium.org
704c92ce95 Ensure that LRandom restores rsi after call to the C function on x64.
R=ulan@chromium.org
BUG=http://crbug.com/110509
TEST=test/mjsunit/regress/regress-110509.js

Review URL: https://chromiumcodereview.appspot.com/9265003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 08:43:34 +00:00
rossberg@chromium.org
1a52ae7c1e Fix typos in JSObject::GetHeaderSize, which just worked by accident.
R=kmillikin@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9231025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 17:01:57 +00:00
jkummerow@chromium.org
3a4bed8a7e Only clear monomorphic ICs on GC after Context exit
Review URL: https://chromiumcodereview.appspot.com/9255014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 16:16:11 +00:00
fschneider@chromium.org
98013d9824 Eliminate a superfluous map check when building generic array element access.
In the case where we generate a generic load or store, we don't need to emit a non-smi-check and a map-check before it.
Review URL: http://codereview.chromium.org/9252008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 14:05:11 +00:00
jkummerow@chromium.org
99718b95a8 Immediately use the generic stub when storing into COW arrays
Review URL: https://chromiumcodereview.appspot.com/9254005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 13:15:22 +00:00
vegorov@chromium.org
3fd6ba109e When adjusting page's live bytes counter from the mutator adjust owners unswept free bytes counter.
R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9178021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 09:21:07 +00:00
fschneider@chromium.org
01979c70a8 Fix handling of named interceptors in optimized code.
When calling a constant function property from optimized code,
we need to check that there is no interceptor on the receiver map.

TEST=cctest/InterceptorCallICConstantFunctionNotNeededWrapped
Review URL: http://codereview.chromium.org/9240006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 16:06:03 +00:00
vegorov@chromium.org
fb24808c70 Allow call-known-global and call-constant-function to be used for call-sites with mismatched number of arguments.
Adjust InvokeFunction to avoid generating dead code when number when arity mismatch is detected in compile time.

R=fschneider@google.com

Review URL: https://chromiumcodereview.appspot.com/9178017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 15:53:58 +00:00
yangguo@chromium.org
6d0d6a5695 Recursion limit for one-char string replace and retire String::kMinNonFlatLength.
TEST=mjsunit/string-replace-one-char.js

Review URL: https://chromiumcodereview.appspot.com/9231017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 14:29:17 +00:00
mstarzinger@chromium.org
f3045d3802 Fix corner-case in heap size estimation.
Empty but unswept pages could cause the unswept_free_bytes counter to
to be off in case heap gets shrunk and page gets released before it was
swept properly.

R=vegorov@chromium.org
BUG=v8:1893

Review URL: https://chromiumcodereview.appspot.com/9241010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 14:09:12 +00:00
yangguo@chromium.org
73ac99286d Remove limit for d8 shell input length.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9232009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 13:37:09 +00:00
erik.corry@gmail.com
a02dbe4258 Revert 10413-10416 initial memory use reduction due to
test failures.
Review URL: http://codereview.chromium.org/9178014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 13:13:55 +00:00
erik.corry@gmail.com
07b46f47d2 Make fussy Windows compiler happy.
Review URL: http://codereview.chromium.org/9178012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 12:49:15 +00:00
erik.corry@gmail.com
fdc163bbbb Make from-space initially uncommitted for another 1Mbyte
improvement in boot time memory usage.
Review URL: http://codereview.chromium.org/9242008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 12:09:11 +00:00
erik.corry@gmail.com
516f08afca Unbreak the 64 bit build.
Review URL: http://codereview.chromium.org/9178011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 11:49:01 +00:00
erik.corry@gmail.com
3403e76682 Reduce boot-up memory use of V8.
Reduce signal sender thread stack size to 32k.
Commit partial old-space pages to reduce minimum memory use.
This is a rebase of http://codereview.chromium.org/9017009/
Review URL: http://codereview.chromium.org/9179012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 11:38:25 +00:00
yangguo@chromium.org
a97cebe292 Fast path for string.replace that replaces a single character by a string.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 15:21:38 +00:00
vegorov@chromium.org
7370cf6f9d Fix and enable NEW_NON_STRICT_FAST ArgumentsAccess stub on x64.
R=fschneider@chromium.org
BUG=v8:1903

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 15:11:56 +00:00
jkummerow@chromium.org
2dc816bb2d Add Android cross-compilation support to top-level Makefile
TEST=make android

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 13:29:12 +00:00
erik.corry@gmail.com
70da367f6b More spelling changes.
Review URL: http://codereview.chromium.org/9231009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 12:38:59 +00:00
erik.corry@gmail.com
c5e547fd05 Prepare push to trunk. Now working on version 3.8.7.
Review URL: http://codereview.chromium.org/9233001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 10:28:34 +00:00
erik.corry@gmail.com
48f239e087 Spellling mistakes.
Review URL: http://codereview.chromium.org/9123031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:46:21 +00:00
erik.corry@gmail.com
40a433c9e0 Split NumberDictionary into a randomly seeded and an unseeded
version. We don't want to randomize the stub cache.
Review URL: http://codereview.chromium.org/9174023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:44:35 +00:00
yurys@chromium.org
ebb75c23a1 Provide a way for iterating through all external strings referenced from the JS heap
Review URL: http://codereview.chromium.org/9139018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 15:14:45 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
erik.corry@gmail.com
5e1c9e29a9 Small fixes to hash seeding code, discovered during
review of back port.
Review URL: http://codereview.chromium.org/9187006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 09:38:20 +00:00
yangguo@chromium.org
ddc0144490 Fixing issue 1898 (using HChange outside the insert-representation-changes phase).
BUG=v8:1898
TEST=mjsunit/regress/regress-1898.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 07:48:44 +00:00
svenpanne@chromium.org
a19e87b9a0 Improved output for bailouts on huge functions
Review URL: http://codereview.chromium.org/9190008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-12 07:17:46 +00:00
yangguo@chromium.org
339c9c12e7 Inlining Math.min and Math.max in crankshaft.
BUG=v8:1325
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 15:43:33 +00:00
danno@chromium.org
a42da8e38d Correct nits in d8 ArrayBuffer() implementation
TBR=jkummerow@chromium.org
BUG=none
TEST=external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 15:10:56 +00:00
danno@chromium.org
6ce13906dc Add primitive WebGL ArrayBuffer() support to d8
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 14:42:58 +00:00
ager@chromium.org
430c64d182 Port Math.random change to MIPS.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 12:19:11 +00:00
ager@chromium.org
d59749f8b4 Support inlining and crankshaft optimization of Math.random.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 10:35:37 +00:00
mstarzinger@chromium.org
83d912f0e4 Make heap size estimation more accurate.
This improves the heap size estimation by not counting lazy swept pages
as completely allocated but use their live bytes counter instead.

R=vegorov@chromium.org
BUG=v8:1893
TEST=cctest/test-heap/TestSizeOfObjects

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 10:33:34 +00:00
fschneider@chromium.org
befd149ef8 Optimize simple constant cases for bitwise &, | and ^.
For integer bitwise operations we can replace
x & -1 with x,  x | 0 with x and x ^ 0 with x.
Review URL: http://codereview.chromium.org/9177001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 10:01:59 +00:00
vegorov@chromium.org
74ef753067 Change inlined cache of intanceof stub to use indirection through cell.
The stub was directly patching caller's code without issuing write barrier which violated incremental marking invariants.

R=mstarzinger@chromium.org
BUG=http://crbug.com/109448
TEST=cctest/test-heap/InstanceOfStubWriteBarrier

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 09:39:37 +00:00
fschneider@chromium.org
62168ff831 Tiny improvement of register constraints in LClassOfTest instructions.
The input register does not need to be made writable. We already
allocate enough temp registers and the input register will always
be preserved.
Review URL: http://codereview.chromium.org/9166007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 08:29:42 +00:00
kmillikin@chromium.org
32d7dd0409 Fix for an ARM register allocation bug.
An off-by-one in the register allocator could lead to allocating (and
clobbering) the reserved 0.0 double register.  This required a function with
14 or more live double values.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:59:55 +00:00
svenpanne@chromium.org
d90860b42f Changes after code review#
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:12:24 +00:00
svenpanne@chromium.org
6997dbe13e Fixed AccessorPair handling
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:12:16 +00:00
svenpanne@chromium.org
73f2f5db68 Use a separate new type AccessorPair for JavaScript callbacks instead of a FixedArray of length 2
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:11:33 +00:00
fschneider@chromium.org
9e0be36948 Avoid recording unnecessary deoptimization environments in a couple of places.
This reduces the number of uses and potentially shortens live ranges.
Review URL: http://codereview.chromium.org/8983018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:06:32 +00:00
jkummerow@chromium.org
7cfb086b34 Inline fast case of CodeGenerationFromStringsAllowed
Review URL: http://codereview.chromium.org/9155011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 14:52:41 +00:00
erik.corry@gmail.com
6a5afd9403 MIPS: Check that address given to __RecordWrite is correct.
ARM: Clean up equivalent functionality on ARM.
This subsumes http://codereview.chromium.org/8561001/
Review URL: http://codereview.chromium.org/9168006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 13:43:44 +00:00
erik.corry@gmail.com
dc9910f4a4 Minor cleanups of numeric seeded hashing patch.
Review URL: http://codereview.chromium.org/9155010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 13:24:18 +00:00
erik.corry@gmail.com
6178a8d42c Add seed to hash of numeric keyed properties. This is a commit of http://codereview.chromium.org/9148006/ for Fedor Indutny.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 12:58:41 +00:00
erik.corry@gmail.com
0aff6c26d3 Fix zero hash handling on ARM.
Some cleanup.
Review URL: http://codereview.chromium.org/9169010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 12:01:04 +00:00
danno@chromium.org
df8b359f41 Fix handling of -0.0 in IsInt32/IsUInt32
R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 10:05:45 +00:00
yangguo@chromium.org
842d8b9108 Fixing windows builds.
Review URL: http://codereview.chromium.org/9169007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 08:37:45 +00:00
yangguo@chromium.org
e6be821ca4 Fixing minGW build.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 08:17:08 +00:00
danno@chromium.org
03c737625a Make sure transitioned arrays efficiently call builtin Array functions
Loosen the requirement for Map equivalency on several map checks, including checks up the prototype chain, that are not sensitive to ElementsKinds. These selected map checks should also match against FAST_DOUBLE_ELEMENT and FAST_ELEMENT transitions of the original map. This specifically helps all variants of transitioned JSArrays to still efficiently call builtins like push, pop and sort.

BUG=none
TEST=none

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-09 16:37:47 +00:00
erik.corry@gmail.com
0264008354 Use shift and add instead of mul on ARM for integer hash.
Review URL: http://codereview.chromium.org/9153002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-09 13:33:59 +00:00
erik.corry@gmail.com
4bea3b5c54 Fix test-hashing after recent changes to string hashing.
Acriave test-hashing in SCons and buildbot runs.
Small cleanups in root register handling on ARM and MIPS.
Review URL: http://codereview.chromium.org/9110029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-06 11:33:20 +00:00
vegorov@chromium.org
c4d3a110a2 Adjust position recorded for call expressions.
For calls of the form ident(...) record position of the identifier as the position of the call. For other calls record positions of the opening parenthesis.

This guarantees that for expressions of the form function(){}() call position will not intersect with positions recorded for function literal which is used by the debugger for scope chain resolution.

R=kmillikin@chromium.org
BUG=http://crbug.com/109195
TEST=test/mjsunit/regress/regress-109195.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-06 10:26:17 +00:00
ulan@chromium.org
746ef93362 Move handlified functions from handles.cc to objects.cc
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 17:16:19 +00:00
rossberg@chromium.org
c427c35c87 Prepare push to trunk. Now working on version 3.8.6.
R=yangguo@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 14:56:44 +00:00
mstarzinger@chromium.org
e79274abe6 Fix handling of bogus receivers for Harmony collections.
R=rossberg@chromium.org
BUG=v8:1884
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 12:55:06 +00:00
yangguo@chromium.org
5253363cc2 Add netbsd support to gyp build.
Review URL: http://codereview.chromium.org/9071004
Patch from Matthew Sporleder <msporleder@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 12:17:08 +00:00
erik.corry@gmail.com
ea3a515d9d Fix the logic that should ensure that a string cannot have
a hash key of zero.
Review URL: http://codereview.chromium.org/9113006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 10:18:28 +00:00
erik.corry@gmail.com
1327cb0acd Determine page size at runtime on posix platforms. Landing for kalmard. http://codereview.chromium.org/9023007/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 10:07:33 +00:00
vegorov@chromium.org
22bc8f6ac5 Alter the second hash used in StoreBuffer::Compact.
hash2 >> (kHashMapLengthLog2 * 2) was always zero because hash2 was masked with (kHashMapLength - 1).

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 09:57:10 +00:00
vegorov@chromium.org
50f235fe49 MIPS: Avoid embedding new space objects into code objects in the lithium gap resolver.
Port r10301 (c91aeb4c).

BUG=
TEST=

Review URL: http://codereview.chromium.org/9032005
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 09:26:15 +00:00
vegorov@chromium.org
07eb3ada9d Ensure that store buffer filtering hash sets are cleared after StoreBuffer::Filter.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 07:53:28 +00:00
vegorov@chromium.org
e726c00ea6 When shrinking semispace don't relink pages if semispace is not committed
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 19:59:01 +00:00
danno@chromium.org
2335545108 Rollback 10331: Make sure transitioned arrays efficiently call builtin Array functions
Due to perf regressions

TBR=fschneider@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 17:29:01 +00:00
danno@chromium.org
69366adfb6 Make sure transitioned arrays efficiently call builtin Array functions
Loosen the requirement for Map equivalency on several map checks, including checks up the prototype chain, that are not sensitive to ElementsKinds. These selected map checks should also match against FAST_DOUBLE_ELEMENT and FAST_ELEMENT transitions of the original map. This specifically helps all variants of transitioned JSArrays to still efficiently call builtins like push, pop and sort.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 17:16:04 +00:00
erik.corry@gmail.com
81a0271004 Randomize the seed used for string hashing. This helps guard against
CPU-eating DOS attacks against node.js servers.  Based on code from
Bert Belder.  This version only solves the issue for those that compile
V8 themselves or those that do not use snapshots.  A snapshot-based
precompiled V8 will still have predictable string hash codes.
Review URL: http://codereview.chromium.org/9086006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 15:12:15 +00:00
kmillikin@chromium.org
4a4ccbf434 Fix a few preprocessor macros that could capture an 'else'.
Namely they are SLOW_ASSERT, RETURN_IF_SCHEDULED_EXCEPTION, and
RETURN_IF_EMTPY_HANDLE_VALUE.

R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 14:45:29 +00:00
danno@chromium.org
0f8be1f92f MIPS: Undo allocation of half-formed array during elements transition
Port r10320 (bb429e82)

BUG=
TEST=

Review URL: http://codereview.chromium.org/9082001
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 09:40:47 +00:00
danno@chromium.org
b6e11b5bcc MIPS: Add InternalArrayCodeGeneric
Port r10308 (4e74cc88)

BUG=
TEST=

Review URL: http://codereview.chromium.org/9078002
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 09:39:35 +00:00
danno@chromium.org
2063b374d6 MIPS: Ensure that InternalArrays remain InternalArrays regardless of how they are constructed.
Port r10306 (9141da8e)

BUG=
TEST=

Review URL: http://codereview.chromium.org/9080001
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 09:38:08 +00:00
yangguo@chromium.org
d9f7cf819c Implement callback when script finishes running in V8 API.
TEST=test-api/LeaveScriptCallback

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 08:48:35 +00:00
yangguo@chromium.org
fa2688a101 Improve performance of Math.min and Math.max for the case of two arguments.
BUG=v8:1325
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-03 10:45:28 +00:00
danno@chromium.org
79f18cae93 Undo allocation of half-formed array during elements transition
R=vegorov@chromium.org
BUG=none
TEST=no asserts in debug tests with smi-only-array on

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-03 09:39:34 +00:00
kmillikin@chromium.org
b75beff3fc Make Runtime_Apply safer.
There is a call to Object::GetElement that could conceivably cause a GC.
Handlify all raw pointer local variables.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-02 15:22:21 +00:00
svenpanne@chromium.org
747f779974 Prepare push to trunk. Now working on version 3.8.5.
R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-02 09:20:45 +00:00
vegorov@chromium.org
4907f424ad Filter transitions while searching for CONSTANT_FUNCTION property in Call::ComputeTarget.
Otherwise transition will hide CONSTANT_FUNCTION property with the same name residing on the prototype.

R=danno@chromium.org
BUG=v8:1883

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-02 08:54:01 +00:00
danno@chromium.org
f648626eb9 Reland 10309: Ensure large Smi-only arrays don't transition to FAST_DOUBLE_ARRAY
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-30 14:28:14 +00:00
danno@chromium.org
5d85a04472 Rollback 10309
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-30 13:42:21 +00:00
danno@chromium.org
dff0e36d2d Ensure large Smi-only arrays don't transition to FAST_DOUBLE_ARRAY
BUG=v8:1849
TEST=test/mjsunit/regress/regress-1849.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-30 12:54:23 +00:00
danno@chromium.org
cab07f5523 Add InternalArrayCodeGeneric
R=whesse@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-29 12:19:34 +00:00
danno@chromium.org
5bc7e823cf Remove unused runtime function
R=whesse@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-28 15:14:33 +00:00
danno@chromium.org
aa38094bf0 Ensure that InternalArrays remain InternalArrays regardless of how they are constructed.
R=whesse@chromium.org
BUG=v8:1878
TEST=test/mjsunit/regress/regress-1878.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-27 15:12:12 +00:00
danno@chromium.org
523db68c4e Prepare push to trunk. Now working on version 3.8.4.
TBR=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-27 10:03:28 +00:00
danno@chromium.org
2961627f11 MIPS: fix bug in KeyedStoreIC::GenerateNonStrictArguments()
r8425 (1081f75) had fixed this originally, but those changes were
accidentally reverted when the experimental/gc branch was merged
at r9600.

BUG=
TEST=debug mozilla regress-137181

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-27 08:41:30 +00:00
vegorov@chromium.org
3947056c03 Avoid embedding new space objects into code objects in the lithium gap resolver.
R=danno@chromium.org
BUG=http://crbug.com/108296
TEST=test/mjsunit/regress/regress-108296.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-23 10:39:01 +00:00
fschneider@chromium.org
70056762f1 Remove unnecessary environment from LStoreKeyedFastElements.
This was a left-over from a time when bounds-check was performed
as part of this instruction.

I also refactored and improved the code for smi-only arrays.

R=vegorov@chromium.org
Review URL: http://codereview.chromium.org/9023006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-22 16:23:47 +00:00
vegorov@chromium.org
068128dadd Fix GCC 4.7 warnings:
* src/debug.cc (Debug::SetBreakPoint): Compare value not pointer.

Review URL: http://codereview.chromium.org/8971002
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 21:50:24 +00:00
vegorov@chromium.org
e624162c45 Fix GCC 4.7 warnings.
* src/string-search.h (StringSearch): Avoid -Werror=strict-overflow
  warning.

Review URL: http://codereview.chromium.org/8947022
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 21:28:41 +00:00
ulan@chromium.org
d61278da6d Do not reassign debug-only flag in release mode.
BUG=1871
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 16:19:55 +00:00
mstarzinger@chromium.org
aae7033ba1 Fix JavaScript accessors on objects with interceptors.
This fixes how Object.defineProperty() defines JavaScript accessors on
objects with installed API interceptors. The definition itself does not
cause any interceptors to be called, whereas any subsequent accesses on
said object will still fire the interceptor. This behavior is in sync
with API accessors.

R=rossberg@chromium.org
BUG=v8:1651,chromium:94666
TEST=cctest/test-api

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 16:14:38 +00:00
ulan@chromium.org
c2109cdd1e Uncommit free pages in all spaces on low memory notification.
BUG=v8:1669
TEST=
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 08:51:59 +00:00
danno@chromium.org
d1b35de563 Prepare push to trunk. Now working on version 3.8.3.
R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 07:50:24 +00:00
danno@chromium.org
59db8059a3 MIPS: Support Smi->Double->HeapObject transitions in constructed Arrays.
Port r10218 (1f42dff).

Original commit message:

Also several bugs with Smi/double elements handling and make Ensure* routines more flexible.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-20 12:59:23 +00:00
kmillikin@chromium.org
76cc6878fc MIPS: Clean up handling of global cell stores in the optimizing compiler.
Port r10280 (5f6aec5).

Original commit message:

Tell the register allocator the value is not overwritten.  Never use
temporary registers on ia32, avoid them on x64 and ARM.  Restore the
original copyright date on assembler.cc.

BUG=
TEST=

Review URL: http://codereview.chromium.org/9004017
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-20 12:36:36 +00:00
kmillikin@chromium.org
d8acc2dfbe Clean up handling of global cell stores in the optimizing compiler.
Tell the register allocator the value is not overwritten.  Never use
temporary registers on ia32, avoid them on x64 and ARM.  Restore the
original copyright date on assembler.cc.

R=fschneider@chromium.org
BUG=v8:1870
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-20 10:57:12 +00:00
mstarzinger@chromium.org
04f0e33229 Fix handling of foreign callbacks in DefineOwnProperty.
We use foreign callbacks to make some properties shadow internal values
but still behave as data properties from within JavaScript. This means
when a value is passed to Object.defineProperty() on such a property,
it should update the internal value instead of redefinind the property
and destroying the shadowing.

R=rossberg@chromium.org
BUG=v8:1530
TEST=mjsunit/regress/regress-1530,test262/S15.3.3.1_A4

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-20 08:49:51 +00:00
fschneider@chromium.org
6c0a4f5d45 Fix bug with filtering of foreign context maps in the type feedback.
The first attempt did not properly handle keyed loads/stores and
did not check the constructors of the objects in the prototype
chain.

Added two more tests to handle the fixed cases.

BUG=v8:1823
TEST=LeakGlobalObjectViaMapKeyed,LeakGlobalContextViaMapProto
Review URL: http://codereview.chromium.org/8974009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-19 12:39:52 +00:00
ricow@chromium.org
240e50d6a3 Prepare push to trunk. Now working on version 3.8.2
Review URL: http://codereview.chromium.org/8953026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-19 11:57:47 +00:00
vegorov@chromium.org
aae1d6c6d4 Do not delay sweeping of pages that are completely free.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-19 11:33:54 +00:00
yangguo@chromium.org
9a78e79216 Fixed --print-source crash.
BUG=v8:1866
TEST=d8 --print-source

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-16 13:46:01 +00:00
mstarzinger@chromium.org
03a2fc23b6 Remove bogus writability check in DefineGetterSetter.
R=rossberg@chromium.org
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-16 12:54:08 +00:00
yangguo@chromium.org
9821d28836 Change --print-all-code to include --code-comments.
Review URL: http://codereview.chromium.org/8968010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-16 08:38:52 +00:00
yangguo@chromium.org
4b05f743e0 Introduce --print-all-code flag and infrastructure for one flag to imply another flag.
Review URL: http://codereview.chromium.org/8957009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 17:00:27 +00:00
yangguo@chromium.org
b4e39dae3b MIPS: Porting r10252 to ARM.
Port r10262 (694b67).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8947017
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 14:04:50 +00:00
yangguo@chromium.org
216564af58 MIPS: Porting r10221 to ARM (avoid bailing out to runtime for short substrings).
Port r10250 (77889cc).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8953013
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 13:38:46 +00:00
yangguo@chromium.org
626b61f967 Porting r10252 to ARM (handle external strings in generated code when concatenating short strings).
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 11:04:58 +00:00
yangguo@chromium.org
4ed4a7a652 Porting r10252 to x64 (handle external strings in generated code when concatenating short strings).
Review URL: http://codereview.chromium.org/8909004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 10:59:39 +00:00
fschneider@chromium.org
b6b4af9d89 Filter out maps from different global context when collecting type feedback.
This avoid leaking memory because optimized code may hold on to maps
from different tabs otherwise.

BUG=v8:1823, 102895
Review URL: http://codereview.chromium.org/8892002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 14:01:54 +00:00
jkummerow@chromium.org
106973c3d2 Create missing boilerplate for array literals instead of deoptimizing
BUG=107370
TEST=new additions to mjsunit/array-literal-transitions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 13:01:27 +00:00
mstarzinger@chromium.org
502039a6bd Fix invalid usage of StoreIC_ArrayLength optimization.
This introduces an additional check into the StoreIC_ArrayLength builtin
checking that the array still has fast properties. Redifinitions of the
length property that would cause it's type or attributes to change, will
switch to slow properties, thereby invalidating said optimization.

R=svenpanne@chromium.org
BUG=v8:1756
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 12:46:32 +00:00
yangguo@chromium.org
9dfa8809e4 Fix nosnap builds.
Review URL: http://codereview.chromium.org/8938017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 11:48:55 +00:00
yangguo@chromium.org
4cd99d7cb9 Handle external strings in generated code when concatenating short strings.
TEST=string-external-cached.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 10:32:22 +00:00
yangguo@chromium.org
03696ca765 Porting r10221 to x64 (avoid bailing out to runtime for short substrings).
Review URL: http://codereview.chromium.org/8894001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 10:26:24 +00:00
yangguo@chromium.org
33a9e76808 Porting r10221 to ARM (avoid bailing out to runtime for short substrings).
Review URL: http://codereview.chromium.org/8923002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 10:22:33 +00:00
fschneider@chromium.org
1bdac10670 Fix two x64 code generation bugs introduced by const context slot code from r10244
TEST=mjsunit debug tests pass again.
Review URL: http://codereview.chromium.org/8932014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 08:43:55 +00:00
fschneider@chromium.org
626454a61a [hydrogen] don't bailout assignments to consts
If constant variable is allocated in CONTEXT

Patch by Fedor Indutny <fedor.indutny@gmail.com>.

BUG=
TEST=
R=vegorov@chromium.org
Review URL: http://codereview.chromium.org/8857001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-13 17:10:34 +00:00
ulan@chromium.org
76b48da7ef Guard against undefined fields in global context.
BUG=v8:1860
TEST=
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-13 14:20:03 +00:00
jkummerow@chromium.org
91efb313eb Fix crash in d8 when external array ctor hits stack overflow
BUG=100859
TEST=mjsunit/regress/regress-crbug-100859

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-13 13:51:58 +00:00
vegorov@chromium.org
a2159a6bb9 Fix GCC 4.7 warnings, which are related to char being signed in GCC
("narrowing conversion ... inside { } is ill-formed in C++11").

* src/mksnapshot.cc: Cast "char" to "unsigned char" when outputting snapshot.
* test/cctest/test-regexp.cc: Use static_cast to uc16 as the char
literal is signed.

Review URL: http://codereview.chromium.org/8825003
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-13 13:02:08 +00:00
fschneider@chromium.org
4a60bd0897 Remove dead code and one static initializer that came with it.
BUG=1859
Review URL: http://codereview.chromium.org/8917004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-12 11:54:21 +00:00
mstarzinger@chromium.org
4dd5bb2892 Fix another corner case for DefineOwnProperty on arrays.
R=rossberg@chromium.org
BUG=v8:1756
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-12 10:20:46 +00:00
keuchel@chromium.org
7348d910f2 MIPS: Hydrogen support for context allocated harmony bindings.
Port r10220 (1dae466).

Original commit message:

This CL adds support for loading from and storing to context slots
belonging to harmony let or const bound variables. Checks for the
hole value are performed and the function is deoptimized if they fail.
The full-codegen generated code will take care of properly throwing
a reference error in these cases.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8897025
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-12 08:48:39 +00:00
yangguo@chromium.org
6fdf50c040 MIPS: Port Math.pow inlining to ARM.
Port r10210 (6b15398) and r10226 (cdc75a453).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8896021
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-12 08:26:42 +00:00
ricow@chromium.org
c64fe2ecae MIPS: Reland 10216 - Optimize the equality check case of ICCompare stubs.
Port r10219 (56686b).

Original commit message:

Now with arm and x64 support. Additionally, added default unreachable case to switch statement in CompareIC::TargetState to make win and mac compilers happy.

Reviewer guide:
This is an exact copy of 10216 except:
src/arm/*
src/x64/*
src/ic.cc (added default case to swith in CompareIC::TargetState)

BUG=
TEST=
Review URL: http://codereview.chromium.org/8896022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-12 06:38:29 +00:00
danno@chromium.org
3e3827bd83 Fix regex regression in top-of-tree.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 15:04:41 +00:00
yangguo@chromium.org
a7f0c72e2d Fixing bug introduced in r10210 that crashes v8 raytrace benchmark.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 12:11:56 +00:00
yangguo@chromium.org
ce86c1bfb1 Avoid bailing out to runtime for short substrings.
This significantly improves the speed for creating short substrings (less than 13 characters) from slices, flat cons strings and external strings.

TEST=string-external-cached.js, string-slices.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 10:04:58 +00:00
keuchel@chromium.org
f1649cf39c Hydrogen support for context allocated harmony bindings.
This CL adds support for loading from and storing to context slots
belonging to harmony let or const bound variables. Checks for the
hole value are performed and the function is deoptimized if they fail.
The full-codegen generated code will take care of properly throwing
a reference error in these cases.

TEST=mjsunit/harmony/block-let-crankshaft.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 09:50:30 +00:00
ricow@chromium.org
ec66c36fbf Reland 10216 - Optimize the equality check case of ICCompare stubs.
Now with arm and x64 support. Additionally, added default unreachable case to switch statement in CompareIC::TargetState to make win and mac compilers happy.

Reviewer guide:
This is an exact copy of 10216 except:
src/arm/*
src/x64/*
src/ic.cc (added default case to swith in CompareIC::TargetState)
Review URL: http://codereview.chromium.org/8872060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 09:26:14 +00:00
danno@chromium.org
ef54f5690f Support Smi->Double->HeapObject transitions in constructed Arrays.
Also several bugs with Smi/double elements handling and make Ensure* routines more flexible.

BUG=none
TEST=test/mjsunit/array-construct-transition.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 08:50:19 +00:00
ricow@chromium.org
174532d23f Revert 10216 Optimize the equality check case of ICCompare stubs.
Missing arm and x64 implementations
Review URL: http://codereview.chromium.org/8883023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 17:28:44 +00:00
ricow@chromium.org
1028cf2631 Optimize the equality check case of ICCompare stubs.
This includes specialcasing the generation when we know that the maps
of the two objects are the same. In addition, a new specialized
compare ic known objects cache is created.

The reason for the cache is that we need to have access to the stub
code from the roots; if we do not, the GC will collect the stub. In
this specialized case we use the map pointer as key in the cache, and
we always do a lookup before generating code. Actually hitting
something in the cache will happen very rarely, but we could
potentially overwrite an existing stub, which again will lead to the
GC collecting this old stub (even if it is referenced from other code
objects)
Review URL: http://codereview.chromium.org/8520006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 17:17:21 +00:00
vegorov@chromium.org
a457040ca6 Ensure that non-optimized code objects are not flushed for inlined functions.
Collector was flushing them if optimized code was reachable only through the stack (not through the JSFunction object) which happens when you have a pending lazy deoptimization.

Also prevent v8::Script::New from leaking internal objects allocated by the compiler into outer HandleScope.

R=kmillikin@chromium.org
BUG=http://crbug.com/97116
TEST=test/mjsunit/regress/regress-97116.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 16:07:07 +00:00
yangguo@chromium.org
f206e15c42 MIPS: Fixing MathPowHalf on ARM.
Port r10166 (b57f3f1a), r10167 (202eada9) and r10170 (5c5c96da).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8822014
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 14:36:36 +00:00
ricow@chromium.org
251caf1b22 Prepare push to trunk. Now working on version 3.8.1.
Review URL: http://codereview.chromium.org/8873016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 13:16:55 +00:00
fschneider@chromium.org
150814a4ad MIPS: Port to x64 and ARM and some refactoring of ia32.
Port r10174 (a410586).

BUG=
TEST=
Review URL: http://codereview.chromium.org/8821024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 08:53:09 +00:00
yangguo@chromium.org
636e10d065 Port Math.pow inlining to ARM.
TEST=math-pow.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 16:55:00 +00:00
yangguo@chromium.org
30a2c00da5 Tweaks on Math.pow (ia32 and x64).
Review URL: http://codereview.chromium.org/8831008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 16:15:18 +00:00
keuchel@chromium.org
410219c8f3 Sync parser and preparser on do-while and return statements.
This CL fixes the preparser to have the same liberal automatic semicolon
insertion behaviour as the parser. In the case of a return statement in
global code we throw a syntax error at runtime rather than an early error
due to compatibility with KJS. However that hack allowed the following
syntactically incorrect program in global code in the parser but not in
the preparser:
  if (false) return else {}
while the slightly saner version with the obligatory semicolon
  if (false) return; else {}
was disallowed in the parser, but the preparser allowed it. This CL also
fixes that issue.

BUG=v8:1856
TEST=cctest/test-parsing.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 16:03:29 +00:00
danno@chromium.org
aaf393a4dc MIPS: Optimize Crankshaft array literal initialization from boilerplate.
Port r10138 (730f5a7f)

Original commit message:

BUG=
TEST=

Review URL: http://codereview.chromium.org/8789012
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 13:00:11 +00:00
fschneider@chromium.org
c1662a199b Fix a bug with register use in optimized Math.round.
We're not allowed to modify the input register and have to
use a temporary instead, otherwise the result of expressions
containing Math.round can be wrong.

BUG=106351
TEST=test/mjsunit/compiler/regress-106351.js
Review URL: http://codereview.chromium.org/8833007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 10:13:46 +00:00
yangguo@chromium.org
10675502f8 Tweak to shorten generated code in Math.pow.
Review URL: http://codereview.chromium.org/8834007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 09:44:31 +00:00
erik.corry@gmail.com
f6eab29d73 Remove write barriers for cells on x64, ARM and MIPS.
Review URL: http://codereview.chromium.org/8834005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 08:49:06 +00:00
erik.corry@gmail.com
a8bd2260ea Rescan cells at the end of mark-sweep. This means they don't need a
write barrier.
Review URL: http://codereview.chromium.org/8816021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 08:43:41 +00:00
erik.corry@gmail.com
c5c32e18ad More removal of write barriers and a rename to a less scary name.
Review URL: http://codereview.chromium.org/8816020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 08:43:18 +00:00
yangguo@chromium.org
c9c9ea676b Porting Math.pow changes to x64.
TEST=math-pow.js, regress-397.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 08:34:27 +00:00
mikhail.naganov@gmail.com
7aeab4ca6e Obligatory fix for Win64.
BUG=v8:1832
TEST=none
TBR=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 22:08:46 +00:00
mikhail.naganov@gmail.com
dae713f0ad Reapply r10158: Distinguish weak references in heap snapshots, group GC roots.
[Fixed the bug revealed by the Win32 bot]

Several changes to better organize snapshot data:

1. Provide information about weak references.
2. Group (GC roots) children.
3. Prettify debug snapshot printing.

BUG=v8:1832
TEST=cctest/test-heap-profiler/*Weak*
TBR=vitalyr@chromium.org

Initial CL: http://codereview.chromium.org/8716009

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 17:41:47 +00:00
danno@chromium.org
c33dfd1154 Don't track Smi->Double->Object element transitions for small undefined arrays.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 17:21:48 +00:00
fschneider@chromium.org
ff6f2fa9b3 Remove unnecessary use of raw pointers in hydrogen graph builder.
This is potentially a source of bugs, if someone inserts some code
that causes allocation.
Review URL: http://codereview.chromium.org/8818015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 15:31:01 +00:00
ulan@chromium.org
cda5b1a53f Use the old handler for low frequency idle notifications.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 14:30:21 +00:00
yangguo@chromium.org
72827079ac Fixing mozilla test failures regarding Math.pow.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 13:14:46 +00:00
sgjesse@chromium.org
32ee3c27c6 Handle possible difference between function code and activated code on preparation for break points
The full code activated for a function might not be the same code as
is currently the active full code for a function. There where some
asumptions in the debugger preparation for break points.

Unfortunately there is currently no regression test.

R=jkummerow@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 13:09:05 +00:00
erik.corry@gmail.com
81302d3b2e Elide write barriers and remove some heap_object->GetHeap() calls on
Smi write barriers.
Review URL: http://codereview.chromium.org/8822008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 13:00:40 +00:00
fschneider@chromium.org
066822a2cf Port to x64 and ARM and some refactoring of ia32.
Review URL: http://codereview.chromium.org/8111006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 12:11:08 +00:00
yangguo@chromium.org
c78825991a Remove early NaN/Infinity check in MathPowStub.
Review URL: http://codereview.chromium.org/8817015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 11:56:56 +00:00
keuchel@chromium.org
8b34f4630b Hydrogen support for stack local harmony bindings in function scope.
This is the first CL in a series that add support for the harmony scoping
features to crankshaft. This CL specifically adds support for stack
allocated 'let' and 'const' declared variables in function scopes.

TEST=mjsunit/harmony/block-let-crankshaft.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 09:41:06 +00:00
yangguo@chromium.org
087737cbcd Fix presubmit.
Review URL: http://codereview.chromium.org/8816010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 09:37:50 +00:00
yangguo@chromium.org
5e432754b3 Skip check for +/-0.5 in optimized Math.pow (ia32).
Review URL: http://codereview.chromium.org/8820007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 09:20:28 +00:00
yangguo@chromium.org
fe2049fcb8 Fixing fix for MathPowHalf on ARM.
Review URL: http://codereview.chromium.org/8817012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 09:20:00 +00:00
yangguo@chromium.org
b37ee7bcce Fixing MathPowHalf on ARM.
BUG=v8:397
TEST=regress-397.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 08:28:12 +00:00
danno@chromium.org
5bcb4d30ed Improve TraceIC logging
Explicitly log generic stub transitions and the reason that they are happening.

R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 21:54:45 +00:00
mikhail.naganov@gmail.com
a0c8ea00db Revert r10158 "Distinguish weak references in heap snapshots, group GC roots."
Heap profiler tests fail on Win32, need to investigate.

This reverts commit b5374ebd92c11ac4aae16b4e31e54166d406e490.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 17:21:55 +00:00
yangguo@chromium.org
4c3049b0f7 Fixing MathPowHalf on x64.
BUG=v8:397
TEST=regress-397.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 16:36:13 +00:00
mikhail.naganov@gmail.com
857aa09772 Distinguish weak references in heap snapshots, group GC roots.
Several changes to better organize snapshot data:

1. Provide information about weak references.
2. Group (GC roots) children.
3. Prettify debug snapshot printing.

BUG=v8:1832
TEST=cctest/test-heap-profiler/*Weak*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 16:35:57 +00:00
yangguo@chromium.org
1bfa622043 Refactor MathPowHalf on ia32.
BUG=v8:397, v8:1848
TEST=regress-397.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 15:58:25 +00:00
keuchel@chromium.org
08b4262512 Statically check for assignments to const in harmony mode.
The ES.next draft rev 4 in section 11.13 reads:
It is a Syntax Error if the AssignmentExpression is contained in extended code
and the LeftHandSideExpression is an Identifier that does not statically resolve
to a declarative environment record binding or if the resolved binding is an
immutable binding.

This CL adds corresponding static checks for the immutable binding case.

TEST=mjsunit/harmony/block-const-assign

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 14:43:28 +00:00
yangguo@chromium.org
1df183c5ae Fixing Math.pow(NaN, -0.0) == 1 on Windows.
Review URL: http://codereview.chromium.org/8804005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 09:54:15 +00:00
mstarzinger@chromium.org
b45f451a27 Fix special handling of DefineOwnProperty on arrays.
According to the ES5 spec the implementation of DefineOwnProperty() has
to special case handling of arrays. This implementation correctly
handles definitions of array index properties and redefinitions of the
length property.

R=svenpanne@chromium.org
BUG=v8:1756
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 09:53:43 +00:00
erik.corry@gmail.com
49a4dd983d Fix performance on the page cycler, which is not designed to test
GC speed.
Review URL: http://codereview.chromium.org/8804004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 08:58:12 +00:00
erik.corry@gmail.com
b8691a78af Clean up multi byte nop support on x64 to more closely match IA32.
Fix missing instruction in disassembler.
Fix wrong disassembly of multi-byte NOP on x64
Add test of disassembler on 64 bit!
Review URL: http://codereview.chromium.org/8773039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 08:58:01 +00:00
yangguo@chromium.org
5ae1ddd786 Fixing windows build.
"src\store-buffer.cc(72) : warning C4244: 'initializing' : conversion from 'intptr_t' to 'int', possible loss of data"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 07:57:44 +00:00
fschneider@chromium.org
7549b16413 Fix a bug with deoptimization from inside the default-clause of a switch-statement.
When generating a string-switch we have to use the correct ast id when
there is a default clause present.
Review URL: http://codereview.chromium.org/8776048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 15:15:23 +00:00
erik.corry@gmail.com
090be8bf15 Reduce minimum memory use on 64 bit to one page per semispace.
Review URL: http://codereview.chromium.org/8774045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 14:19:53 +00:00
erik.corry@gmail.com
0d7380da55 Let store buffer start out small for a 1Mbyte saving in boot
memory use (2Mbyte on x64).
Review URL: http://codereview.chromium.org/8776032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 14:08:12 +00:00
yangguo@chromium.org
929c619101 Quickfix for DoMathPowHalf.
TEST=regress-397.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 13:16:49 +00:00
danno@chromium.org
25e3d2706d Optimize Crankshaft array literal initialization from boilerplate.
BUG=none
TEST=test/mjsunit/array-literal-transitions.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 12:42:35 +00:00
erik.corry@gmail.com
ff71466e46 Fix lint
Review URL: http://codereview.chromium.org/8773033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 10:05:20 +00:00
erik.corry@gmail.com
701790fd34 Support multi-byte nop instructions as recommended by
the optimization guides from AMD and Intel.
Review URL: http://codereview.chromium.org/8776033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 10:01:50 +00:00
yangguo@chromium.org
d5fdb76028 Implement Math.pow using FPU instructions and inline it in crankshaft (ia32).
Review URL: http://codereview.chromium.org/8749002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 08:06:37 +00:00
fschneider@chromium.org
8f7a1f7808 Revert r10118 from bleeding edge.
It causes several test failures which I need to investigate.
Review URL: http://codereview.chromium.org/8769008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 16:57:54 +00:00
danno@chromium.org
540ac179dc MIPS: Port array literal changes on ARM.
Port r10085 (1ef7d5eb2).

This patch also contains a fix for StoreArrayLiteralElementStub::Generate which is only used from this code.

Original commit message:
Includes general array boilerplate copier and re-introduction FAST_ELEMENT optimizations in full-codegen.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8743010
Patch from Daniel Kalmard <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 14:40:13 +00:00
mstarzinger@chromium.org
830f763b07 MIPS: Implement crankshaft support for nested object literals.
Port r10061 (c648e1d1)

Original commit message:
This generates optimized code for deep-copying of nested object literal
boilerplates which are statically known. Most of the boilerplates have
already been generated at crankshaft time, so this optimization should
kick in for virtually every object literal. Only nested object literal
graphs up to a certain depth and containing up to a certain total number
of properties are considered for this optimization. This will prevent
explosion of code size due to large object literals (e.g. eval on JSON).
Improves splay performance because object literals are created often.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8745012
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 14:32:26 +00:00
fschneider@chromium.org
8acd4accac Insert proper padding between lazy deoptimization points and safepoints.
On x64 we need 13 bytes for patching the call for lazy deopt. We have to
make sure that patching does not overwrite the code at the safepoint.

BUG=v8:1847
Review URL: http://codereview.chromium.org/8775009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 14:19:34 +00:00
mstarzinger@chromium.org
75a8165950 MIPS: Implement code stub for object literal creation.
Port r10056 (ffa6eedd8).

Original commit message:
This just ports r10036 to the ARM codegenerator. Please see the original
revision for a detailed description.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8747011
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 14:12:30 +00:00
ulan@chromium.org
fbef117203 Use the old idle notification handler when context is disposed.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 12:17:19 +00:00
fschneider@chromium.org
4ca20a1d35 Simplify stack check instruction in Crankshaft.
So far we had two types of stack checks: one used for function entries
and one used at loop back edges which uses a deferred code object to
avoid spilling of registers in the loop.

After refactoring lazy deoptimization the first stack check can also
use deferred code. This change removes the first type of stack check
instruction in Crankshaft and uses a deferred stack check in all
places.
Review URL: http://codereview.chromium.org/8775002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 09:54:05 +00:00
yangguo@chromium.org
d9dc9104af MIPS: Add external strings support to regexp in generated code.
Port r10070 (4d7e5a8a)

Original commit message:
TEST=test/mjsunit/string-external-cached.js

BUG=

Review URL: http://codereview.chromium.org/8744012
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 08:39:22 +00:00
yangguo@chromium.org
ab924c3d8a MIPS: Porting r10023 and r10054 to arm (pointer cache for external strings).
Port r10059 (c32f98a9)

Original commit message:

BUG=
TEST=

Review URL: http://codereview.chromium.org/8746015
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 08:31:09 +00:00
svenpanne@chromium.org
76e69df735 Prepare push to trunk. Now working on version 3.8.0
R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 08:14:30 +00:00
ricow@chromium.org
258a93d44e Increase tick interval for the android platform.
The phones and tablets currently in use are much slower that desktop
and laptop machines for which the current heuristics have been tuned.
Review URL: http://codereview.chromium.org/8757017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 07:30:57 +00:00
keuchel@chromium.org
f5d9c1bef8 Fix build with GCC 4.7, which fails with "narrowing conversion of 'id' from 'int' to 'unsigned int' inside { } is ill-formed in C++11"
Contributed by burnus@net-b.de

Review URL: http://codereview.chromium.org/8724003
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 18:04:12 +00:00
ulan@chromium.org
4d0f2839ed Fix a compiler error on Windows introduced by r10093
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 17:53:26 +00:00
ulan@chromium.org
59897dbe44 Fix compile errors on Windows and Mac introduced by r10093.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 16:55:55 +00:00
yangguo@chromium.org
d117e9d925 MIPS: Implement Math.tan in generated code.
Port r10067 (593c1ea) and r10069 (87a06dc).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8743009
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 16:47:54 +00:00
yangguo@chromium.org
5371508b4f MIPS: Catch non-string subject in RegExpExecStub.
Port r10064 (9c6789a3)

Original commit message:
There is no test case to trigger any crash. This is only to guard against the case that the native function is called with unsafe arguments.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8742012
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 16:36:00 +00:00
fschneider@chromium.org
3c82957f04 Only make function literals in top-level object literals pretenured and constant function properties.
This change is a refinement of http://code.google.com/p/v8/source/detail?r=7283. Making all
function literals inside object literals constant function properties causes us to lose map
sharing. This hurts code where many object literals are created.

The idea is that top-level code is mostly executed once and functions inside top-level
object literals remain fast with this change.

BUG=v8:1795
Review URL: http://codereview.chromium.org/8746018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 16:00:47 +00:00
fschneider@chromium.org
552f800d46 Fix a bug in the register allocator.
Avoid spilling a live range that has a register use at the next instruction.
The register use position has to be after the end of the next instruction so
that we don't end up trying to split a live range at the beginning.

BUG=105112
Review URL: http://codereview.chromium.org/8743011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 14:14:49 +00:00
sgjesse@chromium.org
5ccdb3b692 Fix handling of recompiling code for optimized and inlined functions
The debugger preparation did not take optimized functions - including
inlined function into account. This caused the full-code used for
deoptimization to be the "lazy compile" builtin which did not work and
caused V8 to crash.

R=yangguo@chromium.org

BUG=chromium:105375, v8:1782
TEST=test/mjsunit/debug-break-inline.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 11:48:35 +00:00
ulan@chromium.org
8dc728126e Start incremental marking on idle notification.
BUG=v8:1458
TEST=cctest/test-api/IdleNotification*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 11:13:36 +00:00
erik.corry@gmail.com
e2f2c77e6f Be more willing to expand old space when evacuating new space at the end of
a mark-sweep.  We have a soft limit on old space size, which is designed to
trigger an old-space collection when we hit it.  Unfortunately although the
soft limit had already triggered an old space collection, the soft limit was
preventing objects from new space from being promoted.  For every promotion
candidate we were checking 3 different ways to allocate in old space before
giving up and putting the object in the other semispace.  This change allows
the promoted objects to go to old space and also makes us more eager to
sweep a page before trying other ways to find space for an object.
Review URL: http://codereview.chromium.org/8748005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 10:38:16 +00:00
erik.corry@gmail.com
83aa4b6eea Elide write barrier.
Review URL: http://codereview.chromium.org/8659039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 09:33:03 +00:00
mstarzinger@chromium.org
506b8e8ed6 Prepare push to trunk. Now working on version 3.7.12.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 14:21:47 +00:00
fschneider@chromium.org
9418d56858 Fix bug when generating padding to ensure space for lazy deoptimization.
BUG=v8:1846
Review URL: http://codereview.chromium.org/8725030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 12:39:28 +00:00
erik.corry@gmail.com
e9b6e58560 Fix windows build.
Review URL: http://codereview.chromium.org/8725029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 12:17:59 +00:00
danno@chromium.org
a7decc7e7e Port array literal changes on ARM.
Includes general array boilerplate copier and re-introduction FAST_ELEMENT optimizations in full-codegen.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 12:09:06 +00:00
erik.corry@gmail.com
9c18742dd6 Only sweep one page eagerly unless we are running out of space.
Limit the number of pages that are compacted in a given GC.
Review URL: http://codereview.chromium.org/8692002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 11:56:14 +00:00
kmillikin@chromium.org
0a7010458a Remove the static qualifier from functions in header files.
This shaves 416+ KB, just under 1% off the size of the debug d8 executable
on Linux (mostly because the CheckHelper functions for assertions were
getting separate copies for each compilation unit).  The difference in
release builds is negligible---a size reduction of 0.1%.

Also, change namespace-level 'static const' variables to remove the static
storage class as it's the default.

R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 10:56:11 +00:00
vegorov@chromium.org
23c15e495c When scavenging update source slot before migrating object it points to.
Source slot might belong to a dead old object and we might allocate a new object over it when evacuating a new space object this slot points to. In this case if we update slot after migrating object we will write into migrated object.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 10:02:38 +00:00
mstarzinger@chromium.org
e3eb71e991 Fix assertion while marking Harmony weak maps.
R=erik.corry@gmail.com
BUG=v8:1845
TEST=mjsunit/harmony/proxies-example-membrane

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 08:48:51 +00:00
keuchel@chromium.org
b3a2e242db Reapply "Fix the ScopeIterator reimplementation".
This reapplies a fixed version of r10076 that also works on arm. Patch set one is r10076 reapplied and patch set 2 contains the new fix.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 08:43:14 +00:00
keuchel@chromium.org
e26093f3d8 Make let/const outside of the extended mode early errors (under harmony flag).
The ES.next drafts require that source code that matches the productions for
let and const bindings outside the extended mode trigger early syntax
errors. This CL adapts the parser / preparser accordingly under the harmony
scoping flag.

Summary:
* Harmony scoping flag not set: Old semantics allowing const in classic mode
with function level scope. Const binding in strict mode and let bindings in
classic and strict mode trigger early syntax errors.
* Harmony scoping is set: Use new harmony const and let in
extended mode and old const in classic mode. This is to preserve
compatibility with current web pages that already use
non-standard implementations of const. An early syntax error is
thrown on const in strict mode and on let in classic and strict
mode.

This depends on:
http://codereview.chromium.org/8562002/

TEST=mjsunit/harmony/block-early-errors.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 06:38:04 +00:00
danno@chromium.org
f35e53ff50 Reintroduce fast path in full-codegen for VisitArrayLiteral.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 17:17:46 +00:00
keuchel@chromium.org
9664e48e14 Revert r10076 due to arm build failures.
Review URL: http://codereview.chromium.org/8716005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 14:01:13 +00:00
keuchel@chromium.org
8866d63cc9 The ScopeIterator uses recorded scope position - as detailed in scopes.h - and
source code positions it gets from the program counter to recreate the scope
chain by reparsing the function or program.

This CL includes the following changes
* Adds source code positions for the assignment added by the rewriter.
* Run the preparser over global code first.
* Use the ScopeType from the ScopeInfo to determine if the code being debugged
  is eval, function or global code instead of looking up the '.result' symbol.

TEST=mjsunit/debug-stepout-scope.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 12:47:39 +00:00
ulan@chromium.org
71a2f538c0 Dump counters sorted by name on d8 exit.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 12:12:00 +00:00
lrn@chromium.org
c7fccff9af Clean up JavaScript files to better follow coding standard.
Multiline conditionals must use braces.
Semicolons are not optional.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 12:11:00 +00:00
mstarzinger@chromium.org
c501fd9c45 Implement high promotion mode for new space.
This mode drastically decreases pause times by limiting maximum capacity
of the young generation when mutators generate many long-lived objects.
It shrinks new space back to the initial capacity and keeps it at that
capacity until survival rate decreases again.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 14:41:38 +00:00
yangguo@chromium.org
f8cabc645a Shorten FP register pops where possible.
Review URL: http://codereview.chromium.org/8699004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 14:26:54 +00:00
yangguo@chromium.org
d542a2fb75 Add external strings support to regexp in generated code.
TEST=test/mjsunit/string-external-cached.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 14:04:47 +00:00
yangguo@chromium.org
04aa022e51 Fixing build errors on arm.
Review URL: http://codereview.chromium.org/8698005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 13:38:43 +00:00
mstarzinger@chromium.org
b07ff9d8bc Fix assertion broken by recent revision.
R=yangguo@chromium.org
TEST=mjsunit/keyed-call-ic

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 13:21:56 +00:00
yangguo@chromium.org
dcc05b9fca Implement Math.tan in generated code.
Review URL: http://codereview.chromium.org/8700004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 13:15:31 +00:00
lrn@chromium.org
ebccde15bc Don't preparse large files to find boundaries of lazy functions.
Instead use the preparser inline to parse only the lazy function
bodies.

This is still disabled for small files.
More measurements are needed to determine if lazy-compiling small
sources is worth it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 09:36:31 +00:00
yangguo@chromium.org
50e5aaa73f Catch non-string subject in RegExpExecStub.
There is no test case to trigger any crash. This is only to guard against the case that the native function is called with unsafe arguments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 18:36:24 +00:00
keuchel@chromium.org
cbf08248f7 Make the parser track the language mode instead of keeping its own harmony flag.
So far the parser had its own harmony flag to disable the harmony scoping
feature when parsing native functions. With the introduction of the extended
language mode this becomes unnecessary because native functions will never enter
the extended mode. The parser can thus track FLAG_harmony_scoping and the
language mode of the current scope to see if harmony features are allowed. The
scanner and preparser have to keep their flag, because they can't use
FLAG_harmony_scoping as it is not available for the preparser-process
executable.

This depends on:
http://codereview.chromium.org/8417035/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:58:09 +00:00
keuchel@chromium.org
1e9a7267ab Introduce extended mode.
This CL introduces a third mode next to the non-strict
(henceforth called 'classic mode') and 'strict mode'
which is called 'extended mode' as in the current
ES.next specification drafts. The extended mode is based on
the 'strict mode' and adds new functionality to it. This
means that most of the semantics of these two modes
coincide.

The 'extended mode' is entered instead of the 'strict mode'
during parsing when using the 'strict mode' directive
"use strict" and when the the harmony-scoping flag is
active. This should be changed once it is fully specified how the 'extended mode' is entered.

This change introduces a new 3 valued enum LanguageMode
(see globals.h) corresponding to the modes which is mostly
used by the frontend code. This includes the following
components:
* (Pre)Parser
* Compiler
* SharedFunctionInfo, Scope and ScopeInfo
* runtime functions: StoreContextSlot,
  ResolvePossiblyDirectEval, InitializeVarGlobal,
  DeclareGlobals

The old enum StrictModeFlag is still used in the backend
when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
* SetProperty runtime function, Delete builtin
* StoreIC and KeyedStoreIC
* StubCache

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:17:04 +00:00
mstarzinger@chromium.org
7e7d4dfd64 Implement crankshaft support for nested object literals.
This generates optimized code for deep-copying of nested object literal
boilerplates which are statically known. Most of the boilerplates have
already been generated at crankshaft time, so this optimization should
kick in for virtually every object literal. Only nested object literal
graphs up to a certain depth and containing up to a certain total number
of properties are considered for this optimization. This will prevent
explosion of code size due to large object literals (e.g. eval on JSON).
Improves splay performance because object literals are created often.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 13:42:52 +00:00
lrn@chromium.org
4c766c2330 Add histogram timer scope for preparsing.
Currently the parser benchmark doesn't count preparsing, since it doesn't
know when it's preparsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 13:24:30 +00:00
yangguo@chromium.org
304d49cd17 Porting r10023 and r10054 to arm (pointer cache for external strings).
Review URL: http://codereview.chromium.org/8682010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 11:07:39 +00:00
yangguo@chromium.org
198e33560b Porting r10023 and r10054 to x64 (pointer cache for external strings).
Review URL: http://codereview.chromium.org/8662009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 10:16:39 +00:00
mstarzinger@chromium.org
83b01d84a1 ARM: Implement code stub for object literal creation.
This just ports r10036 to the ARM codegenerator. Please see the original
revision for a detailed description.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 15:01:20 +00:00
yangguo@chromium.org
c2514c8c8e Refactor Heap::SymbolMapForString to use switch/case.
Review URL: http://codereview.chromium.org/8683001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 13:31:26 +00:00
yangguo@chromium.org
2055f4195e Recommit introducing short external strings.
Review URL: http://codereview.chromium.org/8677006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 13:08:28 +00:00
mstarzinger@chromium.org
7e6a69cfa8 Prepare push to trunk. Now working on version 3.7.11.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 11:56:52 +00:00
yangguo@chromium.org
922aee5a02 Rolling back r10049 due to webkit failures.
Review URL: http://codereview.chromium.org/8681007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 10:41:12 +00:00
yangguo@chromium.org
21edc7c30b Introduce short external strings without pointer cache.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 09:58:58 +00:00
ulan@chromium.org
e951d38261 Set the code age field of SharedFunctionInfo correctly.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 19:46:00 +00:00
fschneider@chromium.org
23e948b8a7 Set maximum length of FixedArray in terms of elements instead an absolute number of bytes.
This sets the limit to 128M elements on all platforms. Before allocating a large array may
cause an OutOfMemory on x64 whereas it would not on ia32.

Also remove an unused constant from the FreeSpace class.

BUG=103103
Review URL: http://codereview.chromium.org/8637015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 16:02:26 +00:00
fschneider@chromium.org
be1a94b626 MIPS: Landing: [hydrogen] optimize switch with string clauses.
Port r10019 (9bbb78bf)

Original commit message:
Patch by Fedor Indutny <fedor.indutny@gmail.com>.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8574073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 13:51:56 +00:00
mstarzinger@chromium.org
de389f1d23 Remove unused runtime functions for literals.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 10:15:00 +00:00
jkummerow@chromium.org
ceea4fe6ee Minimal changes required to build d8 for Android
Review URL: http://codereview.chromium.org/8554007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 15:01:52 +00:00
ricow@chromium.org
ec04dcfa0c Always create deopt data when using full-codegen if the function is optimizable
Review URL: http://codereview.chromium.org/8611003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 14:07:46 +00:00
kmillikin@chromium.org
29b5ceb897 MIPS: Add a level of indirection to exception handler addresses.
Port r9977 (9aded78be4).
Note: This is the port of the reapplied patch, not the original.

Original commit message:

To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8557003
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 14:05:18 +00:00
mstarzinger@chromium.org
561b5716d7 Fix presubmit error for recent revision.
R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 14:04:41 +00:00
mstarzinger@chromium.org
d7e099889e Implement code stub for object literal creation.
This generates code stubs for cloning of shallow object literal
boilerplates that have no elements and only fast properties. Improves
splay performance because object literals are created frequently.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 13:27:44 +00:00
erikcorry
fa7ae22f4f Prepare push to trunk. Now working on version 3.7.10.
Review URL: http://codereview.chromium.org/8612001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 13:06:13 +00:00
fschneider@chromium.org
8ebd1999f5 Propagate and combine constants in Hydrogen
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8473002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 10:18:47 +00:00
keuchel@chromium.org
c4dfef9432 Partially revert r9734 due to crashes in dev and canary channel.
This reverts the changes to the ScopeIterator from r9734 to the
previous implementation. The other changes in the commit to Parser,
Scope and (Serialized)ScopeInfo are retained.

BUG=104522,v8:1824,v8:1826

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-21 08:44:02 +00:00
erik.corry@gmail.com
296afb3e5d Remove more superfluous write barriers.
Review URL: http://codereview.chromium.org/8595008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 14:09:41 +00:00
erik.corry@gmail.com
5c1044bb54 Add flag --collect-megamorphic-maps-from-stub-cache to help diagnose a
memory leak.
Review URL: http://codereview.chromium.org/8599006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 14:08:57 +00:00
mikhail.naganov@gmail.com
a0f3c5d451 Really fix missing HandleScope to prevent local handles to DOMWindow leaking.
A follow-up to r9994.

R=vitalyr@chromium.org
BUG=102895
TEST=cctests/test-heap-profiler/NoHandleLeaks

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 11:42:39 +00:00
yangguo@chromium.org
bbab532699 Fix debug builds.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 11:16:58 +00:00
yangguo@chromium.org
5c23e4e57a Avoid explicitly using built-in new operator where possible to appease Windows build.
Review URL: http://codereview.chromium.org/8561011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 11:08:46 +00:00
yangguo@chromium.org
f0878c8424 MIPS: Change generated code for substring not to bail out to runtime system.
Port r10012 (09c6bcba81).

Original commit message:
There is no need to bail out to runtime system when creating sliced strings of external strings since the string content is unimportant.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 09:13:01 +00:00
yangguo@chromium.org
0bd29a1af6 Fixing compiler warning on gcc 4.6.1.
BUG=v8:1831

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 09:10:19 +00:00
yangguo@chromium.org
6551e8d47d Removing exit time destructors by leaking static members.
Note that some cctests and d8 still contain statical members with exit time destructors.

BUG=v8:1828

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 08:59:33 +00:00
danno@chromium.org
f808f4ae7b Optimize array literal boilerplate copy for fast cases.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 17:22:21 +00:00
yangguo@chromium.org
5a82d78948 Add pointer cache field to external string for access in generated code.
TEST=test/mjsunit/string-externalize.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 17:05:12 +00:00
danno@chromium.org
be923eed32 Add version of x64 FastCloneShallowArrayStub that copies all boilerplate kinds
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 15:08:59 +00:00
danno@chromium.org
371841b270 Add ia32 FastCloneShallowArrayStub that copies all boilerplate kinds.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 14:55:26 +00:00
fschneider@chromium.org
aa3004d21f MIPS: Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub.
Port r10006 (4b344a03).

Original commit message:

Changes the way we do lazy deoptimization:

1. For side-effect instructions, we insert the lazy-deopt call at
the following LLazyBailout instruction.

     CALL
     GAP
     LAZY-BAILOUT ==> lazy-deopt-call

2. For other instructions (StackCheck) we insert it right after the
instruction since the deopt targets an earlier deoptimization environment.

   STACK-CHECK
   GAP ==> lazy-deopt-call

The pc of the lazy-deopt call that will be patched in is recorded in the
deoptimization input data. Each Lithium instruction can have 0..n safepoints.
All safepoints get the deoptimization index of the associated LAZY-BAILOUT
instruction. On lazy deoptimization we use the return-pc to find the safepoint.
The safepoint tells us the deoptimization index, which in turn finds us the
PC where to insert the lazy-deopt-call.

Additional changes:
* RegExpLiteral marked it as having side-effects so that it
  gets an explicitlazy-bailout instruction (instead of
  treating it specially like stack-checks)
* Enable target recording CallFunctionStub to achieve
  more inlining on optimized code.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8587008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 14:33:49 +00:00
fschneider@chromium.org
8fbf1d5017 Landing: [hydrogen] optimize switch with string clauses. Patch by Fedor Indutny <fedor.indutny@gmail.com>.
Original code review: http://codereview.chromium.org/8373029/
Review URL: http://codereview.chromium.org/8589019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:57:55 +00:00
danno@chromium.org
3c5b91029b MIPS: Cleaned up an unused declaration in lithium-codegen-mips.h.
DoDeferredBinaryOpStub is not used (or even defined) anywhere.
MIPS can handle special cases of div, which is the only place it's used in the ARM version.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8588005
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:36:27 +00:00
danno@chromium.org
b079140101 MIPS: Fixed a minor inconsistency in lithium-codegen-mips.cc
EmitIsObject is only called from one function, DoIsObjectAndBranch.
DoIsObjectAndBranch now passes the temp2 register to EmitIsObject
instead of simply relying on the two functions using the same
lithium scratch register.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8588004
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:35:15 +00:00
danno@chromium.org
bef75b3496 MIPS: Re-work DoModI.
Changes:
-separated the two code-paths (constant power of 2 divisor similar to ARM and everything else)
-replaced a bailout condition with faster handling (negative modulo result)
-removed a possibly useless mov instruction from one path
-replaced the IsConstantOperand condition with the more meaningful HasPowerOf2Divisor (although in this specific case they're equivalent)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8591002
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:33:56 +00:00
danno@chromium.org
e99b92723d MIPS: Fix for Ins macro-assembler instruction for non-mips32r2 platforms.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8520023
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:31:26 +00:00
danno@chromium.org
cfc54e4dac MIPS: Implement runtime function for array literal transitions.
Port r9979(0cf0570a).

Original commit message:

Also simplify ia32 and x64 handing of the trace_elements_transition flag.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8557004
Patch from Gergely Kis <gregely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 13:27:58 +00:00
yangguo@chromium.org
85b693c9e8 Change generated code for substring not to bail out to runtime system.
There is no need to bail out to runtime system when creating sliced strings of external strings since the string content is unimportant.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 08:40:40 +00:00
ricow@chromium.org
08f69647d3 Prepare push to trunk. Now working on version 3.7.9.
Review URL: http://codereview.chromium.org/8568042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 08:10:30 +00:00
vegorov@chromium.org
34b8e11d10 Reset allocation info when we are releasing the page that contains allocation top.
R=erik.corry@gmail.com
BUG=103587

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-16 22:25:56 +00:00
ricow@chromium.org
22db7b1eaf Use safe version (i.e. using write barrier) of set_map in ReinitializeJSReceiver.
We pass in the object that we set the map on.
Review URL: http://codereview.chromium.org/8486005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-16 10:40:50 +00:00
fschneider@chromium.org
8480569467 Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub.
Changes the way we do lazy deoptimization:

1. For side-effect instructions, we insert the lazy-deopt call at
the following LLazyBailout instruction.

     CALL
     GAP
     LAZY-BAILOUT ==> lazy-deopt-call

2. For other instructions (StackCheck) we insert it right after the
instruction since the deopt targets an earlier deoptimization environment.

   STACK-CHECK
   GAP ==> lazy-deopt-call

The pc of the lazy-deopt call that will be patched in is recorded in the
deoptimization input data. Each Lithium instruction can have 0..n safepoints.
All safepoints get the deoptimization index of the associated LAZY-BAILOUT
instruction. On lazy deoptimization we use the return-pc to find the safepoint.
The safepoint tells us the deoptimization index, which in turn finds us the
PC where to insert the lazy-deopt-call.

Additional changes:
 * RegExpLiteral marked it as having side-effects so that it 
   gets an explicitlazy-bailout instruction (instead of
   treating it specially like stack-checks)
 * Enable target recording CallFunctionStub to achieve
   more inlining on optimized code.

BUG=v8:1789
TEST=jslint and uglify run without crashing, mjsunit/compiler/regress-lazy-deopt.js
Review URL: http://codereview.chromium.org/8492004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-16 08:44:30 +00:00
svenpanne@chromium.org
ee2cd4289b Re-added missing return in HInferRepresentation::TryChange.
It mysteriously disappeared about 800 revisions ago... :-} Thanks to Jakob for spotting this!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-16 07:46:19 +00:00
dslomov@chromium.org
e3ec8b20fc Presubmit failures fixed
TBR=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 23:26:22 +00:00
dslomov@chromium.org
963ccfdaea Extension state made per-siolate in genesis
BUG=http://code.google.com/p/v8/issues/detail?id=1821

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 22:48:55 +00:00
erik.corry@gmail.com
2792e9ed79 Elide superfluous write barriers.
Review URL: http://codereview.chromium.org/8468005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 14:01:02 +00:00
keuchel@chromium.org
08c9629f80 Static resolution of outer variables in eval code.
So far free variables references in eval code are not statically
resolved. For example in
    function foo() { var x = 1; eval("y = x"); }
the variable x will get mode DYNAMIC and y will get mode DYNAMIC_GLOBAL,
i.e. free variable references trigger dynamic lookups with a fast case
handling for global variables.

The CL introduces static resolution of free variables references in eval
code. If possible variable references are resolved to bindings belonging to
outer scopes of the eval call site.

This is achieved by deserializing the outer scope chain using
Scope::DeserializeScopeChain prior to parsing the eval code similar to lazy
parsing of functions. The existing code for variable resolution is used,
however resolution starts at the first outer unresolved scope instead of
always starting at the root of the scope tree.

This is a prerequisite for statically checking validity of assignments in
the extended code as specified by the current ES.next draft which will be
introduced by a subsequent CL. More specifically section 11.13 of revision 4
of the ES.next draft reads:
* It is a Syntax Error if the AssignmentExpression is contained in extended
  code and the LeftHandSideExpression is an Identifier that does not
  statically resolve to a declarative environment record binding or if the
  resolved binding is an immutable binding.

TEST=existing tests in mjsunit

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 13:48:40 +00:00
vegorov@chromium.org
4c41d327da We might decide to start incremental marking immediately after finishing one cycle.
In this case uncommiting marking deque is impossible.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 13:01:52 +00:00
mstarzinger@chromium.org
f8706ec995 Fix test failures introduced by last revision.
R=erik.corry@gmail.com
TEST=mjsunit/array-elements-from-array-prototype-chain

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 12:34:55 +00:00
erik.corry@gmail.com
abd895a7cb Avoid write barrier when writing an external pointer to an internal field.
Review URL: http://codereview.chromium.org/8572003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 12:18:24 +00:00
mikhail.naganov@gmail.com
6bb5e10fb1 Fix missing HandleScope to prevent local handles to DOMWindow leaking.
R=erik.corry@gmail.com
BUG=102895
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 10:10:35 +00:00
mstarzinger@chromium.org
330cd2205c Remove hidden prototype for builtin functions.
This is a deliberate non-conformity introduced more than 2 years ago to
be compatible with JSC. The current state is that all other browsers
perform ES5 conform in that regard.

R=erik.corry@gmail.com
BUG=chromium:1717,chromium:39662
TEST=test262/15.2.3.6-4-6??,mjsunit/undeletable-functions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 09:44:57 +00:00
jkummerow@chromium.org
daecf27aca Prepare push to trunk. Now working on version 3.7.8.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-14 13:31:57 +00:00
mikhail.naganov@gmail.com
d771d09d23 Fix static const weirdness in both gcc and msvs compatible way.
Afterpatch for r9985.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-14 11:36:04 +00:00
mikhail.naganov@gmail.com
007ad200f8 Fix missing fast property accessors in heap snapshots.
Implementation for this case

var x = {};
x.__defineGetter__("y", function Y() { return 42; });

BUG=v8:1818
TEST=cctest/test-heap-profiler/FastCaseGetter

Review URL: http://codereview.chromium.org/8491041
Patch from Ilya Tikhonovsky <loislo@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-14 11:13:29 +00:00
keuchel@chromium.org
b153dcfebf Make eval compilation cache calling scope sensitive.
Review URL: http://codereview.chromium.org/8518001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-14 08:58:47 +00:00
yangguo@chromium.org
7c209a555f Fixing build errors.
Review URL: http://codereview.chromium.org/8540007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 17:48:40 +00:00
yangguo@chromium.org
0e47d6e417 Catch OOM when sparse array join results in too large array.
Review URL: http://codereview.chromium.org/8540006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 17:21:16 +00:00
danno@chromium.org
8bdb3ffbca ARM: Implement runtime function for array literal transitions.
Also simplify ia32 and x64 handing of the trace_elements_transition flag.

R=jkummerow@chromium.org
BUG=none
TEST=array-literal-transitions.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 14:49:16 +00:00
kmillikin@chromium.org
e49d533b50 Reapply "Add a level of indirection to exception handler addresses."
Original commit message:

Add a level of indirection to exception handler addresses.

To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 13:48:14 +00:00
kmillikin@chromium.org
66ff8828a0 Revert "Add a level of indirection to exception handler addresses."
This reverts r9975.  This change broke (at least) snapshots on x64.

TBR=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 13:13:35 +00:00
kmillikin@chromium.org
1635117db9 Add a level of indirection to exception handler addresses.
To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

R=vegorov@chromium.org,fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 12:51:42 +00:00
mstarzinger@chromium.org
5834284848 Refactor embedded pointer visitors for the serializer
This patch continues the refactoring that started in r9597 and
extends it with support for the serializer.
This is required for MIPS support in the serializer.

Review URL: http://codereview.chromium.org/8467010
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 12:28:42 +00:00
mstarzinger@chromium.org
95eda367f1 Fix mistake in comment for last revision.
TBR=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 11:50:05 +00:00
danno@chromium.org
137dd66648 Prepare push to trunk. Now working on version 3.7.7.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 11:44:16 +00:00
erik.corry@gmail.com
f3eeeeaedc 8-byte align zone allocations of objects that may require it.
Review URL: http://codereview.chromium.org/8539008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 11:23:39 +00:00
mstarzinger@chromium.org
9dcf002f31 Fix filtering of store buffer for large object pages.
Our Heap::FreeQueuedChunks generates fake inner chunks in large object
pages queued for freeing, so that StoreBuffer::Filter can recognize them
as pages to be freed. This also relies on MemoryChunk::Contains to work
properly, which is why the size field needs to be initialized as well.

R=vegorov@chromium.org
BUG=v8:1817
TEST=mozilla/js1_5/Regress/regress-360969-05

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 09:45:12 +00:00
erik.corry@gmail.com
58870fa9e5 ARM: Check that address given to __ RecordWrite is correct.
Review URL: http://codereview.chromium.org/8511052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 08:23:06 +00:00
rossberg@chromium.org
830763bda4 Fixing test cases for correct assertSame.
Leaving out derived construct trap for now, which I'm working on separately.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 15:48:07 +00:00
fschneider@chromium.org
cff105b17d Make LiveRange objects 1 word smaller by using a bool instead of enum for register kind.
Review URL: http://codereview.chromium.org/8462016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 15:37:24 +00:00
yangguo@chromium.org
1dcbdfd2e1 Fixing build error on Win64.
Review URL: http://codereview.chromium.org/8508058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 15:16:57 +00:00
yangguo@chromium.org
85d4c862f2 Fixing presubmit failure in r9955.
Review URL: http://codereview.chromium.org/8517007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:32:29 +00:00
yangguo@chromium.org
07ee3e6e5c Fixing generated hash function on all platforms.
BUG=v8:1808
TEST=cctest/test-hashing.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:26:57 +00:00
yangguo@chromium.org
6bd8d27a65 MIPS: Fixed a bug in StringHelper::GenerateTwoCharacterSymbolTableProbe.
r9871 (5baeaf57) changed the fill value for deleted entries in hash tables from null_value to the_hole_value.
This commit changes an assertion in MIPS code that expects this value.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8479028
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:13:32 +00:00
rossberg@chromium.org
8caa6eb732 Fix instanceof a function proxy.
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 13:39:22 +00:00
vegorov@chromium.org
b8dc77ab9a Fix Heap::Shrink to ensure that it does not free pages that are still in use.
Heap::Shrink is called from EnsureFromSpaceIsCommitted at the very start of the GC. At this moment live bytes counts on pages are in inconsistent states. Some pages might have been already swept but have not been yet reached by an incremental marker (or incremental marker is not in progress) and have live bytes count set to 0. Thus we can't rely only on LiveBytes to determine which pages can be released to the OS.

R=mstarzinger@chromium.org
BUG=100414

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 13:24:00 +00:00
fschneider@chromium.org
33682c6b34 Implement inline runtime function %_SetValueOf for Crankshaft.
It is frequently used inside our builtins and is implemented purely
by HIR instructions: a smi check, an instance-type check and an
in-object property store for storing to the value field.
Review URL: http://codereview.chromium.org/8507016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 12:32:39 +00:00
danno@chromium.org
922700a696 Prepare push to trunk. Now working on version 3.7.6.
R=erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 11:26:27 +00:00
yangguo@chromium.org
2e5cb9b49f MIPS: Simplify StringCharCodeAt in non-crankshaft codegen.
Port r9936 (61034d).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8506024
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 08:07:39 +00:00
yangguo@chromium.org
462f6b16dc MIPS: Repeat last debugger command in the arm simulator when command input is empty.
Port r9937 (c263a9e).

BUG=
TEST=

Review URL: http://codereview.chromium.org/8509015
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 08:01:23 +00:00
vitalyr@chromium.org
0ec3ba8fe4 Tighten handling of pthread_create errors on Linux.
The return value of pthread_create is now checked to be 0.
Tests on MIPS boards had some silent and hard to find timeouts and errors related to this.
This ensures a proper error message and shutdown if a thread could not be started.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8497041
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 19:02:41 +00:00
vitalyr@chromium.org
8a074ba183 MIPS: Enable the ll_prof profiler on MIPS.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8509006
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 18:36:31 +00:00
kmillikin@chromium.org
cefa4cc148 Get rid of CodeStub::TryGetCode.
This function is no longer needed.  It was only used (overly defensively)
when fetching the stack check stub for on-stack replacement patching.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 15:44:13 +00:00
vegorov@chromium.org
3bb1da0ff0 Fix Win64 compilation problems introduced by r9932.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 15:40:08 +00:00
yangguo@chromium.org
8dcfcdd7da Fixing presubmit.
Review URL: http://codereview.chromium.org/8510012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 15:06:10 +00:00
yangguo@chromium.org
8a782f26aa Removing outdated assertions.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:47:12 +00:00
yangguo@chromium.org
97798860a0 Repeat last debugger command in the arm simulator when command input is empty.
Review URL: http://codereview.chromium.org/8506015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:37:04 +00:00
yangguo@chromium.org
6157562994 Simplify StringCharCodeAt in non-crankshaft codegen.
TEST=test/mjsunit/string-slices.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:32:51 +00:00
yurys@chromium.org
8b7bcc4e80 Add getters for column number and script id to v8::Function
Review URL: http://codereview.chromium.org/8508008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:18:30 +00:00
vegorov@chromium.org
aff88ef399 Fix presubmit error introduced by r9932.
R=erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:04:56 +00:00
kmillikin@chromium.org
7664133e87 A small collection of cleanup in the parser and AST.
* Remove a couple of unused fields from the FunctionLiteral, ensure that all
  the bools are packed.
* Rename SaveScope and LexicalScope in the parser.
* Use an enum to generate the numbers 0..N and the dependent count, rather
  than static const ints.  This is simpler to extend (coming in a future
  change).

R=danno@chromium.org,keuchel@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 13:54:26 +00:00
vegorov@chromium.org
9f50147031 Ensure that promotion queue does not overlap with objects relocated to ToSpace.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 13:48:43 +00:00
svenpanne@chromium.org
b16e02e823 Made PropertyType handling even more explicit.
Replaced FIRST_PHANTOM_PROPERTY_TYPE by a predicate. Removed the (hopefully)
last default cases for switches on PropertyType. Benchmarks show that both
changes are performace-neutral.

Now every value of PropertyType should either be handled by an explicit case in
a switch or by an equality operator. Therefore, the C++ compiler should finally
be able to tell us which places to touch when changing PropertyType.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:47:15 +00:00
yangguo@chromium.org
bf98b6f2ed MIPS: Make _CallFunction proxy-aware.
Port r9916 (d2195670)

Original commit message:
Change calling convention for CallFunction stub. Some fixes regarding strict mode call traps.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8509004
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:19:26 +00:00
mikhail.naganov@gmail.com
49df2a6ddc A page created a number of ConsStrings that refer to one big string.
Each such string requires small amount of heap memory.
Heap snapshot generator copies all the strings into internal hash map for future use.
The each copy requires much more memory than original v8 string.

I made a workaround for this. The snapshot will copy only first 1024 symbols.
A simple drive-by fix was made for a performance problem in ToCString implementation.

BUG=v8:1816
TEST=none

Review URL: http://codereview.chromium.org/8509003
Patch from Ilya Tikhonovsky <loislo@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:15:35 +00:00
erik.corry@gmail.com
034eb17387 sync the OpenBSD code with Linux. Committing http://codereview.chromium.org/8499016/ for Robert Nagy
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:01:45 +00:00
yangguo@chromium.org
09e97c41f2 MIPS: Enable the V8 profiler on MIPS.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8507008
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 11:57:05 +00:00
kmillikin@chromium.org
de0db0f598 Remove ast-inl.h. This file is not necessary.
R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 11:32:54 +00:00
kmillikin@chromium.org
6cb5ae7ad9 MIPS: Tighten the code for MacroAssembler::ThrowUncatchable.
Port r9909 (56c8728aa).

Original commit message:
Test at the bottom in the unwind loop.  Eliminate the possibility of a
useless move to the eax/rax/r0 register (currently impossible because
this function has two call sites).  Do not explicitly zero the context
because we've already saved 0 as the context in the handler.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8507007
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 11:04:41 +00:00
mstarzinger@chromium.org
5e0ff8b2e0 Fix size of store buffer to depend on pointer size.
This makes the store buffer size depend on the pointer size so that
store buffers can hold the same number of entries on all architectures.
The number of pages marked scan-on-scavenge should decrease on x64 and
performance of splay should drastically improve on x64.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 09:51:54 +00:00
yangguo@chromium.org
53c6077cee Fixing issue 103259.
BUG=103259
TEST=regress-103259.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 14:59:40 +00:00
rossberg@chromium.org
f936aac43e Make _CallFunction proxy-aware.
Change calling convention for CallFunction stub.
Some fixes regarding strict mode call traps.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 14:39:37 +00:00
keuchel@chromium.org
72dba271eb Reapply r9870 "Remove some initialization checks based on source positions.".
This reverts r9896 "Revert r9870 due to browser-test failures." See below for
the diff from the previous version for the ia32 platform. The code for other
platforms has been changed accordingly.

TEST=mjsunit/compiler/lazy-const-lookup.js

diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index 2cbf518..1990f2f 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -1258,13 +1258,17 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
         // binding is initialized:
         //   function() { f(); let x = 1; function f() { x = 2; } }
         //
-        // Check that we always have valid source position.
-        ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
-        ASSERT(proxy->position() != RelocInfo::kNoPosition);
-        bool skip_init_check =
-            var->mode() != CONST &&
-            var->scope()->DeclarationScope() == scope()->DeclarationScope() &&
-            var->initializer_position() < proxy->position();
+        bool skip_init_check;
+        if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
+          skip_init_check = false;
+        } else {
+          // Check that we always have valid source position.
+          ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
+          ASSERT(proxy->position() != RelocInfo::kNoPosition);
+          skip_init_check = var->mode() != CONST &&
+              var->initializer_position() < proxy->position();
+        }
+
         if (!skip_init_check) {
           // Let and const need a read barrier.
           Label done;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 13:28:53 +00:00
danno@chromium.org
76a9340482 Fix removed return parameter count.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 13:16:56 +00:00
danno@chromium.org
93559bb6c9 Attempt to fix Windows x64 build.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 13:07:14 +00:00
ulan@chromium.org
0d536dec26 Shrink the new space and uncommit marking deque on low memory notification.
BUG=v8:1669
TEST=cctest/test-heap/CollectingAllAvailableGarbageShrinksNewSpace

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 12:42:02 +00:00
mstarzinger@chromium.org
e24c612a5e Fix setting array length to be ES5 conform.
This also refactors the way we set the length of an arrays' backing
store to use the new elements accessor interface. The actual fix is in
DictionaryElementsAccessor::SetLengthWithoutNormalize() where we first
search for non-deletable elements according to ES5 section 15.4.5.2
specifications.

Snippet from the specification: Attempting to set the length property of
an Array object to a value that is numerically less than or equal to the
largest numeric property name of an existing array indexed non-deletable
property of the array will result in the length being set to a numeric
value that is one greater than that largest numeric property name.

R=danno@chromium.org
TEST=test262/15.4.4.??-7-b-16

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:59:56 +00:00
erik.corry@gmail.com
9b968b7db9 Another 64->32 bit warning from the Windows compiler.
Review URL: http://codereview.chromium.org/8503010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:24:44 +00:00
kmillikin@chromium.org
aee8ae0548 Tighten the code for MacroAssembler::ThrowUncatchable.
Test at the bottom in the unwind loop.  Eliminate the possibility of a
useless move to the eax/rax/r0 register (currently impossible because
this function has two call sites).  Do not explicitly zero the context
because we've already saved 0 as the context in the handler.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:09:00 +00:00
erik.corry@gmail.com
59a472a742 Try to fix compile error on Windows.
Review URL: http://codereview.chromium.org/8497010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:57:34 +00:00
svenpanne@chromium.org
fbc0a9cd6f Disentangle header dependecies a bit by moving PropertyDetails-related types into a separate header
This moves PropertyType and its related predicate out of v8globals.h, where it didn't belong.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:43:25 +00:00
erik.corry@gmail.com
cd8d915c72 Clean up the marking speed heuristics. This reduces the
max heap size on 64 bit from ca. 300Mbytes to ca. 200Mbytes
on Ulan's splay variant.  On 32 bit not much change.
Review URL: http://codereview.chromium.org/8494012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:28:58 +00:00
fschneider@chromium.org
2a1f08a1c2 Improve dominator computation to avoid worst-case quadratic time.
In case of a degenerated CFG like in the example below processing
predecessors in the wrong order yields n^2 runtime.

  do {
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    // etc.
  } while (false);

Reversing iteration order avoids this.
Review URL: http://codereview.chromium.org/8502012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:18:25 +00:00
danno@chromium.org
3628c9347c Upstream Android V8 change.
Review URL: http://codereview.chromium.org/8351073
Patch from Jing Zhao <jingzhao@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:14:03 +00:00
danno@chromium.org
3d8b0a606a Create stub and runtime function for x64 full-codegen array literal element initialization.
R=svenpanne@chromium.org
BUG=none
TEST=none

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

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