Commit Graph

9394 Commits

Author SHA1 Message Date
verwaest@chromium.org
1011ae225f Prepare push to trunk. Now working on version 3.13.2.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 15:39:37 +00:00
verwaest@chromium.org
61d11f99c4 Show map -> transition array -> descriptor array to the heap profiler.
BUG=chromium:142625

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 14:25:55 +00:00
mstarzinger@chromium.org
5a3ec8532b Force eager compilation of some function literals.
In case a function literal is followed by parenthesis, we consider this
a hint that it will be called immediately. If we happen to have parsed
that function literal eagerly, we can also compile it eagerly.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 11:54:48 +00:00
verwaest@chromium.org
aaf403e92c MIPS: Swapped transition array and descriptor array.
Port r12298 (7b39ef67)

Original commit message:
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10827335
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 11:42:02 +00:00
svenpanne@chromium.org
018670f2e4 Change the maximum optimization count into a commandline flag.
This is needed for some unit tests, which otherwise do not test what people
think they do. ;-)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 11:40:03 +00:00
svenpanne@chromium.org
f5f8ebd4ed Fix accessor lookup in crankshaft.
Seeing monomorphic type feedback plus an AccessorPair does not necessarily imply
that the corresponding getter/setter is really there, so we have to check for
this explictly.

TEST=mjsunit/object-define-property

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 10:35:39 +00:00
yangguo@chromium.org
8607093fab MIPS: Check for function in %_CallFunction.
Port r12299 (f6372257)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10834317
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 09:46:04 +00:00
mstarzinger@chromium.org
886c0fa4f7 Extend constructor inlining test case.
This makes sure that deoptimization really happens in each hydrogen
context by not using binary operations but loads instead. This is
needed because we cannot clear BinaryOpICs explicitly.

R=svenpanne@chromium.org
TEST=mjsunit/compiler/inline-construct

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 09:13:25 +00:00
mstarzinger@chromium.org
27f5bf3f2b MIPS: Fix improved LoadICs for dictionaries with callbacks.
Port r12311 (f698ddd7)

Original commit message:
This fixes the positive lookup performed by these LoadICs, to use the
holder instead of the receiver to perfrom the lookup on. It also extends
this improvement to KeyedLoadICs. And it fixes a bug introduced for the
JavaScript getter case of a LoadIC.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10823326
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 09:10:10 +00:00
erik.corry@gmail.com
ee3a66b273 Fix bug in compare IC. BUG=2291
Review URL: https://chromiumcodereview.appspot.com/10830334

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-15 15:08:42 +00:00
svenpanne@chromium.org
1ee6c0e30b Improved constructor inlining unit tests.
Currently we inline functions with different contexts only on ia32, so we have
to move the helper functions for the various contexts to the top level. Further
more, "new Object()" seems to prevent inlining, too, so we us a simple object
literal.

Although things get consistently inlined now, something strange seems to happen
in test/effect contexts: The DEOPT output seems to contain too few frames, and
we don't get any DEOPT ouput after the first time for those contexts. This has
to be investigated...

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-15 09:39:13 +00:00
mstarzinger@chromium.org
15589fe22a Fix improved LoadICs for dictionaries with callbacks.
This fixes the positive lookup performed by these LoadICs, to use the
holder instead of the receiver to perfrom the lookup on. It also extends
this improvement to KeyedLoadICs. And it fixes a bug introduced for the
JavaScript getter case of a LoadIC.

R=erik.corry@gmail.com
BUG=chromium:142088
TEST=cctest/test-api/Regress142088,cctest/test-api/Regress137002b

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 13:17:47 +00:00
yangguo@chromium.org
071f7fdfc1 Do checks when receiving external string resources through the API.
This is to find incorrect API usage.

R=ulan@chromium.org
BUG=140050

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 12:16:38 +00:00
yangguo@chromium.org
28c892938e Ensure capacity when adding parts in String.replace.
R=ulan@chromium.org
BUG=v8:2289
TEST=regress-2289.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 11:33:12 +00:00
yangguo@chromium.org
d3733ce1e3 Prevent segfault on undefined inline runtime call.
R=mstarzinger@chromium.org
BUG=v8:2286

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 10:06:34 +00:00
erik.corry@gmail.com
c3ef910b86 Disable array index dehoisting due to stability issues.
Review URL: https://chromiumcodereview.appspot.com/10834303

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 09:22:34 +00:00
yangguo@chromium.org
3605fcbe63 Fix indexing bug in regexp, part 2.
The previous fix initialized the start index incorrectly.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 15:53:40 +00:00
mstarzinger@chromium.org
e77f24f44e Remove prototype of global builtins object.
R=yangguo@chromium.org
BUG=v8:2284
TEST=mjsunit/regress/regress-2284

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 15:34:49 +00:00
yangguo@chromium.org
960b1af12f Fix wrong indexing in global regexp.
R=ulan@chromium.org
BUG=142087

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 15:26:46 +00:00
yangguo@chromium.org
f30099dacf Check for function in %_CallFunction.
R=mstarzinger@chromium.org
BUG=v8:2285

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 12:11:26 +00:00
verwaest@chromium.org
d53de0590a Swapped transition array and descriptor array.
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 08:43:16 +00:00
yangguo@chromium.org
bc9df090c7 Fix array-iteration test case.
R=verwaest@chromium.org
BUG=v8:2282

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 08:32:17 +00:00
mstarzinger@chromium.org
a055a4e193 Prepare push to trunk. Now working on version 3.13.1.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 14:41:52 +00:00
mstarzinger@chromium.org
8c51d61b7a Fix compile failure on Win64 introduced in r12291.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 14:21:46 +00:00
erik.corry@gmail.com
9b3068bedd Fix intermittent failure in ReleaseOverReservedPages on x64.
BUG=v8:2216
Review URL: https://chromiumcodereview.appspot.com/10828253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 13:45:22 +00:00
mstarzinger@chromium.org
8fdd8cefc4 Add histograms for total allocated/live heap size, as well as allocated size and percentage of total for map and cell
BUG=none
TEST=none
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10854043
Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 13:09:31 +00:00
erik.corry@gmail.com
3646df7d6d MIPS: Improve load IC so it can call a native accessor even if the holder is in dictionary mode. Add a flag to all maps to indicate whether they are used for dictionary (normalized) objects or fast mode objects. This is a commit of https://chromiumcodereview.appspot.com/10826213/ for palfia. This is a port of r12264, https://chromiumcodereview.appspot.com/10831153
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:28:12 +00:00
yangguo@chromium.org
cd5ee62692 Allow multiple lines of custom flags in javascript tests.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:26:33 +00:00
erik.corry@gmail.com
8d30a964d8 Revert inadvertent commit of testing change to flag-definitions.h
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:26:21 +00:00
erik.corry@gmail.com
a9f5f3d6f5 Fix the full compiler on ARM to always generate the same code
regardless of the detected CPU.  This is a requirement for the
debugger and the deoptimizer, which both expect that code from
the snapshot (compiled without VFP and ARM7) should have the
same layout as code compiled later.

This is another change to make snapshots more robust with
arbitrary code.
Review URL: https://chromiumcodereview.appspot.com/10824235

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:24:06 +00:00
svenpanne@chromium.org
f9aea9fcef Inline simple setter calls.
Currently only simple setter calls are handled (i.e. no calls in count
operations or compound assignments), and deoptimization in the setter is not
handled at all. Because of the latter, we temporarily hide this feature behind
the --inline-accessors flag, just like inlining getters.

We now use an enum everywhere we depend on the handling of a return value,
passing around several boolean would be more confusing.

Made VisitReturnStatement and the final parts of TryInline more similar, so
matching them visually is a bit easier now.

Simplified the signature of AddLeaveInlined, the target of the HGoto can simply
be retrieved from the function state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 09:05:42 +00:00
mstarzinger@chromium.org
6cfc3f4c18 Remove obsolete SLOT_ADDR macro usages.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 12:25:03 +00:00
svenpanne@chromium.org
22e3c0ae04 Use the correct oracle in TestContext::BuildBranch.
When inlining is being done, it is crucial to use the correct type feedback
oracle with a given type feedback ID. To ensure this, TestContext now carries an
oracle which is associated with the context's condition, and these are both used
together in TestContext::BuildBranch.

Note that in VisitReturnStatement and TryInline we are currently lucky that the
oracles don't go out of sync in an observable way, but this will change when we
inline setters. Therefore, there is no separate test case...

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 11:44:56 +00:00
yangguo@chromium.org
fe63070186 MIPS: Improve constant element index access code generation
Port r12232 (588ccf83)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10825263
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 08:41:56 +00:00
yangguo@chromium.org
93fe6abc6c MIPS: Refactor Math.min/max to be a single HInstruction.
Port r12265 (7501dd73)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10854053
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 08:28:52 +00:00
jkummerow@chromium.org
d1aaafd89d tools/push-to-trunk.sh: Add a check whether grepping for the just-committed SVN revision number succeeded.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 14:57:10 +00:00
ulan@chromium.org
92fd1eb347 Fix Win64 compile error caused by r12272.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 09:46:45 +00:00
mstarzinger@chromium.org
bd054d3df0 Temporary skip failure on simulators due to r12270.
R=ulan@chromium.org
TEST=test262/S13.2.1_A1_T1

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 09:19:55 +00:00
yangguo@chromium.org
120c82b156 Fix mozilla test expectations.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 08:44:29 +00:00
yangguo@chromium.org
5d35b1851b Fix parseInt's octal parsing behavior (ECMA-262 Annex E 15.1.2.2).
R=svenpanne@chromium.org
BUG=v8:1645
TEST=test262, parse-int-float.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 07:44:17 +00:00
ulan@chromium.org
a270eeef2d Add heap space sizes and external memory counter to V8 statistics extension.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 07:37:07 +00:00
erik.corry@gmail.com
ac4b44297b Add checks for interceptors to negative lookup code in Crankshaft.
BUG=140473
Review URL: https://chromiumcodereview.appspot.com/10837141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:48:19 +00:00
mstarzinger@chromium.org
fa2287fa96 Force eager compilation of parenthesized functions.
This makes the compiler use eager compilation for function literals that
are parenthesized. We consider this to be a hint that the function will
be called immediatly and hence try to avoid parsing it twice. The parser
already respects this heuristic.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:47:36 +00:00
ulan@chromium.org
fb7345cdfd Add flag to trace the amount of external memory.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:17:35 +00:00
svenpanne@chromium.org
5deec59302 Unify handling of bailout IDs for property loads.
Renamed Property::ReturnId to Property::LoadId, which describes its use more
accurately. Compound assignments and CountOperations now consistently use
Property::LoadId() instead of their own CompoundLoadId/CountId.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:06:25 +00:00
ulan@chromium.org
b4fd9de1f0 Adjust GC tracing: add a flag to ignore scavenger traces and print total GC time in verbose mode.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 08:19:11 +00:00
jkummerow@chromium.org
23a270c6e7 Refactor Math.min/max to be a single HInstruction.
That allows us to dynamically compute representations and insert appropriate HChange instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:28:27 +00:00
erik.corry@gmail.com
92f30d1df5 Improve load IC so it can call a native accessor even if the holder is
in dictionary mode.  Add a flag to all maps to indicate whether they are
used for dictionary (normalized) objects or fast mode objects.
Review URL: https://chromiumcodereview.appspot.com/10831153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:25:19 +00:00
svenpanne@chromium.org
b5da7279b1 Introduced TypeFeedbackId and BailoutId types.
This is a refactoring-only CL which improves the typing of IDs associated with
AST nodes. The interesting parts are in utils.h and ast.h, the rest of the CL
basically follows mechanically.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:13:09 +00:00
ulan@chromium.org
b49b32599b Make AdjustAmountOfExternalAllocatedMemory() more robust.
Do not crash if called from a thread without V8 isolate, reset the external
memory counters in case of overflow, bump the external allocation limit.

This will allow us to track typed array allocation and deallocation in WebKit.

BUG=v8:2022,122097,42342
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 13:49:13 +00:00