Commit Graph

7302 Commits

Author SHA1 Message Date
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
fschneider@chromium.org
4627023b38 Revert r9901 to make tree green again.
There was a test failure on x64 mozilla tests.

TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/8495011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 09:56:09 +00:00
fschneider@chromium.org
cac3008437 [hydrogen] optimize switch with string clauses
Hydrogen should optimize not only SMI clauses, but clauses with string literals
too.

Patch from fedor.indutny <fedor.indutny@gmail.com>.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 09:08:33 +00:00
svenpanne@chromium.org
36b715b1bd Refactoring only: Make the handling of PropertyType more explicit.
Do not rely on 'default' clauses or 'if's when analysing a PropertyType, because
this makes it hard to find the relevant places when a new type is added. Note
that the detection of "phantom property types" is left untouched, because this
might have a performance impact, especially for the GC (to be investigated).

This is a preliminary step for introducing a new kind of map transition.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 08:42:13 +00:00
erik.corry@gmail.com
b9a2d181a1 Revert accidental commit that messed up the incremental speed heuristics.
Review URL: http://codereview.chromium.org/8467014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 14:00:02 +00:00
keuchel@chromium.org
c0d0bf863a Revert r9870 due to browser-test failures.
This reverts commit 4d5b5f12aac932ad892c7b6f152b6168708d4210.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 12:33:58 +00:00
ricow@chromium.org
3a41613340 Optimize format message to not use DefineOwnProperty and freeze, do these inline
Review URL: http://codereview.chromium.org/8494005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:50:39 +00:00
erik.corry@gmail.com
52b1457fac Don't set the limit that triggers the next GC higher than the max
old space size.
Review URL: http://codereview.chromium.org/8491009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:35:24 +00:00
yangguo@chromium.org
cfc6f31e59 MIPS: Adding assertions to fast elements conversion.
Port r9875 (97dc1e0e).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:31:54 +00:00
jkummerow@chromium.org
5bbd86bc22 Prepare push to trunk. Now working on version 3.7.5.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:08:24 +00:00
keuchel@chromium.org
aad9e50fb4 MIPS: Remove some initialization checks based on source positions.
Port r9870 (959ec43).

Original commit message:

This depends on
http://codereview.chromium.org/8352039 and
http://codereview.chromium.org/8423005 .

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 09:42:54 +00:00
ricow@chromium.org
086ae44213 Optimize DefineOneShotAccessor in messages.js to not call DefineOwnProperty.
Review URL: http://codereview.chromium.org/8490008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 09:30:28 +00:00
jkummerow@chromium.org
9fa02bc5dd MIPS: Cleanup: use JumpIf[Not]Smi() whenever we can
Port r8322 (7b8b4a951f).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 08:41:47 +00:00
mstarzinger@chromium.org
bca8d42e3b Revert r9596 due to page-cycler regressions.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 13:05:16 +00:00
jkummerow@chromium.org
9625d5d4a0 Fix Array.{splice,slice} to set proper ElementsKind of result
TEST=mjsunit/elements-kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 12:47:58 +00:00
jkummerow@chromium.org
f2787a42b0 Fix JSObject::EnsureCanContainElements to correctly iterate over Arguments
TEST=mjsunit/elements-kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 12:31:44 +00:00
jkummerow@chromium.org
8450c60d47 Fix Runtime_ArrayConcat to handle FAST_DOUBLE_ELEMENTS
TEST=mjsunit/elements-kind.js; stanford-crypto-sha256-iterative in debug mode

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 12:19:35 +00:00
yangguo@chromium.org
2944545888 Adding assertions to fast elements conversion.
Review URL: http://codereview.chromium.org/8437092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 16:24:24 +00:00
keuchel@chromium.org
48fed9a8ab Clean up Scope::CollectUsedVariables.
Review URL: http://codereview.chromium.org/8438071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:50:19 +00:00
mstarzinger@chromium.org
0bbfb46aa6 Fix Harmony sets and maps to allow undefined as keys.
This uses a global sentinel as a replacement for undefined keys, which
are not supported internally but required for Harmony sets and maps.

R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:33:58 +00:00
keuchel@chromium.org
ea18539244 Tune context allocation for variables accessed from inner scopes.
After introduction of with scopes we have enough static information to omit
context allocation in the case that a variable is accessed from a nested block
or catch scope of the same function. Only variables accessed from the inside of
a nested function or with scope are forced to be allocated in the context.

This essentially reverts
http://code.google.com/p/v8/source/detail?r=9281 .
which in turn reverted an earlier change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:33:46 +00:00
mstarzinger@chromium.org
79cadcc947 Fix Harmony sets and maps to allow null as key.
This changes the internal convention for marking deleted entries in hash
tables from null_value to the_hole_value, which is consistent with other
usages of the_hole.

R=rossberg@chromium.org,kmillikin@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:17:05 +00:00
keuchel@chromium.org
fd21937812 Remove some initialization checks based on source positions.
This depends on
http://codereview.chromium.org/8352039 and
http://codereview.chromium.org/8423005 .

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 12:05:48 +00:00
keuchel@chromium.org
58123bff56 Remove some unnecessary binding initialization checks.
This depends on http://codereview.chromium.org/8352039/ .

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 11:59:51 +00:00
keuchel@chromium.org
7385fef2ca Cleanup ScopeInfo and SerializedScopeInfo.
Both classes have been merged into a single ScopeInfo
class that implements the functionality from both.

This CL does not adapt the broken gdb-jit interface.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 10:36:55 +00:00
keuchel@chromium.org
80d1b898fb Fix gcc-4.6 warnings.
BUG=v8:1806

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:59:01 +00:00
kmillikin@chromium.org
224bbad462 MIPS: Add and use ElementsKind side effect
Port r9847 (fc7590).

Original commit message:

Also partition side effects into observable and not observable, with only observable requiring Simulates and non-observable changes able to participate in GVN and code hoisting.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:58:37 +00:00
kmillikin@chromium.org
7dac2367c0 MIPS: Remove the forward-bailout stack from the non-optimizing compiler.
Port r9863 (0996dc77)

Original commit message:
This was pretty heavyweight.  It was kept in just for a few corner cases
that assumed it was there.  We can work around them by making sure that the
expression in a reified test context is always really the expression that
was visited in that context; and by inspecting the context manually and
consing up a pair of extra AST IDs for the unusual case of unary not in a
value AST context.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:57:56 +00:00
yangguo@chromium.org
aaba9d8f9d Implement VirtualMemory on FreeBSD to fix build.
BUG=v8:1807

Review URL: http://codereview.chromium.org/8439068
Patch from Ben Noordhuis <info@bnoordhuis.nl>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:33:06 +00:00
kmillikin@chromium.org
4e4a901d96 Remove the forward-bailout stack from the non-optimizing compiler.
This was pretty heavyweight.  It was kept in just for a few corner cases
that assumed it was there.  We can work around them by making sure that the
expression in a reified test context is always really the expression that
was visited in that context; and by inspecting the context manually and
consing up a pair of extra AST IDs for the unusual case of unary not in a
value AST context.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 16:53:32 +00:00
ulan@chromium.org
307b589e61 Fix error introduced in r9431, which leads to redundant lookup when setting property with handler.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 13:04:59 +00:00
fschneider@chromium.org
f3f16dc17a Make non-templatized versions of LIR printing functions.
This avoid duplicating the code for each template instance.

Also remove dead code from different places in our code base.

Removed some verification code from release builds.
Review URL: http://codereview.chromium.org/8387070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 08:32:40 +00:00
fschneider@chromium.org
acf8fd28bd MIPS: Merge IR classes for different bitwise operations AND, OR and XOR into one class.
Port r9846 (4cd055a).

Original commit message:

Since we already have only one LIR class, it does not make much sense to separate them at the HIR level.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 16:13:05 +00:00
fschneider@chromium.org
aa34b432de Remove one-line helper used in two places.
Review URL: http://codereview.chromium.org/8387067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 12:25:18 +00:00
whesse@chromium.org
7a25c43a07 Remove stack height tracking from ia32 non-optimizing code generator.
Review URL: http://codereview.chromium.org/8340023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 12:20:46 +00:00
fschneider@chromium.org
d418a11fdd Use placement-new for zone-allocation in the Lithium classes.
This avoid calling Isolate::Current on each zone-allocation of
a Lithium object.
Review URL: http://codereview.chromium.org/8429001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 11:49:31 +00:00
fschneider@chromium.org
97c3750fd8 Fix bug introduced by my refactoring of bitwise HIR instructions.
DataEquals was not overridden properly.
Review URL: http://codereview.chromium.org/8387066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 11:35:54 +00:00
lrn@chromium.org
65b9ab93af Merged Scanner and JavaScriptScanner.
JavaScriptScanner had become the only concrete subclass of Scanner, so there
was no longer a need for the distinction.

Also fixed up comments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 07:47:15 +00:00
vegorov@chromium.org
858320725b Split incremental marking write barrier into fast and slow paths.
Force inlining of the fast path.

Force inlining LiteralBuffer::AddChar and Scanner::AddLiteralChar.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 20:59:28 +00:00
keuchel@chromium.org
6b533c315a Fix unwanted implicit conversion from bool to int.
We have the following signatures:
VariableProxy* Scope::NewUnresolved(Handle<String> name,
                                    int position = RelocInfo::kNoPosition);

bool Parser::inside_with() const;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 15:04:27 +00:00
danno@chromium.org
75585d9643 Create stub and runtime function for ia32 full-codegen array literal element initialization.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:42:06 +00:00
jkummerow@chromium.org
669bfc0363 Optimize JS date implementation for smi-only arrays
Review URL: http://codereview.chromium.org/8409010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:39:21 +00:00
danno@chromium.org
0766a138a6 Add and use ElementsKind side effect
Also partition side effects into observable and not observable, with only observable requiring Simulates and non-observable changes able to participate in GVN and code hoisting.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:15:10 +00:00
fschneider@chromium.org
0df9569fe5 Merge IR classes for different bitwise operations AND, OR and XOR into one class.
Since we already have only one LIR class, it does not make much sense to separate
them at the HIR level.
Review URL: http://codereview.chromium.org/8426005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 13:06:26 +00:00
kmillikin@chromium.org
d00b82ff91 MIPS: updated atomic operations.
Specifically:
-fixed a bug in CompareAndSwap that caused randomly occuring timeouts on MIPS boards.
-added gcc inline asm control push/pop instructions to correctly save/restore the reorder setting instead of simply assuming it should be enabled.
-reordered/optimized some instructions to utilize MIPS-specific pipelining features (branch delay slot).
-fixed improper usage of write barriers

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 12:47:02 +00:00
kmillikin@chromium.org
ee3197d309 MIPS: Handlify CompileConstructStub and the remaining CallStubCompiler functions.
Port r9837 (38061af).
Port r9834 (95ac04).

Original commit message (r9834):
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 12:36:11 +00:00
kmillikin@chromium.org
3ba063197d MIPS: Fixed wrong register usage in StringDictionaryLookupStub::GenerateNegativeLookup.
This fixes a lot of test failures triggered by r9834, for example mjsunit/const-redecl.js.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 12:34:13 +00:00
fschneider@chromium.org
a2240fc52b Eliminate some virtual function from AST classes.
1. Remove unused dead functions.

2. Replace the virtual As-* type cast functions with non-virtual version
that uses node_type().

Result is around 13K reduction in binary size.
Review URL: http://codereview.chromium.org/8335006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 11:11:26 +00:00
lrn@chromium.org
30465596e6 Make eval consider anything on the form eval(args...) a potential direct cal
Previously we omitted all cases where the global eval property was shadowed,
even if by a variable holding the same value. ES5 requires us to treat these
as direct calls.

We still throw if calling indirect eval with a detached global object.

BUG=v8:994
TEST=mjsunit/eval.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 09:38:52 +00:00
ulan@chromium.org
fa8a71df9a Handlify CompileConstructStub. Based on 8391045.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 14:08:43 +00:00
vegorov@chromium.org
c933e28935 Make C++ to JS transition faster by avoiding JavaScriptFrameIterator in SaveContext.
R=kmillikin@chromium.org
BUG=v8:1730

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:49:09 +00:00
kmillikin@chromium.org
0df252b38b Handlify the remaining CallStubCompiler functions.
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:37:29 +00:00
danno@chromium.org
6d7d6d4e4e Force transition to FAST_ELEMENTS on out-of-bounds KeyedLoads.
Proactively ensure that that objects don't get FAST_DOUBLE_ELEMENTS to reduce the number of double boxing operations when generated code calls the runtime frequently to satisfy KeyedLoad requests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 10:35:38 +00:00
keuchel@chromium.org
a9a97d010e Remove kInvalidStrictFlag and make gcc-4.5 happy again.
Review URL: http://codereview.chromium.org/8403036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 09:10:29 +00:00
kmillikin@chromium.org
9fd8930a70 Fix presubmit error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:51:08 +00:00
mstarzinger@chromium.org
cd9bc6c3a6 Fix error handling in Date.prototype.toISOString.
This fixes Date.prototyoe.toISOString to throw a RangeError exception
for invalid time values. It also includes a fix to removes the arbitrary
(and completely bogus) range limit on the date value during construction
of a Date object. Note that we still have bogus range limits on the year
and month values.

R=lrn@chromium.org
BUG=v8:1792
TEST=mjsunit/date,test262/15.9.5.43-0-*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:45:04 +00:00
kmillikin@chromium.org
f077a41b12 MIPS: crankshaft implementation
BUG=
TEST=

Review URL: http://codereview.chromium.org/7934002
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:14:46 +00:00
yangguo@chromium.org
b5b3345799 MIPS: Fixing performance regression in issue 1787.
Port r9812 (c1644a9d)

Note: MIPS already had the fix for this regression.
This commit only adds the extra assertions.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:03:13 +00:00
erik.corry@gmail.com
31834e0f9d Prepare push to trunk. Now working on 3.7.4.
Review URL: http://codereview.chromium.org/8417020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 07:38:27 +00:00
fschneider@chromium.org
8b1494b819 Temporarily disable target recording CallFunctionStub until issue 1789 is fixed.
Review URL: http://codereview.chromium.org/8340029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 15:46:25 +00:00
yangguo@chromium.org
8624fb85d2 Tiny improvements on fast element conversion loops in ia32 and x64.
Review URL: http://codereview.chromium.org/8403035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 14:19:22 +00:00
erik.corry@gmail.com
1dd598387e Prepare push to trunk. Now working on 3.7.3
Review URL: http://codereview.chromium.org/8407001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 14:03:32 +00:00
keuchel@chromium.org
6e767e3f2d Use StrictModeFlag in preparser and preparse data.
Review URL: http://codereview.chromium.org/8396040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 13:08:51 +00:00
fschneider@chromium.org
a5b40e27b8 Revert r9805.
It did not fix the original problem, but instead introduced new ones.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 12:12:53 +00:00
yangguo@chromium.org
b56466f4da Fixing dead code in empty array init.
TEST=set JSArray::kPreallocatedArrayElements to larger than 4.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 11:11:59 +00:00
kmillikin@chromium.org
9cc75769bc MIPS: Handlify CompileLoad and CompileStore
Port the following 3 stub-cache commits:
r9788   (67147b7)  Handlify CompileLoadGlobal, CompileLoadElement, CompileLoadPolymorphic.
r9791   (b19c694)  Handlify simple functions of [keyed] store stub compiler.
r9803   (e0c3c89)  Handlify CompileStoreCallback, CompileStoreInterceptor.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8404016
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 09:21:15 +00:00
yangguo@chromium.org
2923136f95 Fixing performance regression in issue 1787.
BUG=v8:1787

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 07:59:12 +00:00
erik.corry@gmail.com
678200bc11 Prepare push to trunk. Now working on 3.7.2
Review URL: http://codereview.chromium.org/8390049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 05:27:38 +00:00
yangguo@chromium.org
fdb13b2e56 MIPS: port Implement for-in loop for proxies.
Port r9760 (a1c4dc80)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8396029
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 15:02:00 +00:00
fschneider@chromium.org
4ded3ccf7c Fix bug in lazy deoptimization after HInvokeFunction.
The full code generator expects the function expression on top
of the stack until after the all. We have to emit the call + the
corresponding simulate before dropping it in the hydrogen code.

BUG=v8:1789
Review URL: http://codereview.chromium.org/8391042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 14:05:18 +00:00
lrn@chromium.org
a9edfefa58 Remove special-casing of calls to RegExp test and exec methods with no argument.
Matches new JSC behavior. Fix issue 75740.

BUG=75740
TEST=mjsunit/regexp-static

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:51:07 +00:00
ulan@chromium.org
405d57fe00 Handlify CompileStoreCallback, CompileStoreInterceptor.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:35:12 +00:00
yangguo@chromium.org
b195db5174 MIPS: port Refactor and clean up array allocation across platforms.
Port r9747 (dc33375)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8395030
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:35:10 +00:00
mstarzinger@chromium.org
d0ce626477 Fix identity hash code function to respect flag.
The flag passed to JSObject::GetIdentityHash() was not respected so far
and an indentity hash code was generated even when the flag requested
not to do so. This could lead to a rare corner cases (for which a test
case was added) where a GC request would have been dropped.

R=rossberg@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:23:40 +00:00
yangguo@chromium.org
70b9d56e06 Fixing issue 1788.
BUG=v8:1788

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 11:34:11 +00:00
ulan@chromium.org
beb0bbe3a9 Handlify simple functions of [keyed] store stub compiler.
Handlified functions: CompileStoreField, CompileStoreGlobal, CompileStoreElement, CompileStorePolymorphic.

Based on 8375053.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:45:24 +00:00
mstarzinger@chromium.org
5a33ffd7e8 Fix Error.prototype.toString to be ES5 conform.
R=lrn@chromium.org
TEST=test262/15.11.4.4-8-1,mjsunit/error-tostring

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:41:52 +00:00
fschneider@chromium.org
2d4bb1803d Fix bug in inlining call-as-function when inlining multiple levels deep.
This change fixes a off-by-one level error when dropping the
function from the environment. The function of the outermost
environment was not dropped.

BUG=v8:1785
TEST=test/mjsunit/compiler/regress-inline-callfunctionstub.js
Review URL: http://codereview.chromium.org/8341019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:31:06 +00:00
ulan@chromium.org
a2fff744e0 Handlify CompileLoadGlobal, CompileLoadElement, CompileLoadPolymorphic.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:58:32 +00:00
rossberg@chromium.org
f7d56eb602 Handle proxies in KeyedStoreIC::Store, instead of just ignoring them.
R=mstarzinger@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:31:40 +00:00
lrn@chromium.org
0a896072d2 MIPS: port Moved random generator state to global context.
Port r9753 (28cd67f8)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:30:04 +00:00
ulan@chromium.org
d46c0d899f MIPS: port Handlify simple functions of [keyed] load stub compiler.
Port r9773 (4cf7a453)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:21:36 +00:00
keuchel@chromium.org
55b7bfa2da MIPS: port Replace boolean indications of strict mode by an enum value.
Port r9746 (804e4e4)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8390030
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:43:33 +00:00
keuchel@chromium.org
5946475d6d MIPS: port Block scoped const variables.
Port r9764 (9b9689d5)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8390033
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:42:15 +00:00
kmillikin@chromium.org
77c4571aca MIPS: port Handlify CallStubCompiler::CompileCallField.
Port r9769 (db287698)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8394028
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:32:37 +00:00
fschneider@chromium.org
d022406db2 Land two MIPS changes.
Issue 8368021: MIPS: port Fix compilation on ARM and x64 broken by r9738
 Issue 8378001: MIPS: port Avoid static initializers in assember-arm.h.
Review URL: http://codereview.chromium.org/8341048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:17:24 +00:00
lrn@chromium.org
93f5bfdb98 Make the irregexp interpreter throw on stack overflow.
BUG=v8:904

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 06:37:57 +00:00
vegorov@chromium.org
f8c2d3847f Take loop side-effects into account when collecting side-effects on the path between two blocks.
R=fschneider@chromium.org
BUG=100409
TEST=test/mjsunit/regress/regress-100409.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 15:39:55 +00:00
mstarzinger@chromium.org
622d35dc0e Implement Harmony sets and maps.
This implementation extends the internal ObjectHashTable to be able to
hold arbitrary objects (e.g. Smis, Strings, ...) as keys by applying
specialized hashing functions to primitive types. Equality of keys is
defined using the internal SameValue function.

R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 14:14:56 +00:00
ricow@chromium.org
0442e08095 Print out line number and extension name when compilation of an extension fails. This fixes issue 305.
Review URL: http://codereview.chromium.org/8332029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:43:19 +00:00
erikcorry
6950fab332 Remove superfluous assert.
Review URL: http://codereview.chromium.org/8332028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:34:52 +00:00
erik.corry@gmail.com
f6fef24118 Move some heap verification code in under the --verify-heap flag to speed
up debug mode tests.
Review URL: http://codereview.chromium.org/8381040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:27:46 +00:00
ulan@chromium.org
abeb5a4d93 Handlify simple functions of [keyed] load stub compiler.
Handlified functions: CompileLoadNonexistent, CompileLoadField,
CompileLoadConstant, CompileLoadArrayLength, CompileLoadStringLength,
CompileLoadFunctionPrototype.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 12:26:07 +00:00
erik.corry@gmail.com
b8af27868f Speed up debug mode GC.
Review URL: http://codereview.chromium.org/8380038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 12:13:06 +00:00
erik.corry@gmail.com
2f745a15b5 Get back the performance lost in context creation in 9744.
Review URL: http://codereview.chromium.org/8332026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 11:02:29 +00:00
vegorov@chromium.org
d855e5104c Fix presubmit error introduced by r9767.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:30:52 +00:00
kmillikin@chromium.org
e05c04e5fa Handlify CallStubCompiler::CompileCallField.
This function relies on a number of helpers for checking prototypes and
probing dictionaries.  It is not possible to wrap these helpers to retry
after allocation failure in a safe way---the assembler has no way to undo
what it has already assembled.

These functions have all been duplicated with handle and raw versions.  The
raw versions will eventually be removed completely.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:24:49 +00:00
vegorov@chromium.org
a8a242ad5a CompileArrayPushCall should not use context register as a scratch.
R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:07:09 +00:00
vegorov@chromium.org
93f99ec06b Provide fast-path for CHECK macro.
Makes debug build 20% faster.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:06:07 +00:00
erik.corry@gmail.com
436fb5318c Fix 9763 for real.
Review URL: http://codereview.chromium.org/8382032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:59:03 +00:00
erik.corry@gmail.com
f008c9e62b Fix 9763 after build bot failures.
Review URL: http://codereview.chromium.org/8382031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:42:38 +00:00
keuchel@chromium.org
e8bccc2cb0 Block scoped const variables.
This implements block scoped 'const' declared variables in harmony mode. They
have a temporal dead zone semantics similar to 'let' bindings, i.e. accessing
uninitialized 'const' bindings in throws a ReferenceError.

As for 'let' bindings, the semantics of 'const' bindings in global scope is not
correctly implemented yet. Furthermore assignments to 'const's are silently
ignored. Another CL will introduce treatment of those assignments as early
errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:33:08 +00:00
erik.corry@gmail.com
86337d3de7 Get the speed back in new context creation after it was tanked
in 9744.
Review URL: http://codereview.chromium.org/8380035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:24:06 +00:00
erik.corry@gmail.com
69c44d6460 Add missing comment from last commit.
Review URL: http://codereview.chromium.org/8383003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:23:56 +00:00
rossberg@chromium.org
46dde044de Adapt to latest spec changes for Proxy.create[Function].
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 16:25:30 +00:00
rossberg@chromium.org
70dc2fe968 Implement for-in loop for proxies.
Fix related corner case for Object.keys.
Remove obsolete GET_KEYS builtin.

R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 15:56:18 +00:00
yangguo@chromium.org
f92da58e13 Handle COW-arrays correctly when converting smi->double fast elements.
TEST=mjsunit/elements-transition.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 15:06:20 +00:00
fschneider@chromium.org
53e7502fa0 Fix bug in environment simulation after inlined call-as-function.
This change is based on my previous change enabling inlining calls-as-function
fixing the bugs related to deoptimization.

The function value on top of the environment was dropped too late in the old code.
As a result we could get a wrong value on top after deoptimization.

This change includes r9619. It was reverted because of test failures that are fixed
with this patch.
Review URL: http://codereview.chromium.org/8360001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:53:08 +00:00
ulan@chromium.org
f630ff0c67 Use handle lists in Map::FindTransitionedMap.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:45:19 +00:00
ulan@chromium.org
9ad3058756 Use handle lists instead of raw pointer lists in polymorphic code cache.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:11:14 +00:00
erik.corry@gmail.com
3eb3f8cb65 Fix crash in partial snapshot test when running with no boot snapshot.
Review URL: http://codereview.chromium.org/8381003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:39:29 +00:00
lrn@chromium.org
db95436018 Fix typo in type-name and reorder initialization order.
Remember, when coming back to an old CL, do check that it still works.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:19:55 +00:00
lrn@chromium.org
7ab6e55f78 Moved random generator state to global context.
Change Random to take global context, not isolate.

BUG=v8:864

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:12:21 +00:00
lrn@chromium.org
6898ff2780 Remove one static initializer from disasm.
Review URL: http://codereview.chromium.org/8381002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:07:35 +00:00
yangguo@chromium.org
215c26e3d3 Further improvements upon r9747.
Review URL: http://codereview.chromium.org/8372028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 11:16:38 +00:00
kmillikin@chromium.org
ef31d0480a Handlify the remaining stub compiler functions for call ICs.
Handlify StubCompiler functions for CallIC and KeyedCallIC cases
Megamorphic, Arguments, DebugBreak, and DebugPrepareStepIn.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 10:55:00 +00:00
kmillikin@chromium.org
ec007b46d1 Handlify call cases for pre-monomorphic, normal, and miss.
These cases turn out to be easy.  There is a lingering raw pointer
implementation of TryCompileCallMiss because it's need by some of the
unconverted call stubs.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 09:33:11 +00:00
mstarzinger@chromium.org
f193d87ec4 Fix initialization of allocation timeout value.
The allocation timeout value should not be initialized to 0, that
triggers a collection at the first allocation which breaks assumptions
for some test cases.

R=ricow@chromium.org
TEST=cctest/test-heap/Iteration

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 08:59:34 +00:00
yangguo@chromium.org
5f7f79b012 Refactor and clean up array allocation across platforms.
Review URL: http://codereview.chromium.org/8359034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 07:55:50 +00:00
keuchel@chromium.org
c6464d500b Replace boolean indications of strict mode by an enum value.
Review URL: http://codereview.chromium.org/8344082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 07:47:22 +00:00
yangguo@chromium.org
75c7565d4b MIPS: Porting r9605 to arm (elements kind conversion in generated code).
Port r9690 (857eacf)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8366031
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 18:40:36 +00:00
erik.corry@gmail.com
9065e95d45 Fix missing write barrier in deserialization. Issue 1783.
Review URL: http://codereview.chromium.org/8352045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 15:20:53 +00:00
danno@chromium.org
f464ad61fb MIPS: port Support array literals with FAST_DOUBLE_ELEMENTS ElementsKind.
Port r9698 (cf0cc54f)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8363025
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 15:15:47 +00:00
mikhail.naganov@gmail.com
fa0d4ecf43 The detailed heap snapshot generator was slightly adjusted for tracking sliced strings.
BUG=v8:1779
TEST=cctest/test-heap-profiler/HeapSnapshotSlicedString

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 13:05:37 +00:00
ulan@chromium.org
ae6e6a689c Handlify KeyedIC::ComputeStub.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 11:42:54 +00:00
vegorov@chromium.org
9b0626b52a MIPS: port RegExpMacroAssembler::CheckStackGuardState should update input string pointer...
... when it is moved or changed by GC.

Port r9697 (d53382a)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8362024
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:59:25 +00:00
vegorov@chromium.org
b9f6ae21b8 Fix compilation on ARM and x64 broken by r9738
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:53:02 +00:00
vegorov@chromium.org
6c7a5d12c8 Avoid write-barriers when initializing newly created Code object.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:37:56 +00:00
vegorov@chromium.org
5bb6d386b4 Disable incremental marking when GC extension is exposed.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:33:50 +00:00
vegorov@chromium.org
3474190711 Fix CountLeadingZeros on non-ARMv5 hardware.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:33:12 +00:00
vegorov@chromium.org
af876ee474 Avoid incremental marking write-barrier when constructing descriptor arrays.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:32:38 +00:00
keuchel@chromium.org
666c4be29f Reapply r9673 "Scope tree serialization and ScopeIterator cleanup."
This also includes the two fixes from r9674 and r9675. Here's the diff
to the previous CL.

 --- a/src/runtime.cc
 +++ b/src/runtime.cc
 @@ -11133,17 +11133,26 @@ class ScopeIterator {
        context_(Context::cast(frame->context())),
        nested_scope_chain_(4) {

 +    // Catch the case when the debugger stops in an internal function.
 +    Handle<SharedFunctionInfo> shared_info(function_->shared());
 +    if (shared_info->script() == isolate->heap()->undefined_value()) {
 +      if (shared_info->scope_info()->HasContext()) Next();
 +      return;
 +    }
 +
      // Check whether we are in global code or function code. If there is a stack
      // slot for .result then this function has been created for evaluating
      // global code and it is not a real function.
      // Checking for the existence of .result seems fragile, but the scope info
      // saved with the code object does not otherwise have that information.
 -    int index = function_->shared()->scope_info()->
 +    int index = shared_info->scope_info()->
          StackSlotIndex(isolate_->heap()->result_symbol());

      // Reparse the code and analyze the scopes.
      ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
 -    Handle<SharedFunctionInfo> shared_info(function_->shared());
      Handle<Script> script(Script::cast(shared_info->script()));
      Scope* scope;
      if (index >= 0) {

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:26:59 +00:00
kmillikin@chromium.org
937006f761 Handlify StubCompiler::CompileCallInitialize.
CallIC::GenerateInitialize and KeyedCallIC::GenerateInitialize are
verified safe for GC.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:19:16 +00:00
fschneider@chromium.org
171846dbd1 Avoid static initializers in assember-arm.h.
Patch by joth@chromium.org.

BUG=v8:1784
Review URL: http://codereview.chromium.org/8367001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 09:55:25 +00:00
kmillikin@chromium.org
6c305c244e MIPS: port Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
Port r9729 (4aa1f5a6)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8365026
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 08:59:32 +00:00
kmillikin@chromium.org
1959409f6d Fix presubmit failure.
TBR=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:28:14 +00:00
kmillikin@chromium.org
e3792a6830 Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
R=ulan@chromium.org,vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:08:53 +00:00
ulan@chromium.org
a5da9320d2 Reset failure flag before retrying stub compilation.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 16:39:26 +00:00
ulan@chromium.org
997ad6387a Handlify upper layers of KeyedStoreIC.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 13:54:16 +00:00
erik.corry@gmail.com
d66ea04b6c Fix the build on Mac.
Review URL: http://codereview.chromium.org/8354037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 13:47:14 +00:00
svenpanne@chromium.org
627a3ecbd9 Improved printing of Simulate, LoadNamedFieldPolymorphic, LoadNamedGeneric, and StoreNamedField Hydrogen instructions a bit.
Review URL: http://codereview.chromium.org/8352044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:55:31 +00:00
yangguo@chromium.org
bd5e694a9c Refactor elements kind conversion.
Review URL: http://codereview.chromium.org/8355035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:36:45 +00:00
lrn@chromium.org
a47caee095 Make builtin functions be skipped in stack traces.
Does include exposed builtin functions ("native functions").

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:31:33 +00:00
erik.corry@gmail.com
8f9721bbbf Shave 39% from snapshot size.
Review URL: http://codereview.chromium.org/8344079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:27:10 +00:00
vegorov@chromium.org
5d72dde98a Switch UnreachableObjectsFilter to use Marking instead of InstrusiveMarking.
GcSafeFindCodeForInnerPointer does not work with intrusive marking now and it is used when roots are iterated.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 11:40:16 +00:00
whesse@chromium.org
388813581e Speed up comparison with a constant.
Improve optimized code for comparison of an int32 against a constant, or comparison of two double constants.  Contributed by m.m.capewell.

Original codereview is http://codereview.chromium.org/7489045/.
This cl is just created in order to commit the change.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 10:26:45 +00:00
danno@chromium.org
c868f0c4a4 Fix x64 and ARM builds.
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 10:07:54 +00:00
danno@chromium.org
5a5c3e4eae Make sure PrintElementsKind is compiled in release mode.
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:56:18 +00:00
danno@chromium.org
f7563019c7 Add flag to trace element kind transitions
Currently only traces transitions from generated ia32 code.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:38:24 +00:00
ulan@chromium.org
f985b15aae Handlify upper layers of KeyedLoadIC.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:35:47 +00:00
jkummerow@chromium.org
655b2332d7 ElementsKind transitioning support for keyed loads in Crankshaft
Review URL: http://codereview.chromium.org/8352012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 08:49:01 +00:00
jkummerow@chromium.org
deff312f25 Handle keyed stores after elements transition monomorphically if possible
Review URL: http://codereview.chromium.org/8354003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 08:41:38 +00:00
svenpanne@chromium.org
3edfb4bbbc Make IsGenericDescriptor spec-conformant.
When the descriptor argument is undefined, the spec is very explicit about the
fact that we should return false (not true, like we did previously). I couldn't
come up with a test case for this, but the old code leaves a bad feeling about
corner cases, so better play safe.
Review URL: http://codereview.chromium.org/8356004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 07:55:30 +00:00
mstarzinger@chromium.org
67c9a03922 Fix handling Function.apply for non-array arguments.
R=rossberg@chromium.org
TEST=mjsunit/apply,test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 13:56:18 +00:00
mstarzinger@chromium.org
6742176949 Fix Array.filter to use internal array for result.
In built-in code we use arrays for internal computations. This makes it
possible to affect the built-in code by putting getters or setters on
the array prototype chain. Using internal arrays prevents those issues.

Related to: http://code.google.com/p/v8/source/detail?r=7040

R=svenpanne@chromium.org
TEST=test262/15.4.4.20-9-b-6

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 13:44:29 +00:00
svenpanne@chromium.org
aaf3454248 [[DefineOwnProperty]] should always return true/false (or throw an exception), never undefined.
Note that this is not an observable behavior, but following the principle of
least surprise, we should follow the spec. Additional (extremely tiny) bonus:
Some ICs see fewer values => better code.
Review URL: http://codereview.chromium.org/8352004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 13:29:37 +00:00
yangguo@chromium.org
372c16161c Optimize fast element conversion in arm using batch store/loads.
Review URL: http://codereview.chromium.org/8353002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:15:15 +00:00
keuchel@chromium.org
17cc6d313f Revert 9673, 9674 and 9675 because of failing webkit tests.
This reverts commits
r9673: "Scope tree serialization and ScopeIterator cleanup."
r9674: "Use OS::SNPrintF instead of snprintf."
r9675: "Use int instead of size_t, StrLength instead of strlen."

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:15:02 +00:00
jkummerow@chromium.org
3a9d6c04ba Introduce HTransitionElementsKind instruction.
TEST=mjsunit/elements-kind

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:10:18 +00:00
kmillikin@chromium.org
838fc27766 Handlify the runtime lookup of CallIC and KeyedCallIC.
R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:04:16 +00:00
mstarzinger@chromium.org
acc0263755 MIPS: port Fix evaluation order of GT and LTE operators.
Port r9641 (2876c37)

Note that this port does not include crankshaft portions of this
commit. They have been included in today's update to
http://codereview.chromium.org/7934002/

Also, this fixes a changed function prototype for:
void Deoptimizer::RevertStackCheckCodeAt()

BUG=
TEST=

Review URL: http://codereview.chromium.org/8348028
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:44:38 +00:00
fschneider@chromium.org
2791cd5a2c Allow inlining of named function expressions containing ThisFunction reference.
Named function expression have an implicit local variable that
refers to the current function (ThisFunction). Before we only could inline
anonymous function expressions like:

A.prototype.foo = function() {}

as opposed to

A.prototype.foo = function foo() {}

This change enables inlining function of expressions like this.
Review URL: http://codereview.chromium.org/8346032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:41:22 +00:00
danno@chromium.org
e5f23399b4 Support array literals with FAST_DOUBLE_ELEMENTS ElementsKind.
BUG=none
TEST=test/mjsunit/array-literal.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:36:55 +00:00
vegorov@chromium.org
e27d8fcbdc RegExpMacroAssembler::CheckStackGuardState should update input string pointer when it is moved or changed by GC.
If input string was cons-string it might undergo short-circuiting during GC. This does not change input start if underlying seq-string (first element of cons-string) does not move but this makes input-string pointer on the native regexp's frame invalid.

R=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:01:02 +00:00
yangguo@chromium.org
96dc1fde46 Bugfix for r9690.
BUG=arm debug test of mjsunit/elements-transition segfaults

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 10:44:20 +00:00
ricow@chromium.org
1c21a9dc6a Don't allow large object space to grow over the max oldspace limit (fixes issue 1717)
Review URL: http://codereview.chromium.org/8345040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 10:15:09 +00:00
svenpanne@chromium.org
d0fe04447e Fixed evaluation order issue in defineProperties.
This is not covered by test262 yet, but it really makes sense and matches Firefox's behaviour.

TEST=mjsunit/define-properties.js
Review URL: http://codereview.chromium.org/8349031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:52:08 +00:00
mstarzinger@chromium.org
b3eba9e764 Fix handling of non-object receivers for array builtins.
R=svenpanne@chromium.org
BUG=chromium:100702
TEST=mjsunit/regress/regress-100702

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:24:37 +00:00
ulan@chromium.org
80e3843dc3 Handlify upper layers of StoreIC based on 8337008.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:17:01 +00:00
mstarzinger@chromium.org
8b181d4de6 Fix updating of property attributes for elements.
This fixes updating of property attributes for data elements when
attributes are already present on a dictionary element but get removed
by a subsequent redefinition of that element.

R=rossberg@chromium.org
BUG=v8:1772
TEST=test262/15.2.3.6-4-82-18

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:06:15 +00:00
yangguo@chromium.org
8472de004b Porting r9605 to arm (elements kind conversion in generated code).
Review URL: http://codereview.chromium.org/8329022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:04:35 +00:00
erik.corry@gmail.com
aa91760570 Fix from Paul Lind that helps post-isolates V8 work with older
Android releases.  See http://code.google.com/p/v8/issues/detail?id=1780
Review URL: http://codereview.chromium.org/8347032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 07:49:47 +00:00
svenpanne@chromium.org
140ae348d2 Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.
This time, we initially leave the HTypeof instruction in the Hydrogen graph,
even for the special cases. We later try to remove this instruction (and any
HConstant) in the canonicalization pass, if possible. Always removing the
HTypeof during the initial graph construction is wrong if e.g. it is used in an
HSimulate.

The removals can be generalized a bit, but this will happen in a separate CL.

TEST=mjsunit/optimized-typeof.js
Review URL: http://codereview.chromium.org/8334021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 07:35:30 +00:00
fschneider@chromium.org
e8a26d1eb1 Add write barrier helper for code patching and refactor stack check patching.
The new helper avoids expensive FindCodeForInnerPointer invocation when we have
the host code object available. It is used when patching stack checks.

Also some comments on the ARM platform are corrected.
Review URL: http://codereview.chromium.org/8330021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 15:07:42 +00:00
vegorov@chromium.org
75dc771098 Increase ARM/MIPS simulators stack safety margin to 512 bytes
R=erik.corry@gmail.com
BUG=v8:1773

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 14:41:45 +00:00
mstarzinger@chromium.org
c4d25c8f37 Fix updating of property attributes for elements.
This fixes updating of property attributes for getters and setters on
dictionary elements while redefining. This just updates the property
details on the existing element.

R=rossberg@chromium.org
BUG=v8:1772
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 13:49:19 +00:00
sgjesse@chromium.org
a58c963c67 Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is reapplying r9501 with this single change which seemed to be causing most (all) of the failures for r9501.

--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2230,6 +2230,7 @@ Debugger::Debugger(Isolate* isolate)
       compiling_natives_(false),
       is_loading_debugger_(false),
       never_unload_debugger_(false),
+      force_debugger_active_(true),
       message_handler_(NULL),
       debugger_unload_pending_(false),
       host_dispatch_handler_(NULL),

R=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 13:40:33 +00:00
lrn@chromium.org
cefbb1e7f8 Make bound functions have poisoned .caller and .arguments.
Also makes func.caller return null if the caller is a bound function,
matching JSC.
Fix bug preventing poisoned setters from triggering.

TEST=mjsunit/function-bind, mjsunit/strict-mode

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:26:53 +00:00
ulan@chromium.org
feeb0b0211 Handlify upper layers of LoadIC.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:19:18 +00:00
jkummerow@chromium.org
24bc70b2fb Silence GCC-4.5.3 warning about unused result in d8.cc
TEST=GCC 4.5.3 successfully compiles d8.cc even with -Werror enabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:10:13 +00:00
fschneider@chromium.org
456e5e00c3 Fix assert by reordering the initialization of the arguments boilerplate.
If a GC happened during initialization (when allocating the elements array)
of the non_strict_arguments_boilerplate, heap verification would fail with the following assert:

ASSERT_EQ((map()->has_fast_elements() || map()->has_fast_smi_only_elements()),
            (elements()->map() == GetHeap()->fixed_array_map() ||
             elements()->map() == GetHeap()->fixed_cow_array_map()));

This was not harmful since the boilerplate was setup 
correctly immediatly afterwards.


Simplified the setup code by removing a call to GetElementsTransitionMap. It always return the same map as 
the input object in this case and is therefore unnecessary.


Added more assertions to verify well-formed non-strict
arguments backing store.

BUG=v8:1520
TEST=no more flaky tests with failing this assert.
 
Review URL: http://codereview.chromium.org/8336021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:32:57 +00:00
lrn@chromium.org
b15cfedf38 Fix bug in instanceof of bound functions on ARM.
Implement same on Mips.

BUG=v8:1774
TEST=mjsunit/function-bind

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:30:29 +00:00
kmillikin@chromium.org
56c763f023 Make the GC aware of JSReceiver pointers in LookupResults.
The LookupResult utility class is used in handlified code, but it can
contain a raw pointer to the lookup's holder object.  Create a per-thread
stack of live LookupResults and iterate all the live ones on GC.

R=vegorov@chromium.org,erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:18:55 +00:00
keuchel@chromium.org
4e5643a648 Scope tree serialization and ScopeIterator cleanup.
The intention is to store enough scope information for the debugger to
handle stack allocation of block scoped variables introduced by
http://codereview.chromium.org/7860045/ .

This CL is based on
http://codereview.chromium.org/7904008/ .

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 08:46:46 +00:00
keuchel@chromium.org
7d89f0f3c8 Replace calls_eval() by calls_non_strict_eval() where possible.
Review URL: http://codereview.chromium.org/8321002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 15:19:34 +00:00
yangguo@chromium.org
d7f3985e33 Rolling back r9662.
Review URL: http://codereview.chromium.org/8321001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 13:39:56 +00:00
erik.corry@gmail.com
b90ec2f384 Change to disable stupid gcc warning.
Review URL: http://codereview.chromium.org/8318003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 13:27:57 +00:00
yangguo@chromium.org
d2434953e2 Changes around ascii-check for strings wrt external strings.
Review URL: http://codereview.chromium.org/8312015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:49:34 +00:00
erikcorry
dac0b853e1 Improve speed of Utf8Write by always flattening the string first and
detecting the ASCII case.  Also rewrite Utf8Length to work on an
unflattened string.  Bug: http://code.google.com/p/v8/issues/detail?id=1665
Review URL: http://codereview.chromium.org/8304021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:48:31 +00:00
lrn@chromium.org
2bbf3bbee7 Make native syntax an early error in the preparser.
Previously the preparser always accepted natives syntax and let the
real parser throw the syntax error. In ES5, it should be an early error,
so the preparser must catch the error.
The perparser library does not expose parsing for natives syntax, it's
only used internally.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:45:52 +00:00
lrn@chromium.org
5152d2e0da Reimplement Function.prototype.bind.
Make instanceof work correctly.

BUG=v8:893

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:44:16 +00:00
keuchel@chromium.org
6f4e70a1dc Let bound iteration variables in for-loops
TEST=mjsunit/harmony/block-for.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:19:06 +00:00
keuchel@chromium.org
f93c69308f Disallow function declarations in statement positions in harmony mode.
Review URL: http://codereview.chromium.org/8306025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 11:59:08 +00:00
yangguo@chromium.org
bbe896a35c Fixing compile error on win64.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 11:41:34 +00:00
yangguo@chromium.org
92fdeff125 Porting r9605 to x64 (elements kind conversion in generated code).
Review URL: http://codereview.chromium.org/8271007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 10:44:47 +00:00
keuchel@chromium.org
0706a98b2a Introduce with scope and rework variable resolution.
Review URL: http://codereview.chromium.org/7904008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 09:29:37 +00:00
lrn@chromium.org
50ef25e0f3 Remove redundant allow-natives flag from CompilationInfo.
Just use script being native and FLAG_allow_natives_syntax directly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 09:02:26 +00:00
jkummerow@chromium.org
eb8f4c642d Speedup HInstruction::Verify() for pathological cases
BUG=v8:1767
TEST=mjsunit/numops-fuzz doesn't timeout in debug mode

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 07:52:20 +00:00
mstarzinger@chromium.org
ac712f13c3 Fix evaluation order of GT and LTE operators.
According to the ES5 spec all ">" and "<=" expressions should be be
evaluated left-to-right. This obsoletes old hacks for reversing the
order to be ES3 compliant.

R=lrn@chromium.org
BUG=v8:1752

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 07:43:40 +00:00
svenpanne@chromium.org
a8bb36f87b Revert r9612, it hits an assertion under special circumstances.
Problematic code is e.g.:

   function typeofViaVariable() {
     var foo = typeof({})
     return foo === "undefined";
   }
Review URL: http://codereview.chromium.org/8283036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 15:02:19 +00:00
svenpanne@chromium.org
8856b62331 Fixed printing of HTypeofIsAndBranch instruction for non-ASCII type literals.
Review URL: http://codereview.chromium.org/8291004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 13:16:23 +00:00
fschneider@chromium.org
948a323819 Revert r9619.
It causes an assertion with deoptimizing from inlined code.
Review URL: http://codereview.chromium.org/8277034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 12:26:29 +00:00
fschneider@chromium.org
c68fc4126f Revert last revert.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/8286023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 12:03:53 +00:00
fschneider@chromium.org
85ab75df50 Revert r9619.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/8286022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 11:56:07 +00:00
erik.corry@gmail.com
c808a6449e Avoid extra GCs when deserializing during incremental marking.
Review URL: http://codereview.chromium.org/8276030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 10:52:30 +00:00
ricow@chromium.org
2a4245e0c0 Fix available new space memory statistics reporting.
We currently report how much memory is available without changing page, i.e., the actual amount of available memory is not correctly stated for new space when doing --trace-gc.
Review URL: http://codereview.chromium.org/8275026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 09:25:10 +00:00
erik.corry@gmail.com
1959359ab2 Speed up cloning objects by avoiding a write barrier check.
Review URL: http://codereview.chromium.org/8274032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 09:20:19 +00:00
fschneider@chromium.org
34534588fb Fix a number of bugs with inlining calls as function.
1. Record AST id for CallFunctionStub.

2. Correctly extract cached target from CallFunctionStub inline cache.

3. Fix a bug when inling call as a function in effect or value context:
   Handle abnormal exits correcty.

4. Fix a bug when inlining call as a function in test context: drop function
   correctly from true and false block.

5. Avoid inlining mutually recursive functions by checking the stack of function
   states before inlining. This was not a bug, but is just a more general
   check to avoid recursive inlining.
Review URL: http://codereview.chromium.org/8258012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 08:43:27 +00:00
fschneider@chromium.org
212e4ae7d4 Eliminate write barrier for global stores at compile time if value stored is a smi.
Omit smi check inside write barriers if the value is known to be a heap object.

Refine inferred types of some instructions.
Review URL: http://codereview.chromium.org/8256016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 07:45:18 +00:00
danno@chromium.org
b86db3d73e MIPS: fix build breakage due to r9607, faster slow asserts.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8283025
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 07:08:20 +00:00
yangguo@chromium.org
b095a94b85 Adding missing hole check to FixedDoubleArray::Initialize
Review URL: http://codereview.chromium.org/8281001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 16:36:20 +00:00
vegorov@chromium.org
b182baf350 Return empty HeapStatistics for uninitialized isolate.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 16:11:18 +00:00
rossberg@chromium.org
4753976194 Fix handling of this in direct calls to function proxies.
Fix & tweak some proxy-related error messages.

R=kmillikin@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 15:55:57 +00:00
svenpanne@chromium.org
baa29ebafa Recognize special comparisons via pattern matching on the hydrogen graph.
Previously, comparisons against null/undefined and comparisons of the result of
typeof against a constant string were done syntactically. Now we do this via
pattern matching on the hydrogen graph, which opens up more opportunities for
better code generation, e.g. the following comparisons are now recognized to be
special:

   var bar = typeof foo;
   var baz = "undefined";
   if (bar == baz) ...

   var blah = undefined;
   if (hurz == blah) ...

If we did this handling of special cases even later at lithium generation time,
even more cases could be recognized, but this would involve bigger changes and
this CL handles most common cases.
Review URL: http://codereview.chromium.org/8242002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 15:07:28 +00:00
fschneider@chromium.org
ba981deab0 Always limit inlining depth to avoid taking too much time for --stress-opt runs.
We run with --nolimit-inlining when --stress-opt is on.
Review URL: http://codereview.chromium.org/8267007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 13:41:47 +00:00
mstarzinger@chromium.org
a68a57d51b Put store buffer verification behind a flag.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 12:44:52 +00:00
erik.corry@gmail.com
6f6d744115 Faster slow asserts.
Review URL: http://codereview.chromium.org/8267004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 11:54:19 +00:00
erik.corry@gmail.com
1cca5468aa Remove some asserts to speed up debug mode.
Review URL: http://codereview.chromium.org/8256012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 11:50:00 +00:00
yangguo@chromium.org
fae807b3bb Elements kind conversion in generated code (ia32).
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 10:53:31 +00:00
rossberg@chromium.org
87f3ff1ea0 Preparing push to trunk for 3.7.0
Review URL: http://codereview.chromium.org/8262010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 09:40:55 +00:00
danno@chromium.org
16a89e8246 MIPS: port all relevant commits since the new-gc was landed.
This ports the following list of commits to mips. It is provided in this form
so that the mips port of the new-gc can be easily tested on your end.

This must be downloaded or landed after http://codereview.chromium.org/8106002
This is based on r9585. With these two mips commits, all tests are passing.

9319    Fix a harmless assert and a genuine bug in the GC-safety of stub generation ...
9329    ARM: Pregenerate some stubs that we call from other stubs.
9335    Initialize pre-allocated fields of JSObject with undefined.
9344    Put back the asserts in RememberedSetHelper, but correct this time
9370    Reorganize object type enum, such that proxies are no longer in the middle...
9392    Basic support for tracking smi-only arrays on ia32.
9402    Notify collector about lazily deoptimized code objects.
9411    Porting r9392 to arm (smi-only arrays).
9418    Small refactor to KeyedStoreIC::GenerateGeneric to make it slightly faster.
9447    Tighten up assertions checking GC-safety of stub calls.
9449    Record function call targets, use them for inlining.
9459    Make sure we don't flush the pregenerated stubs, since they need to b
9461    Fix the build on ARM
9466    Move the is_pregenerated flag so it does not overlap other flags....
9468    Fix the no-VFP3 build on ARM.
9475    Pass correct anchor_slot for EMBEDDED_OBJECT pointers from
9490    Adjust assertions in UpdateSlot to match UpdatePointer in PointersUpdatingVisitor.
9511    Clean list of external references from internal objects like the hole value.

9514    Simplify compares in KeyedStoreIC::GenerateGeneric.
9531    Porting r9456 to arm (Optimize KeyedStoreGeneric for Smi arrays).
9541    Fix load of potentially eval-shadowed let bindings.
9542    Fast allocation of block contexts.
9553    Activate smi-only optimizations for large array literals.

9575    Move declaration of SerializedScopeInfo from variables.h to objects.h
9577    Track elements_kind transitions in KeyedStoreICs.
9583    Fixing a bug in arm as pointed out in issue 1759.
9584    Refactor and fix polymorphic KeyedStoreIC creation.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8112008
Patch from Paul Lind <pling44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 08:00:10 +00:00
danno@chromium.org
4f7d11f963 MIPS: port Merge experimental/gc branch to the bleeding_edge.
Simplified based on Michael's change Refactor how embedded pointers are visited. (9597)

Ported r9328 (bdc13b7)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8106002
Patch from Paul Lind <pling44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 07:35:38 +00:00
yangguo@chromium.org
34c6ab82ea Fixing bug caused by missing smi-tag.
Review URL: http://codereview.chromium.org/8240007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 16:00:59 +00:00
mstarzinger@chromium.org
1da890af54 Refactor how embedded pointers are visited.
This refactoring (almost) gets rid of the requirement to get the target
object address for an object pointer embedded in code objects. This is
not possible on MIPS as pointers are encoded using two instructions. All
usages of RelocInfo::target_object_address() are (almost) obsoleted by
this change. The serializer still uses it, so MIPS will not yet work
with snapshots turned on.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 15:43:41 +00:00
mstarzinger@chromium.org
d32c330ecf Fix special handling of DefineOwnProperty on arrays.
According to the ES5 spec the implementation of DefineOwnProperty() has
to special case handling of arrays. This is a preliminary implementation
correctly handling definition of array index properties, defining length
properties is not completely covered yet.

R=rossberg@chromium.org
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 14:47:13 +00:00
yangguo@chromium.org
298e0a9862 Tentatively enabling string slices.
Review URL: http://codereview.chromium.org/8229009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 12:30:30 +00:00
rossberg@chromium.org
1abf3ed0a4 Introduce collective --harmony flag.
Shorten --harmony-block-scoping to --harmony-scoping.

R=keuchel@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 12:23:06 +00:00
vegorov@chromium.org
819323f29f Runtime_NotifyDeoptimized should search for function activation in all thread stacks.
R=fschneider@chromium.org
BUG=v8:1763

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 10:35:42 +00:00
mstarzinger@chromium.org
554a12fbbc Fix free list node ending up on evacuation candidate.
This is a temporary fix which avoids compaction when incremental marking
is restarted during an old-space-step. That could turn the page that
holds the chosen free list node into an evacuation candidate. It could
also cause several other inconsistencies if it happens during scavenge.

R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 16:50:58 +00:00
jkummerow@chromium.org
312c534a6c Refactor and fix polymorphic KeyedStoreIC creation
Review URL: http://codereview.chromium.org/8233011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 16:02:45 +00:00
yangguo@chromium.org
cef39a6657 Fixing a bug in arm as pointed out in issue 1759.
BUG=v8:1759

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 15:56:06 +00:00
erik.corry@gmail.com
3ce33aacc6 New flag --stress-compaction
Review URL: http://codereview.chromium.org/8234002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 15:52:15 +00:00
vegorov@chromium.org
4deaad3ccc Adjust assertions in the incremental marking.
Now we are completely transfering marks when shifting arrays in-place.

This might lead to white free space objects in the marking deque.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 11:38:00 +00:00
erik.corry@gmail.com
ba8a7f374e Add --noclever-optimizations to disable some things that have
caused trouble in the past.
Review URL: http://codereview.chromium.org/8229005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 11:35:04 +00:00
jkummerow@chromium.org
184fdcf28b Track elements_kind transitions in KeyedStoreICs.
Review URL: http://codereview.chromium.org/8166017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 09:33:00 +00:00
erik.corry@gmail.com
f900fc9d80 Remove some unused and unneeded flags.
Review URL: http://codereview.chromium.org/8228004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 09:28:06 +00:00
fschneider@chromium.org
876fa09feb Move declaration of SerializedScopeInfo from variables.h to objects.h
This eliminates compile-errors when assigning Handle<SerializedScopeInfo> to
Handle<Object> in a place where the declaration was not available because
variables.h was not included.

As a result I had to also move the enum Variable::Mode to v8globals.h and
rename it to VariableMode.
Review URL: http://codereview.chromium.org/8221004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 08:41:19 +00:00
yangguo@chromium.org
17a68e1cfb Fixing assertion.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 16:18:20 +00:00
yangguo@chromium.org
3249530ef0 Fixing issue 1757 (string slices of external strings).
BUG=v8:1757
TEST=regress-1757.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 16:09:03 +00:00
vegorov@chromium.org
fd46247039 Add hinting to improve ASLR for macos (all allocations) and linux (newly added allocation types).
TEST=N/A
BUG=1749

Review URL: http://codereview.chromium.org/8115014
Patch from Cris Neckar <cdn@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 14:17:42 +00:00
yangguo@chromium.org
6792016261 Disabling string slices.
Review URL: http://codereview.chromium.org/8217006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 12:17:50 +00:00
svenpanne@chromium.org
1420217af6 Prepare push to trunk. We are now working on 3.6.7.
Review URL: http://codereview.chromium.org/8224001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 11:38:09 +00:00
kmillikin@chromium.org
fa18fdb206 Add a regression test for an already fixed issue.
Add a regression test for Chromium issue 99167.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 10:46:27 +00:00
vegorov@chromium.org
48ba97a410 Disable short-circuiting of cons-strings when compaction is pending.
Otherwise fast path of scavenger gets a bit too complicated and heavy.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 10:35:08 +00:00
fschneider@chromium.org
3b470c5662 Fix presubmit error.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/8223001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 10:32:16 +00:00
yangguo@chromium.org
f12376c41e Fixing bogus assertion.
Review URL: http://codereview.chromium.org/8222001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 10:14:39 +00:00
fschneider@chromium.org
313f9505b4 Make accessors for oddball objects return Oddball* instead of Object*.
Fix a use of the hole value and the undefined value before initialization when
initializing V8. Before we just read a NULL value from them.
Review URL: http://codereview.chromium.org/8130002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 09:21:48 +00:00
svenpanne@chromium.org
03c5e99e8a Make GCC 4.5.x happy.
Review URL: http://codereview.chromium.org/8216005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 08:57:13 +00:00
yangguo@chromium.org
740f1e1c95 Enable string slices.
Review URL: http://codereview.chromium.org/8218002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 08:35:01 +00:00
danno@chromium.org
3b07abbdbe Activate smi-only optimizations for large array literals.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 08:31:06 +00:00
erik.corry@gmail.com
338ab857b9 Remove a static initializer that could potentially slow down startup time.
BUG=1753
Review URL: http://codereview.chromium.org/8198005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-07 14:41:08 +00:00
mstarzinger@chromium.org
cd6a982b52 Fix string whitespace trimming of byte order marks.
R=rossberg@chromium.org
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-07 14:33:46 +00:00
mstarzinger@chromium.org
e699434266 Fix some array functions to behave as specified.
This fixes the handling of primitives and the order of how side effects
are visible in some array functions as specified by the ES5.

R=rossberg@chromium.org
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-07 14:07:33 +00:00
erik.corry@gmail.com
bff0e281ee Change cached powers of 10 to avoid constants that need a static
initializer to be called on process startup instead of being in
the read-only section.
Review URL: http://codereview.chromium.org/8177018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-07 08:21:21 +00:00
keuchel@chromium.org
c1cf622fe9 Fast allocation of block contexts.
Review URL: http://codereview.chromium.org/8066002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 15:59:02 +00:00
keuchel@chromium.org
80048c14b1 Fix load of potentially eval-shadowed let bindings.
BUG=
TEST=test/mjsunit/harmony/block-let-semantics.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 15:24:20 +00:00
kmillikin@chromium.org
fa425b54b7 Don't count duplicate assignments to the same property as distinct ones.
In the ThisNamedPropertyAssignmentFinder, duplicate assignments to the same
property were counted as distinct assignments.  As a simple fix, subsequent
ones overwrite the previously recorded assignment.

This will reorder the assignments, but it is safe since they are restricted
to have only constants and parameters on the right-hand side (and there are
no assignments to the parameters).

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 12:38:18 +00:00
lrn@chromium.org
918922b304 Change implementation of JSObject::HasHiddenProperties to work as before 9510.
Review URL: http://codereview.chromium.org/8161014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 10:54:35 +00:00
kmillikin@chromium.org
1f12cc4099 Simplify calling generated code from the runtime.
Instead of expecting Object** arrays at the outermost level, expect
Handle<Object> arrays and reinterpret_cast them only just before invoking
the generated code.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 09:31:38 +00:00
rossberg@chromium.org
1e56e29a38 Fix a prototype chain traversal not expecting proxies.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 08:46:38 +00:00
rossberg@chromium.org
ebf6cb7150 Use correct trap for lookup in prototype proxy.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 08:42:10 +00:00
jkummerow@chromium.org
a40462e3bb Refactor JSObject::SetFastElement.
This fixes a bug where the length of FAST_DOUBLE_ELEMENTS arrays was not
set correctly, and another bug where appending a double element to a
SMI_ONLY array would convert it to FAST_ELEMENTS instead of
FAST_DOUBLE_ELEMENTS.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 13:56:30 +00:00
yangguo@chromium.org
b1e83c54c5 Porting r9456 to arm (Optimize KeyedStoreGeneric for Smi arrays).
Review URL: http://codereview.chromium.org/8065004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:39:34 +00:00
erik.corry@gmail.com
42b9eaa91c Prepare push to trunk. We are now working on 3.6.6.
Review URL: http://codereview.chromium.org/8144001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:24:13 +00:00
lrn@chromium.org
ebc0f85e40 Revert "Added ability to lock strings to prevent their representation or encoding from changing."
This reverts r9424.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:09:34 +00:00
vegorov@chromium.org
a7c373c2d2 Fix Kraken segfaults on ARM.
DoStoreKeyedFastElement was passing incorrect slot address (off by 1) to the RecordWrite.

R=erik.corry@gmail.com
BUG=v8:1742

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 10:50:24 +00:00
vegorov@chromium.org
7e1c2d9d1e Keep MemoryChunk::LiveBytes in sync when marking deque overflows.
R=erik.corry@gmail.com
BUG=v8:1672

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 09:42:20 +00:00
rossberg@chromium.org
2c975d6ae2 Make 'Become' safe for retries.
R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 09:41:54 +00:00
mstarzinger@chromium.org
d8d7d2d33f Remove some obsolete GC-safe accessors.
R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 08:12:36 +00:00
lrn@chromium.org
9f73eed45f Fix issue 1361 - Implement ES5 Array.prototype.toString.
BUG=v8:1361
TEST=mjsunit/array-tostring

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 07:08:23 +00:00
mstarzinger@chromium.org
2fb58638a6 Fix verification of weak maps during initialization.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 15:54:57 +00:00
mstarzinger@chromium.org
c034518442 Fix preparation for sorting of external arrays.
R=rossberg@chromium.org
BUG=98773
TEST=mjsunit/regress/regress-98773

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 13:49:50 +00:00
rossberg@chromium.org
abc8b0d183 Remove two left-over uses of Function.prototype.apply that I overlooked when merging proxy CLs.
R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 12:48:16 +00:00
yangguo@chromium.org
3c812247aa Simplify compares in KeyedStoreIC::GenerateGeneric.
Review URL: http://codereview.chromium.org/8068024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 12:17:08 +00:00
vegorov@chromium.org
777df2d878 Adjust contents of kAheadOfTime to match write-barrier stub called from CompileArrayPushCall.
R=erik.corry@gmail.com
BUG=v8:1729

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 11:38:12 +00:00
erik.corry@gmail.com
6f833a35d5 Don't always compact when collecting.
Review URL: http://codereview.chromium.org/8124022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 09:12:02 +00:00
fschneider@chromium.org
976d5f3797 Clean list of external references from internal objects like the hole value.
Review URL: http://codereview.chromium.org/8114032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 09:07:50 +00:00
lrn@chromium.org
8e31371d0e Move logic for hidden properties into the JSObject.
Previously, the logic using the hidden properties backing object was
spread accross use sites. Now it's all contained in JSObject, with
only simple accessors available.
Also change the backing object to be a StringDictionary rather than a JSObject.
There's still room for improvement by making a hash-table that don't
store property details as well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 07:45:25 +00:00
lrn@chromium.org
4750f0c3cd Fix issue 1415 - allow surrogate pair codes in decodeURIComponent.
Also some cleanup of uri.js.

BUG=v8:1415
TEST=mjsunit/regress/regress-1415

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 07:15:07 +00:00
mikhail.naganov@gmail.com
3e4b4a6a86 Fix incorrect function name inference in case of assignment / global assignment.
R=kmillikin@chromium.org
BUG=v8:1732
TEST=test-func-name-inference/GlobalAssignmentAndCall,AssignmentAndCall

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 19:18:05 +00:00
kmillikin@chromium.org
a4e0103708 Clean up the x86 assembler API.
The API is inconsistent about when a register must be coerced to an operand
and when it can be used as a register.  Simplify usage by never requiring it
to be wrapped.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 11:44:39 +00:00
kmillikin@chromium.org
ceee9d535a Remove #include "isolate-inl.h" from v8.h.
Include it only in the .cc files where it's needed.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 11:13:20 +00:00
lrn@chromium.org
4cb7995152 Fix build error.
Review URL: http://codereview.chromium.org/8117002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 10:40:39 +00:00
lrn@chromium.org
4b385d7e8e Fix bug in x64 RegExp detecting start of string.
Also add missing MIPS case in regexp tracer.

Fixes issues v8:1748 and v8:1746

BUG=v8:1748, v8:1746
TEST=mjsunit/regress/regress-1748.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 10:31:01 +00:00
lrn@chromium.org
165e105ec9 Check enumerability of array indices correctly in propertyIsEnumerable.
Fix issue 1692.

BUG=v8:1692
TEST=mjsunit/regress/regress-1692

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 09:15:58 +00:00
sgjesse@chromium.org
08a85de703 Revert "Support for precise stepping in functions compiled before debugging was started (step 2)"
TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-01 08:47:12 +00:00
sgjesse@chromium.org
b2ebc91f5c Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is to get a clean run in the buildbot.

TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-01 05:39:14 +00:00
sgjesse@chromium.org
083275715a Revert "Support for precise stepping in functions compiled before debugging was started (step 2)"
This reverts commits r9499, r9497 and r9489.

Then changed caused a number of failures.

TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:27:38 +00:00
sgjesse@chromium.org
230ee9de96 Try to fix Win64 build
TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:06:31 +00:00
mstarzinger@chromium.org
b5be9fa83a Fix map modification in transition tree traversal.
While traversing the transition tree we build a work-list using the map
field of maps. Setting those map values with a write barrier causes
black-to-gray changes on maps which are currently not recognized as
such, hence their computed size might be off.

R=vegorov@chromium.org
BUG=v8:1672
TEST=cctest/test-decls/Present

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:03:48 +00:00
sgjesse@chromium.org
f274c94e65 Make sure heap is iteratable before iterating it.
This line was accidentally removed in r9489.

TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 12:12:09 +00:00
vegorov@chromium.org
71519ee4b2 Fix presubmit error in mark-compact.cc
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 11:09:31 +00:00
ager@chromium.org
bcd9e5b19e Remove the use of <limits> from strtod.cc. It is unused.
The only remaining use of <limits> is in globals.h for a range of GCC
versions for which the INFINITY macro is broken.

R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 09:16:01 +00:00
vegorov@chromium.org
807ae24307 Adjust assertions in UpdateSlot to match UpdatePointer in PointersUpdatingVisitor.
R=erik.corry@gmail.com
BUG=v8:1740

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 08:45:28 +00:00
sgjesse@chromium.org
de7b222e36 Support for precise stepping in functions compiled before debugging was started (step 2)
This change will ensure that full code with debug break slots is compiled and activated for all functions which already have activation frames.

This additional handling is only for functions which have activations on the stack, and that activation is of the full code compiled without debug break slots. In that case the full code is recompiled with debug break slots. It is ensured that the full code is compiled generating the exact same instructions - except for the additional debug break slots - as before. The return address on the stack is then patched to continue execution in the new code.

Also fixed SortedListBSearch to actually use the passed comparision function.

R=svenpanne@chromium.org, kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 08:39:56 +00:00
yangguo@chromium.org
67789af11b Fixing MinGW build.
BUG=v8:1695

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 07:46:13 +00:00
mikhail.naganov@gmail.com
0b2f694d99 Make sure that heap is iterable prior to iterating it in Logger:: methods.
R=vegorov@chromium.org
BUG=v8:1700
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 15:07:00 +00:00
yangguo@chromium.org
5ed752de96 Porting r9456 to x64 (Optimize KeyedStoreGeneric for Smi arrays).
Review URL: http://codereview.chromium.org/8054043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 14:08:21 +00:00
vegorov@chromium.org
3e9891c1d0 Enable code flushing for full (non-incremental) collections.
This will ensure that we will flush code when we hit memory limits.

R=erik.corry@gmail.com
BUG=v8:1609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 13:51:47 +00:00
mstarzinger@chromium.org
1b5c073858 Reenable assertion after issue was fixed.
R=lrn@chromium.org
BUG=v8:1672

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 13:36:34 +00:00
erik.corry@gmail.com
44ca9b40ff Temporary change to try to catch missing pregenerated stubs early with
a CHECK instead of an ASSERT.
Review URL: http://codereview.chromium.org/8073025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 12:53:27 +00:00
mstarzinger@chromium.org
279356b4b3 Implement shrinking of paged spaces during sweeping.
For each paged space we release all but one of the unused pages after
marking (when we know the number of live bytes) but before actually
sweeping it. This is not yet done for lazy swept pages.

R=erik.corry@gmail.com
BUG=v8:1614

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 12:27:31 +00:00
vegorov@chromium.org
1a0423b54f Fix leakage of virtual address space on Linux platform.
Ensure that unmap return values are checked in debug mode.

R=erik.corry@gmail.com
BUG=v8:1701

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 12:23:05 +00:00
erik.corry@gmail.com
af20990e0e Don't need to protect pregenerated stubs from flushing from the
cache.  They are in a different cache that is not flushed.  Keep
the marking of pregenerated stubs for assertion purposes.
Review URL: http://codereview.chromium.org/8065028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 11:52:05 +00:00
yangguo@chromium.org
acc105af91 Fix build with debuggersupport=off.
BUG=v8:899

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 08:55:36 +00:00
vegorov@chromium.org
36ae5f3811 Pass correct anchor_slot for EMBEDDED_OBJECT pointers from code objects.
Correctly initialize newly created large-object pages when incremental marking with compaction is in progress.

R=erik.corry@gmail.com
BUG=v8:1737

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 17:45:58 +00:00
ricow@chromium.org
90b1e50923 Fix use of non-gc safe pointer in regexp code.
Review URL: http://codereview.chromium.org/8034002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 16:10:17 +00:00
fschneider@chromium.org
9bc30dfe93 Small simplification of HChange instruction.
Use existing flag to mark HChange instructions that deoptimize on undefined.

Also there is no need to store the source representation explicitly.
Review URL: http://codereview.chromium.org/8066007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 14:01:40 +00:00
yangguo@chromium.org
c6a53e0638 Fixing headers for Windows 2000.
BUG=v8:1724

Review URL: http://codereview.chromium.org/8068002
Patch from Vovan Shutoff <vovan@shutoff.ru>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 13:40:03 +00:00
yangguo@chromium.org
fd575f7177 Fixed deadlock in the debugger agent in Windows.
BUG=v8:1723
TEST=cctest test-debug/DebuggerAgent

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 13:27:20 +00:00
erik.corry@gmail.com
0b26be298d Fix the no-VFP3 build on ARM.
Review URL: http://codereview.chromium.org/8066008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 13:20:09 +00:00
vegorov@chromium.org
2c1b5c0a9a Adjust assertion in Heap::IdleNotification.
R=mstarzinger@chromium.org
BUG=v8:1715

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 12:55:34 +00:00
erik.corry@gmail.com
07ba7ad073 Move the is_pregenerated flag so it does not overlap other flags.
Remove the before-or-after InstanceOf stub rule, which was too
subtle and lacked checking ssertions.
Unify the way the CEntry stub is pregenerated so that it is done
in the same way.
Review URL: http://codereview.chromium.org/8065006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 12:23:40 +00:00
vegorov@chromium.org
fd2bac7e92 Remove HEnvironment::CheckDepth.
R=fschneider@chromium.org
BUG=v8:1727

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 11:58:40 +00:00
fschneider@chromium.org
f85bcba479 Limit depth of inlining for --stress-opt runs to avoid going into infinite recursion.
Review URL: http://codereview.chromium.org/8060033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 11:34:54 +00:00
erik.corry@gmail.com
355a2bf0a8 Temporarily switch on always-compact to flush out crash bugs.
Review URL: http://codereview.chromium.org/8068001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 11:15:23 +00:00
erik.corry@gmail.com
99ed7bdb29 Fix the build on ARM.
Review URL: http://codereview.chromium.org/8065005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 11:00:41 +00:00
vegorov@chromium.org
39512e148d EvacuateNewSpaceAndCandidates should explicitly skip dead large objects.
LargeObjectSpace is swept at the very end of SweepSpaces.

R=mstarzinger@chromium.org
BUG=v8:1736

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 10:45:27 +00:00
erik.corry@gmail.com
bbcafaa2d5 Make sure we don't flush the pregenerated stubs, since they need
to be always present, so that we can call them from other stubs
without trying to generate stubs while we are generating stubs.
Review URL: http://codereview.chromium.org/8052029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 10:32:12 +00:00
danno@chromium.org
1b5a2381ec Optimize KeyedStoreGeneric for Smi arrays.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 16:15:29 +00:00
vegorov@chromium.org
f2ff85ad71 CallFunctionStub was missing a write-barrier for write into the global cell.
R=fschneider@chromium.org
BUG=v8:1733

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 13:45:13 +00:00
mstarzinger@chromium.org
a79d439586 Fix slot buffers of abandoned evacuation candidates.
R=vegorov@chromium.org
BUG=v8:1734
TEST=cctest/test-mark-compact/NoPromotion

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 13:35:04 +00:00
fschneider@chromium.org
27e1a8d414 Improve our simple elimination of hole checks.
Currently we avoid checking for the hole value after array loads, if the
result is only used by instructions that definitely deoptimize in case
of the hole value (HChange instructions).

This change performs the same procedure for loading from deleteable/read-only
global variable where we can also avoid the check in the same cases.
Review URL: http://codereview.chromium.org/8054008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 13:03:19 +00:00
vegorov@chromium.org
2e08515d21 Check the depth of the constructed HEnvironment.
Temporary check to catch 1727 on the reliability bot.

R=fschneider@chromium.org
BUG=v8:1727

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 12:55:43 +00:00
yangguo@chromium.org
8581ac213a Fixed a bug in smi-only implementation in x64.
Review URL: http://codereview.chromium.org/8060009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 12:25:42 +00:00
kmillikin@chromium.org
bcb781d76a Record function call targets, use them for inlining.
Introduce a version of the CallFunctionStub that records monomorphic
call targets in a one-element cache in the instruction stream.  Use
the cache for inlining attempts in the optimizing backend.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 11:42:02 +00:00
danno@chromium.org
ebc3010ca3 Smi element fixes in Builtins.
R=jkummerow@chromium.org
BUG=none
TEST=dromaeo-object-array-array-deconstruction-pop doesn't regress

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 11:16:39 +00:00
vegorov@chromium.org
0df7441668 Tighten up assertions checking GC-safety of stub calls.
Ensure that stubs are properly pregenerated on all platforms.

R=erik.corry@gmail.com
BUG=v8:1729

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 10:53:22 +00:00
vegorov@chromium.org
90cab93be4 In Invoke get JSEntryStub and JSConstructEntryStub directly through roots.
Getting them through stub cache introduces bigger overhead.

These stubs are always present.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 10:42:32 +00:00
mstarzinger@chromium.org
e7da8b3eeb Pass sweeping mode as template parameter.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 07:52:34 +00:00
ricow@chromium.org
7810ff70f6 Make sure that we can't access hidden properties by installing accessors on Object.prototype.
BUG:chromium:97784
TEST=cctest/test-api
Review URL: http://codereview.chromium.org/8041020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 16:54:50 +00:00
mikhail.naganov@gmail.com
083fd2a454 Fix race in CpuProfiler::StopProcessor / CpuProfiler::TickSampleEvent.
R=mstarzinger@chromium.org
BUG=v8:1700
TEST=inspector/profiler/cpu-profiler-profiling-without-inspector.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 16:31:11 +00:00
mikhail.naganov@gmail.com
b5946d78c5 Add ObjectMoveEvent reporting for the Heap Profiler into MarkCompact.
R=vegorov@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 15:59:27 +00:00
ulan@chromium.org
16ae2551ae Search prototypes for accessor setters if interceptor returns empty value.
Extract the part of SetPropertyForResult that searches the prototype chain
for accessor setters into a separate function SetPropertyInPrototypes.
Call this function in SetPropertyPostInterceptor.

This should fix both optimized and unoptimized cases because
the cache stub for storing with interceptor calls the runtime system.

BUG=v8:1636

TEST=cctest/test-api.cc/EmptyInterceptorDoesNotShadowAccessors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:54:57 +00:00
mikhail.naganov@gmail.com
c05354ecc4 Add v8::HeapGraphNode::GetHeapValue method.
This allows getting a heap object by a heap snapshot node for further
inspection. Very useful for objects from bindings that mostly have
getter-provided fields.

R=vegorov@google.com
BUG=webkit/61179
TEST=test-heap-profiler/GetHeapValue,GetHeapValueForDeletedObject

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:38:29 +00:00
lrn@chromium.org
d554977c4c Avoid using C++ STL include <limits>.
Review URL: http://codereview.chromium.org/8041019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 12:44:36 +00:00
kmillikin@chromium.org
c1b978c076 Fix a GC-safety issue in optimized code.
It's not safe to use an immediate heap object in generated unless we take
pains to ensure it's not in new space.  Continue using the caller's context
for inlined functions on all platforms except IA32.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 12:20:11 +00:00
jkummerow@chromium.org
0455aadbeb Add Crankshaft support for smi-only elements
Review URL: http://codereview.chromium.org/8002019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 12:09:04 +00:00
vegorov@chromium.org
6dee868e03 Enable compaction, disable code-compaction.
Enable array-join test again.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:46:16 +00:00
lrn@chromium.org
172c27a6ba Added ability to lock strings to prevent their representation or encoding from changing.
Use string locking to ensure consistent representation of source string during JSON parsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:14:41 +00:00
vegorov@chromium.org
a0f07e5db1 Fix bug in PointersUpdatingVisitor::UpdatePointer.
It was updating the same pointer twice (was using InNewSpace instead of
InFromSpace).

Also make FLAG_never_compact supercede FLAG_always_compact.

R=erik.corry@gmail.com
BUG=v8:1721

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 10:24:42 +00:00
fschneider@chromium.org
ba6cd937ff Add code comments to deferred code objects to make debugging easier.
Review URL: http://codereview.chromium.org/8046003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 09:32:10 +00:00
kmillikin@chromium.org
883f32695b Enable inlining functions with contexts different than their caller.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 09:17:56 +00:00
vegorov@chromium.org
1046b1a464 Disable compaction.
Introduce flag to control code compaction.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 08:53:27 +00:00
lrn@chromium.org
b9d39c48b8 Make the RegExp.prototype object be a RegExp object.
BUG=v8:1217
TEST=mjsunit/regress/regress-1217

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 08:42:01 +00:00
yangguo@chromium.org
e6509e77d2 Small refactor to KeyedStoreIC::GenerateGeneric to make it slightly faster.
Review URL: http://codereview.chromium.org/8008016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 07:36:44 +00:00
danno@chromium.org
d21902b25e Cache multiple ElementsKind map transition per map.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 15:09:00 +00:00
yangguo@chromium.org
65b1ea22fe Porting r9392 to x64 (smi-only arrays).
Review URL: http://codereview.chromium.org/7992003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 14:19:04 +00:00
whesse@chromium.org
2e40bc244a Add dynamic stack frame alignment to optimized functions with untagged doubles on the stack.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 13:28:17 +00:00
fschneider@chromium.org
683decd4ae Make --trace-deopt --code-comments print the Lithium instruction that caused deoptimization.
This saves us from manually searching the disassembled code for the bailout id
when looking for the reason for deoptimization.
Review URL: http://codereview.chromium.org/8008013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 12:13:27 +00:00
svenpanne@chromium.org
901f20b052 Improved printing of a few Hydrogen instructions.
Review URL: http://codereview.chromium.org/8002021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 11:51:05 +00:00
yangguo@chromium.org
37606380ab Porting r9392 to arm (smi-only arrays).
Review URL: http://codereview.chromium.org/7995002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 09:31:20 +00:00
danno@chromium.org
44b4ae1cd8 Add elements kind to maps debugging output
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 09:11:56 +00:00
svenpanne@chromium.org
1311b8f0e2 Improve Hydrogen code for accessing undefined/null/Infinity.
In some special (but probably very common) cases we can do better than loading
from a global cell for these global properties by emitting the corresponding
constant directly. This opens up opportunities for further improvements, coming
in a separate CL...
Review URL: http://codereview.chromium.org/7992002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 08:00:06 +00:00
mstarzinger@chromium.org
ec587f8a11 Implement verification of new space evacuation.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 07:30:57 +00:00
rossberg@chromium.org
3df2602037 Handle function proxies as getters/setters.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 17:12:41 +00:00
ricow@chromium.org
e4c90dc958 GC Cleanup + Set max old generation size to 700MB on ia32 and max executable size to 128 MB (on ia32)
Review URL: http://codereview.chromium.org/7993003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 17:10:40 +00:00
keuchel@chromium.org
ad9290a6ae Disallow strict mode FutureReservedWords as break/continue labels in strict mode
TEST=preparser/strict-identifiers.pyt

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 16:38:28 +00:00
ricow@chromium.org
bb2cf02849 Fix arm compilation, missing isolate pointer
Review URL: http://codereview.chromium.org/7988007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 16:27:05 +00:00
vegorov@chromium.org
bfd048173f Notify collector about lazily deoptimized code objects.
All slots that were recorded on these objects during incremental marking should be ignored as they are no longer valid.

To filter such invalidated slots out during slots buffers iteration we set all markbits under the invalidated code object to 1 after the code space was swept and before slots buffers are processed.

R=erik.corry@gmail.com
BUG=v8:1713
TEST=test/mjsunit/regress/regress-1713.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 16:01:35 +00:00
yangguo@chromium.org
7ab81a14fa Reverting r9399.
Review URL: http://codereview.chromium.org/7989007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 15:55:44 +00:00
yangguo@chromium.org
dfeaa56b9a Fix debug builds broken by r9399.
Review URL: http://codereview.chromium.org/7996002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 15:39:22 +00:00
yangguo@chromium.org
0c6863a1ef Set RegExp's prototype to RegExp as specified by ES5.
BUG=v8:1217
TEST=regress-1217.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 15:11:12 +00:00
ricow@chromium.org
c23f9867e7 Don't take heap snapshot when doing Heap::RecordStats from OOM cases.
Filled issue 1718 to track this.
Review URL: http://codereview.chromium.org/7995003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 14:43:23 +00:00
rossberg@chromium.org
d938560d59 Implement identity hashes for proxies.
R=mstarzinger@chromium.org
BUG=v8:1543,v8:1565
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:54:53 +00:00
mstarzinger@chromium.org
873e4980db Fix transferal of marking bits on array trimming.
R=vegorov@chromium.org
BUG=v8:1708
TEST=mjsunit/regress/regress-1708

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:03:22 +00:00
fschneider@chromium.org
c6a3422c04 Give each function prototype a fresh copy of the object function map.
This avoid unwanted sharing between different function prototypes and in
general should help inlining because constant function properties on one
prototype don't affect other prototypes anymore.

BUG=v8:1716
Review URL: http://codereview.chromium.org/7994001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 12:57:54 +00:00
danno@chromium.org
f48c9f6557 Basic support for tracking smi-only arrays on ia32.
Activated by the flag --smi-only-arrays

Currently not crankshaft support, using flag on non-ia32 platforms will lead to write barrier misses and crashes.

BUG=none
TEST=elements_kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 11:30:04 +00:00
rossberg@chromium.org
e04d0b23a8 Make integer indexed properties ("elements") work for proxies.
Rehome some Object/JSReceiver/JSObject methods.

R=ricow@chromium.org,kmillikin@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 10:45:37 +00:00
fschneider@chromium.org
35cb252a86 Attempt to fix GCMole warning.
Review URL: http://codereview.chromium.org/7980064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 09:15:43 +00:00
yangguo@chromium.org
b7cac76bae Fixed string.split: always convert non-regexp separator to string.
BUG=v8:1711
TEST=mjsunit/regress/regress-1711.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 08:18:58 +00:00
rossberg@chromium.org
fdade92c20 Reorganize object type enum, such that proxies are no longer in the middle
of the range of proper JS objects.

Unfortunately, callable types no longer form a range now. However, there
are only two anyway. We put them at either end of the range of JS object
types so that certain compares can be combined.

R=erik.corry@gmail.com,kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:46:54 +00:00
sgjesse@chromium.org
9183444850 Turn on d8 interactive debugging before running files passed on the command line
If the file test.js contains:

  function f() { debugger; }
  f()

Then running

  $ d8 --debugger test.js

will now hit the breakpoint in f which it would not before.

R=yangguo@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:42:25 +00:00
fschneider@chromium.org
fdaadb78d6 Landing for miket@chromium.org: Add an optional source length field to the Extension constructor.
Original code review: http://codereview.chromium.org/7889046/
Review URL: http://codereview.chromium.org/7978028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:28:09 +00:00
rossberg@chromium.org
6c8472bd3a Fix and test use of property descriptor objects.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 12:45:51 +00:00
keuchel@chromium.org
41eb990afe Fix pre-parsing function declarations.
The preparser has been out of sync with the parser. As a reminder, we have the
following grammer for harmony mode

 Block ::
   { SourceElement* }
 SourceElement ::
   Statement
   FunctionDeclaration
   LetDeclaration

instead of

 Block ::
   { Statement* }
 SourceElement ::
   Statement
   FunctionDeclaration

The extension to allow FunctionDeclarations in statement positions in
non-strict code is still active.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 12:27:07 +00:00
vegorov@chromium.org
63b6874ef3 SemiSpace::AssertValidRange should use NewSpacePage::FromLimit for start.
Otherwise we get the wrong page when start == limit.

R=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:42:48 +00:00
yangguo@chromium.org
731a70ce13 API: Added Debug::DisableAgent to match existing Debug::EnableAgent
BUG=v8:1573
TEST=cctest test-debug/TestDebuggerAgent

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:34:05 +00:00
vegorov@chromium.org
5b8a6c1e54 Make heap iterable in PrepareForBreakPoints.
When aborting incremental marking with compaction discard all slots collected on evacuation candidates.

R=ricow@chromium.org
BUG=v8:1700
TEST=inspector/debugger/debugger-step-in.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:20:05 +00:00
rossberg@chromium.org
647ad8f500 Fix GC hazard.
R=jkummerow@chromium.org
BUG=v8:1698
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 09:58:40 +00:00
kmillikin@chromium.org
dcc542f2d1 Fix build.
Last minute cleanup lost a '*'.

TBR=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 09:04:44 +00:00
kmillikin@chromium.org
99eab94443 Reapply "Clean up Context::Lookup and its uses."
The threading test failures seem to be due to a GC-unsafe place, that
mixed handles and raw pointers, in the runtime code for context
lookup.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 08:51:44 +00:00
svenpanne@chromium.org
4e3565cf7f Fixed alignment problem when generating code for builtins.
This is not perfect, but it should fix the problem at hand. We should really clean up the memory handling responsibilities for the (macro)assemblers.

BUG=v8:1706
Review URL: http://codereview.chromium.org/7978023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 07:59:28 +00:00
erik.corry@gmail.com
14087f430d Disable some tests while we hunt for the reasons behind them.
Review URL: http://codereview.chromium.org/7978022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 07:25:33 +00:00
mstarzinger@chromium.org
3fabe323f2 Add kHeaderSize constant to SeqString.
This prevents potential misuse of SeqString::kHeaderSize as in the
case of live byte counting in incremental marking stub. All stubs
picked up the undefined size constant SeqString::kHeaderSize, thus
the computed size of all strings was off by two pointers slots.

R=lrn@chromium.org
BUG=v8:1672
TEST=mjsunit/object-seal.js,...

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 16:33:03 +00:00
mstarzinger@chromium.org
bffbcefffb Fix new space shrinking to compute correct capacity.
R=vegorov@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 15:35:36 +00:00
svenpanne@chromium.org
9702f38cc3 Fixed an assertion in PagedSpace::Verify.
The formerly unused variable was found by GCC 4.6.1, BTW...
Review URL: http://codereview.chromium.org/7979005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 14:46:33 +00:00
mstarzinger@chromium.org
86832d5924 Fix new space shrinking to reset from-space.
R=lrn@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:37:40 +00:00
vegorov@chromium.org
50a94139fc GcSafeCastToCode should not use Code::contains it is not evacuation safe.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:36:52 +00:00
erik.corry@gmail.com
c8fe713986 Put back the asserts in RememberedSetHelper, but correct this time.
Fix some incorrect comments.
Review URL: http://codereview.chromium.org/7977005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:32:27 +00:00
vegorov@chromium.org
867bb733af Remove incorrect debug-code assertion.
We should not use slot address to find out the page. This does not work for large pages.

Also this assertion is not always true (violated during incremental marking).

R=erik.corry@gmail.com
TEST=mozilla/js1_5/extensions/regress-371636

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 11:30:18 +00:00
lrn@chromium.org
610281f4ee Fix calculation of live-bytes in pages.
The "live bytes" count is *really* a "marked black" count - i.e., the count of bytes *known* to be live.

Fix aggravating bug on X64 where assembler code used a value that was off
by a factor of 2^31.

Ensure that sweeping clears live-bytes. Added other missing increments.

Added print statements to trace live-byte modifications, under a flag.

Still a few cases of undercounting left.

(New issue to merge from GC branch to bleeding_edge)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 11:20:00 +00:00
fschneider@chromium.org
76c869434d Fix a bug with uninitialized const variables in the optimizing compiler.
We have to check for uninitialized uses before phi-elimination. Otherwise we
may miss such a use and result in using the hole value instead. This
causes a NULL-dereference or assertion failure.

BUG=96989
TEST=mjsunit/compiler/regress-96989.js
Review URL: http://codereview.chromium.org/7974009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:26:01 +00:00
erik.corry@gmail.com
2f1f203bff Fix pc to code cache so it can cope with a pointer to the start of the code
object.  Rename it to be the inner pointer to code cache.
Review URL: http://codereview.chromium.org/7969013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:08:39 +00:00
yangguo@chromium.org
fdffe67205 Initialize pre-allocated fields of JSObject with undefined.
BUG=94873

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:06:23 +00:00
svenpanne@chromium.org
29618c079a Make newer GCCs happier: Removed unused variables.
Review URL: http://codereview.chromium.org/7969014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 09:44:23 +00:00
svenpanne@chromium.org
d4bb00230b Make newer GCCs happier: Fixed NULL vs. 0 confusion.
Review URL: http://codereview.chromium.org/7970008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 09:43:58 +00:00
erik.corry@gmail.com
00eaa669ad Speed up finding code objects from addresses in asserts. With
the new large pages it takes too long to iterate from the start
of the page to find a code object.
Review URL: http://codereview.chromium.org/7974007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 08:32:48 +00:00
kmillikin@chromium.org
22ef98dc66 Fix a deoptimization bug.
We reset the count of outgoing arguments, used for the index in the
frame's outgoing arguments, for each level of inlining.  This could
result in the arguments overlapping, rather than stacking on top of
each other.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 07:14:30 +00:00
erik.corry@gmail.com
d8b8825474 ARM: Pregenerate some stubs that we call from other stubs.
BUG=1696
Review URL: http://codereview.chromium.org/7956002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:50:06 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00