Commit Graph

7730 Commits

Author SHA1 Message Date
bmeurer
a556a104c0 [turbofan] Context specialize during inlining.
Context specialization enables inlining (at least currently it is the
only enabler for inlining), but inlining enables more possibilities for
context specialization. So we really need to run them together.

This is especially important with the "module based builtins" that we're
working towards.

BUG=v8:3952
LOG=n

Review URL: https://codereview.chromium.org/988423004

Cr-Commit-Position: refs/heads/master@{#27085}
2015-03-10 08:37:26 +00:00
dcarney
60c1ad026d remove phantom naming from the api
since the old style weakness is slated for removal, we might as well reuse the name to limit confusion.  additionally I simplified the callback type to a enum to either get internal field values or not

this should be a non-breaking change with the exception of PhantomPersistentValueMap, which is unused.

R=jochen@chromium.org, erikcorry@chromium.org

BUG=

Review URL: https://codereview.chromium.org/989153003

Cr-Commit-Position: refs/heads/master@{#27084}
2015-03-09 21:48:09 +00:00
titzer
0f6702562e Extract ParseInfo from CompilationInfo.
Rationale: separate the inputs and outputs of parsing + analysis from the business of compiling (i.e. generating machine code).

BUG=

Review URL: https://codereview.chromium.org/974213002

Cr-Commit-Position: refs/heads/master@{#27078}
2015-03-09 14:51:24 +00:00
marja
bb69648804 Debugger & classes: add debugger tests for classes.
R=dslomov@chromium.org
BUG=

Review URL: https://codereview.chromium.org/977123002

Cr-Commit-Position: refs/heads/master@{#27077}
2015-03-09 14:49:54 +00:00
loislo
66ab309e73 CpuProfiler: fix for GetDeoptReason code.
The original code always returned the first entry from RelocInfo that matched with
bailout_id. But we may have a few different deopt reasons for one bailout_id.
So we need to get the one which matches with a particular call from JumpTable.

We can do this by checking not 'target_address' (it maps to bailout_id)
but 'from' address which maps to a particular JumpTable entry.

The test was reworked so it tests identical functions against different reasons.

BUG=chromium:452067
LOG=n

Review URL: https://codereview.chromium.org/984773003

Cr-Commit-Position: refs/heads/master@{#27076}
2015-03-09 14:43:40 +00:00
marja
4a709dd658 [strong] Fix scoping related errors for methods.
Methods can refer to the class name.

BUG=v8:3927
LOG=N

Review URL: https://codereview.chromium.org/968263002

Cr-Commit-Position: refs/heads/master@{#27075}
2015-03-09 14:30:40 +00:00
yangguo
9dedcc3dfc Simplify promise event on throw handling.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/991833002

Cr-Commit-Position: refs/heads/master@{#27074}
2015-03-09 13:41:55 +00:00
jarin
6f559b7ec3 [turbofan] Fix lazy deopt for JSToNumber conversions in binary operations.
This slightly hacky change provides lazy deopt points for to-number conversions in binops: When we deopt from a to-number conversion, we create a frame state with the already-converted value(s) so that we do not repeat the side effect of the conversion.

Embenchen numbers are below. It is not quite clear what happened to fasta - the hot code looks nearly identical.

Current: EmbenchenBox2d(RunTime): 12746 ms.
d8-master: EmbenchenBox2d(RunTime): 13861 ms.
----------- bullet.js
Current: EmbenchenBullet(RunTime): 17680 ms.
d8-master: EmbenchenBullet(RunTime): 19170 ms.
----------- copy.js
Current: EmbenchenCopy(RunTime): 4939 ms.
d8-master: EmbenchenCopy(RunTime): 4943 ms.
----------- corrections.js
Current: EmbenchenCorrections(RunTime): 6639 ms.
d8-master: EmbenchenCorrections(RunTime): 6728 ms.
----------- fannkuch.js
Current: EmbenchenFannkuch(RunTime): 4630 ms.
d8-master: EmbenchenFannkuch(RunTime): 4872 ms.
----------- fasta.js
Current: EmbenchenFasta(RunTime): 10209 ms.
d8-master: EmbenchenFasta(RunTime): 9673 ms.
----------- lua_binarytrees.js
Current: EmbenchenLuaBinaryTrees(RunTime): 12936 ms.
d8-master: EmbenchenLuaBinaryTrees(RunTime): 15529 ms.
----------- memops.js
Current: EmbenchenMemOps(RunTime): 7357 ms.
d8-master: EmbenchenMemOps(RunTime): 7340 ms.
----------- primes.js
Current: EmbenchenPrimes(RunTime): 7530 ms.
d8-master: EmbenchenPrimes(RunTime): 7457 ms.
----------- skinning.js
Current: EmbenchenSkinning(RunTime): 15832 ms.
d8-master: EmbenchenSkinning(RunTime): 15630 ms.
----------- zlib.js
Current: EmbenchenZLib(RunTime): 11176 ms.
d8-master: EmbenchenZLib(RunTime): 11324 ms.

BUG=

Review URL: https://codereview.chromium.org/985713003

Cr-Commit-Position: refs/heads/master@{#27071}
2015-03-09 13:24:42 +00:00
mstarzinger
dcb502a4ee [turbofan] Only reduce inline %DeoptimizeNow.
This makes sure only the %_DeoptimizeNow intrinsic is inlined, and
not the %DeoptimizeNow one. It hence re-establishes the invariant
that JSIntrinsicLowering only deals with inline intrinsics.

R=jarin@chromium.org
TEST=mjsunit/compiler/eager-deopt-simple

Review URL: https://codereview.chromium.org/988333003

Cr-Commit-Position: refs/heads/master@{#27070}
2015-03-09 13:20:26 +00:00
dcarney
d7f25f557c use a hash table for the function cache as blink is leaking functiontemplates
BUG=

Review URL: https://codereview.chromium.org/988283003

Cr-Commit-Position: refs/heads/master@{#27066}
2015-03-09 12:26:28 +00:00
Benedikt Meurer
d18bfa1130 [x86] Faster/shorter code for stack checks.
Avoid loading the stack pointer and the stack limit into allocatable
registers first, but generate a cmp rsp,[limit] instead.

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/989203002

Cr-Commit-Position: refs/heads/master@{#27065}
2015-03-09 11:06:45 +00:00
Jaroslav Sevcik
82a28adf05 Do not set target in deoptimized code in keyed store IC.
BUG=chromium:460937
R=ishell@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/989093002

Cr-Commit-Position: refs/heads/master@{#27064}
2015-03-09 10:11:13 +00:00
ishell@chromium.org
67a02321c2 Revert of Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer. (patchset #4 id:230001 of https://codereview.chromium.org/957273002/)
Reason for revert:
It caused a lot of Canary crashes.

Original issue's description:
> Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer.
>
> The problem is that tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
> This CL also adds useful machinery that helps triggering incremental write barriers.
>
> BUG=chromium:454297
> LOG=Y
>
> Committed: https://crrev.com/9633ebabd405c264d33f603f8798c31f59418dcd
> Cr-Commit-Position: refs/heads/master@{#27054}

TBR=verwaest@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:454297

Review URL: https://codereview.chromium.org/991793002

Cr-Commit-Position: refs/heads/master@{#27063}
2015-03-09 10:10:46 +00:00
Jaroslav Sevcik
02e318517f [turbofan] Add an extra frame state for deoptimization before binary op.
BUG=
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/983153002

Cr-Commit-Position: refs/heads/master@{#27060}
2015-03-09 08:37:17 +00:00
Benedikt Meurer
25895aeeaf [turbofan] Add support for inlining of builtins.
We mark certain builtins for inlining, and those should always be
inlined into optimized code (CrankShaft already handles it this way), so
we should support that in TurboFan as well. Currently this mainly
affects a certain set of Math functions, but once have the basics in
place we can extend this to any kind of builtin/code stub/accessor.

This adds a new flag --turbo_builtin_inlining (enabled by default), that
forces the inliner to always inline builtins marked for inlining, but
does not affect inlining of other functions (this is still controlled by
the --turbo-inlining flag).

BUG=v8:3952
LOG=n
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/993473002

Cr-Commit-Position: refs/heads/master@{#27059}
2015-03-09 08:05:45 +00:00
ishell
9633ebabd4 Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer.
The problem is that tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
This CL also adds useful machinery that helps triggering incremental write barriers.

BUG=chromium:454297
LOG=Y

Review URL: https://codereview.chromium.org/957273002

Cr-Commit-Position: refs/heads/master@{#27054}
2015-03-06 23:55:13 +00:00
caitpotter88
9e482baf81 [parser] better error message for generator constructors
BUG=
LOG=N
R=arv@chromium.org

Review URL: https://codereview.chromium.org/982153003

Cr-Commit-Position: refs/heads/master@{#27051}
2015-03-06 16:54:39 +00:00
dusan.milosavljevic
6f946d6c02 MIPS: Update test status files.
TEST=
BUG=

Review URL: https://codereview.chromium.org/987653005

Cr-Commit-Position: refs/heads/master@{#27050}
2015-03-06 16:41:35 +00:00
jkummerow
233ea0eef8 Reland: Simplify and compact transitions storage
Original issue: https://codereview.chromium.org/980573002/

Simple transitions are now stored in a map's "transitions" field (as a WeakCell wrapping the target map); full TransitionArrays are used when that's not sufficient.
To encapsulate these storage format implementation details, functions for manipulating and querying transitions have been refactored to be static functions on the TransitionArray class, and take maps as inputs.

Review URL: https://codereview.chromium.org/988703002

Cr-Commit-Position: refs/heads/master@{#27044}
2015-03-06 14:08:47 +00:00
svenpanne
d8416f5524 Intrinsics in the INLINE_FUNCTION_LIST are now avaliable without '_', too.
This involved renaming apart a few more intrinsics. In the long run,
we want to clean up redundant intrinsics which just delegate.

BUG=v8:3947
LOG=n

Review URL: https://codereview.chromium.org/984963002

Cr-Commit-Position: refs/heads/master@{#27043}
2015-03-06 13:50:06 +00:00
jarin
9b40c5d0d2 [turbofan] Fix the deopt ids in assignment.
BUG=chromium:463028
LOG=n
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/987733003

Cr-Commit-Position: refs/heads/master@{#27041}
2015-03-06 12:50:47 +00:00
ulan
1b00451f57 Retain maps embedded in optimized code for several garbage collections.
This keeps dying maps alive for FLAG_retain_maps_for_n_gc garbage collections
to increase chances of them being reused for new objects in future and
decrease number of deoptimizations.

BUG=v8:3664
LOG=N
TEST=cctest/test-heap/MapRetaining

Review URL: https://codereview.chromium.org/980523004

Cr-Commit-Position: refs/heads/master@{#27040}
2015-03-06 12:36:32 +00:00
svenpanne
4e7acce180 Merged INLINE_OPTIMIZED intrinsic type into INLINE.
BUG=v8:3947
LOG=n

Review URL: https://codereview.chromium.org/978123003

Cr-Commit-Position: refs/heads/master@{#27039}
2015-03-06 11:01:52 +00:00
loislo
b2ae7a7594 Revert of CpuProfiler: enable tests except four failing tests. (patchset #3 id:100001 of https://codereview.chromium.org/976203003/)
Reason for revert:
Some tests still flaky

Original issue's description:
> CpuProfiler: enable tests except four failing tests.
>
> Four tests are failing due to a problem with no frame ranges.
>
> BUG=
> LOG=n
>
> Committed: https://crrev.com/2be160e726f2be6272b77e53fbd556aded6024f1
> Cr-Commit-Position: refs/heads/master@{#27035}

TBR=yurys@chromium.org,svenpanne@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/987553005

Cr-Commit-Position: refs/heads/master@{#27037}
2015-03-06 10:20:00 +00:00
mstarzinger
e6ff16d6bf [turbofan] Preserve pending message while inside finally-block.
This makes sure that any pending message is saved before entering
and restored after exiting a finally block. It also makes sure that
operand stacks are kept in sync to full-codegen.

R=bmeurer@chromium.org
TEST=cctest/test-run-jsexceptions/ThrowMessage

Review URL: https://codereview.chromium.org/979173002

Cr-Commit-Position: refs/heads/master@{#27036}
2015-03-06 10:16:02 +00:00
loislo
2be160e726 CpuProfiler: enable tests except four failing tests.
Four tests are failing due to a problem with no frame ranges.

BUG=
LOG=n

Review URL: https://codereview.chromium.org/976203003

Cr-Commit-Position: refs/heads/master@{#27035}
2015-03-06 10:01:49 +00:00
yangguo
a8e82da6a5 Serializer: simplify external reference encoding.
External references are encoded as a tuple of type and ID. This
requires both the external reference encode and the decoder to
create a mapping between the encoding and the external reference
table index.

Instead, we simply use the external reference table index as
encoding.

We now also assume that there are no duplicate entries. Existing
duplicates have been removed in this change.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/982773003

Cr-Commit-Position: refs/heads/master@{#27033}
2015-03-06 08:15:28 +00:00
yangguo
e571065c14 Only reference constant root list entries in the snapshot.
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/979003003

Cr-Commit-Position: refs/heads/master@{#27031}
2015-03-05 21:24:24 +00:00
jkummerow
948a973d45 Revert of Simplify and compact transitions storage (patchset #4 id:80001 of https://codereview.chromium.org/980573002/)
Reason for revert:
x64 test failures

Original issue's description:
> Simplify and compact transitions storage
>
> Simple transitions are now stored in a map's "transitions" field (as a WeakCell wrapping the target map); full TransitionArrays are used when that's not sufficient.
> To encapsulate these storage format implementation details, functions for manipulating and querying transitions have been refactored to be static functions on the TransitionArray class, and take maps as inputs.
>
> Committed: https://crrev.com/45fbef7f2252fce10634931cb103ccc1fc95ae6a
> Cr-Commit-Position: refs/heads/master@{#27029}

TBR=verwaest@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/982143002

Cr-Commit-Position: refs/heads/master@{#27030}
2015-03-05 20:42:03 +00:00
jkummerow
45fbef7f22 Simplify and compact transitions storage
Simple transitions are now stored in a map's "transitions" field (as a WeakCell wrapping the target map); full TransitionArrays are used when that's not sufficient.
To encapsulate these storage format implementation details, functions for manipulating and querying transitions have been refactored to be static functions on the TransitionArray class, and take maps as inputs.

Review URL: https://codereview.chromium.org/980573002

Cr-Commit-Position: refs/heads/master@{#27029}
2015-03-05 20:09:41 +00:00
kozyatinskiy
54196b17c8 [V8] Use Function.name for stack frames in v8::StackTrace
If function.name property has string type then stack frame will contain it otherwise DebugName from shared function info.

BUG=17356
LOG=Y
R=yurys@chromium.org

Review URL: https://codereview.chromium.org/917743002

Cr-Commit-Position: refs/heads/master@{#27025}
2015-03-05 18:31:49 +00:00
Dan Carney
4873d8c74e disable some arm tests after r27020
TBR=yangguo@chromium.org

BUG=

Review URL: https://codereview.chromium.org/982873002

Cr-Commit-Position: refs/heads/master@{#27024}
2015-03-05 17:49:45 +00:00
Yang Guo
e522cb6e3f Disable turbofan for serializer tests.
TBR=dcarney@chromium.org

Review URL: https://codereview.chromium.org/980873002

Cr-Commit-Position: refs/heads/master@{#27022}
2015-03-05 14:46:56 +00:00
yangguo
ce45b00e4b Serializer: correctly deal with internal references.
Internal references are absolute addresses into the instruction
stream. Turn them into relative addresses when serializing and
back when deserializing to keep them valid.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/976623002

Cr-Commit-Position: refs/heads/master@{#27020}
2015-03-05 13:46:46 +00:00
dcarney
00c52d424a reland rename UniquePersistent to Global
BUG=

Review URL: https://codereview.chromium.org/980173003

Cr-Commit-Position: refs/heads/master@{#27018}
2015-03-05 13:26:35 +00:00
yurys
e33ae81ce1 Allow passing sourceMapUrl when compiling scripts
According to Source Map specification [1] source map url can be passed either as a magic comment at the end of script or as SourceMap http header. We already parse the former value and expose it on Script object. This change allows to unify the way we deal with source map urls received in http header by providing api for passing that url into the script being compiled.

source_map_url is intentionally not passed into CompilationCacheScript::Lookup. The cache is anyways disabled when debugger is on.

[1] https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

LOG=Y
BUG=chromium:462572

Review URL: https://codereview.chromium.org/983603003

Cr-Commit-Position: refs/heads/master@{#27017}
2015-03-05 13:03:57 +00:00
mstarzinger
1382879f29 [turbofan] Implement throwing exceptions into TurboFan code.
This extends the stack unwinding logic to respect optimized frames
and perform a lookup in the handler table to find handlers. It also
contains fixes to the API call stubs to allow a stack walk while
promoting scheduled exceptions.

R=jarin@chromium.org
TEST=cctest/test-run-jsexceptions

Review URL: https://codereview.chromium.org/969533004

Cr-Commit-Position: refs/heads/master@{#27016}
2015-03-05 13:02:46 +00:00
rossberg
2ecdf736cf Fix exception for assignment to uninitialised const
R=dslomov@chromium.org, mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/976053002

Cr-Commit-Position: refs/heads/master@{#27014}
2015-03-05 12:44:01 +00:00
machenbach
8465f39792 Revert of rename UniquePersistent to Global (patchset #2 id:20001 of https://codereview.chromium.org/980173003/)
Reason for revert:
breaks arm compile

Original issue's description:
> rename UniquePersistent to Global
>
> BUG=
>
> Committed: https://crrev.com/3f5ae16c62b031ad572f750d81ffc71c5d6d1f9b
> Cr-Commit-Position: refs/heads/master@{#27011}

TBR=svenpanne@chromium.org,dcarney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/983653002

Cr-Commit-Position: refs/heads/master@{#27012}
2015-03-05 12:10:32 +00:00
dcarney
3f5ae16c62 rename UniquePersistent to Global
BUG=

Review URL: https://codereview.chromium.org/980173003

Cr-Commit-Position: refs/heads/master@{#27011}
2015-03-05 11:40:43 +00:00
loislo
5cd7707c55 CpuProfiler: simplify test.
BUG=
LOG=n
TBR=yurys, svenpanne

Review URL: https://codereview.chromium.org/978203002

Cr-Commit-Position: refs/heads/master@{#27008}
2015-03-05 10:38:07 +00:00
bmeurer
4436c2642a [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble.
This adds support for the double bits intrinsics to TurboFan, and is
a first step towards fast Math functions inlined into TurboFan code
or even compiled by themselves with TurboFan.

Review URL: https://codereview.chromium.org/974313002

Cr-Commit-Position: refs/heads/master@{#27006}
2015-03-05 09:22:38 +00:00
mstarzinger
23fb4eb8f3 [turbofan] Enable DeoptFinallyReturn test that no longer fails.
This was fixed by 064be2385a and will no longer fail, even on the
no-snap ARM64 simulator.

R=bmeurer@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptFinallyReturn

Review URL: https://codereview.chromium.org/979823002

Cr-Commit-Position: refs/heads/master@{#27005}
2015-03-05 09:17:12 +00:00
arv
f6cd009efd ES6: Make function name configurable
Function name property is now standardized in ES6. It was a Mozilla proprietary
extension before. With ES6, the property was made configurable, so that it can
be used instead of another proprietary property, displayName.

This is a revert of revert c791d84112.

Last time this broke a Chrome browser test which has since been updated:

5f75a3be4c

BUG=v8:3333
LOG=N
R=mstarzinger@chromium.org,verwaest@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/977003004

Cr-Commit-Position: refs/heads/master@{#26996}
2015-03-04 16:57:10 +00:00
jarin
8d2e45669f [turbofan] First shot at eager deoptimization in Turbofan.
BUG=

Review URL: https://codereview.chromium.org/961973002

Cr-Commit-Position: refs/heads/master@{#26993}
2015-03-04 15:21:21 +00:00
yangguo
bdc7b2f43c Serializer: still install experimental globals when creating a snapshot.
Experimental globals are simply flag values on the builtins object to
turn on/off harmony features. We still need to declare them even when
we don't turn on harmony features for the snapshot.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/978813002

Cr-Commit-Position: refs/heads/master@{#26992}
2015-03-04 15:02:06 +00:00
yangguo
1a608493e5 Refactor BreakLocationIterator.
We now have BreakLocation::Iterator to iterate via RelocIterator, and
create a BreakLocation when we are done iterating. The reloc info is
stored in BreakLocation in a GC-safe way and instantiated on demand.

R=ulan@chromium.org
BUG=v8:3924
LOG=N

Review URL: https://codereview.chromium.org/967323002

Cr-Commit-Position: refs/heads/master@{#26983}
2015-03-04 13:15:34 +00:00
yangguo
efe828e699 Disable experimental natives when creating a start-up snapshot.
Re-installing experimental natives after deserialization causes failures if
said experimental native is already included in the snapshot. However, there
is no way to tell whether a certain harmony feature has been included.

Experimental natives may also be turned on/off on-demand, which a snapshot
that includes them would not support for all cases.

The simple solution for the meantime is to never include experimental natives
in the snapshot and initialize them after deserialization on-demand.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/981473002

Cr-Commit-Position: refs/heads/master@{#26982}
2015-03-04 13:01:28 +00:00
dslomov
1604bd46bf Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
Cr-Commit-Position: refs/heads/master@{#26960}

Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
Cr-Commit-Position: refs/heads/master@{#26963}

Committed: https://crrev.com/0705045b50a29cf1273e9e6b86fe6a627d8dcb43
Cr-Commit-Position: refs/heads/master@{#26966}

Review URL: https://codereview.chromium.org/975463002

Cr-Commit-Position: refs/heads/master@{#26972}
2015-03-03 18:45:02 +00:00
rossberg
054989bd04 [es6] Fix for-const loops
R=dslomov@chromium.org
BUG=3983
LOG=Y

Review URL: https://codereview.chromium.org/977543002

Cr-Commit-Position: refs/heads/master@{#26971}
2015-03-03 18:34:40 +00:00