Commit Graph

34778 Commits

Author SHA1 Message Date
adamk
9d2051fc28 [modules] Store Module metadata in per-Context EmbedderData
This is a re-land of https://codereview.chromium.org/2393303002/ with
an additional call to DisposeModuleEmbedderData() added to fix lsan failures.

Unifies the approaches used for storing the specifier -> module mapping
and the module -> directory mapping, using std::unordered_maps for both
and storing them per-Context.

This requires adding a method to the v8::Module API to get a hash code
for a Module, but allows slimming down the API in return: gone are
SetEmbedderData/GetEmbedderData, along with the fourth argument
to ResolveModuleCallback.

Besides a simpler API, this allows d8 to get closer to the HTML loader,
which requires each Realm to have a persistent module map (though this
capability is not yet exercised by any tests).

BUG=v8:1569
TBR=neis@chromium.org,jochen@chromium.org

Review-Url: https://codereview.chromium.org/2405313002
Cr-Commit-Position: refs/heads/master@{#40186}
2016-10-11 19:22:25 +00:00
neis
f95abf2b3c [modules] Create own section in runtime.h.
Forgot to do that in 4ff5c2a72f.

TBR=adamk@chromium.org
BUG=v8:1569
NOTRY=true

Review-Url: https://codereview.chromium.org/2411013002
Cr-Commit-Position: refs/heads/master@{#40185}
2016-10-11 18:52:58 +00:00
neis
4ff5c2a72f [modules] Move runtime functions into new file (runtime-module.cc).
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2404243002
Cr-Commit-Position: refs/heads/master@{#40184}
2016-10-11 17:32:38 +00:00
bjaideep
82b10341c8 PPC/s390: [stubs] Simplify the ArrayConstructorStub.
Port 9192db2037

Original commit message:

    Remove the special side channel from the CallICStub to the
    ArrayConstructorStub and make the CallICStub always use the
    general entry point.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2410183002
Cr-Commit-Position: refs/heads/master@{#40183}
2016-10-11 16:49:33 +00:00
bjaideep
73683ef8f7 PPC/s390: [fullcodegen] Don't count CallIC calls as patching ICs.
Port 001926cdec

Original commit message:

    In fullcodegen we used to count CallICs as patching ICs, and thus the
    heuristics are currently off by the number of calls in a code object.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2410203002
Cr-Commit-Position: refs/heads/master@{#40182}
2016-10-11 16:46:59 +00:00
neis
a78afeb6cd [modules] Add internal printer method for JSModuleNamespace.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2410003002
Cr-Commit-Position: refs/heads/master@{#40181}
2016-10-11 16:29:12 +00:00
neis
8d18f42fae [modules] Simplify installation of @@toStringTag on namespace objects.
Install it as DataConstantDescriptor, not AccessorConstantDescriptor.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2410823002
Cr-Commit-Position: refs/heads/master@{#40180}
2016-10-11 16:26:32 +00:00
ulan
abe50f04be [heap] User size_t in GcTracer
BUG=chromium:652721

Review-Url: https://codereview.chromium.org/2408093003
Cr-Commit-Position: refs/heads/master@{#40179}
2016-10-11 15:31:04 +00:00
mtrofin
3362965158 [turbofan] Avoid large deopt blocks
Treat allocation of splintered ranges differently, by optimizing for move
counts (i.e. try to have less move counts), rather than optimizing for
quality of moves (which is what normal allocation does).

We can see reductions in code size in the benchmarks that measure it
(e.g. Unity)

BUG=

Review-Url: https://codereview.chromium.org/2347563004
Cr-Commit-Position: refs/heads/master@{#40178}
2016-10-11 15:06:04 +00:00
kozyatinskiy
e46f1016f2 [inspector] include test/inspector.gyp only when inspector is enabled
BUG=chromium:635948
R=dgozman@chromium.org,machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2411743002
Cr-Commit-Position: refs/heads/master@{#40177}
2016-10-11 14:59:49 +00:00
hpayer
da8654dba0 [heap] RemoveRange of SlotSet should not push nullptr for empty buckets on the pre-free stack.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2412453003
Cr-Commit-Position: refs/heads/master@{#40176}
2016-10-11 14:42:03 +00:00
mvstanton
cacb44a927 [turbofan] Optimize typeof operator without storing strings in Type
We'll take expressions like typeof 'hello' and reduce it to 'string'.
Neat! This CL moves the optimization to an explicit reduction
in typed lowering that inserts a constant string, instead of
relying on type matching.

BUG=

Review-Url: https://codereview.chromium.org/2411703002
Cr-Commit-Position: refs/heads/master@{#40175}
2016-10-11 14:32:42 +00:00
hpayer
33ca1f5175 [heap] Don't read current bucket twice when interating over slot set.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2409163002
Cr-Commit-Position: refs/heads/master@{#40174}
2016-10-11 14:26:34 +00:00
mvstanton
070a44f924 [turbofan] Look at nodes instead of types for string data
We'll stop storing string data in Type objects. At the moment, we have
optimizations that read that string data in typed lowering. Instead,
look at nodes for this data.

R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2406243002
Cr-Commit-Position: refs/heads/master@{#40173}
2016-10-11 13:14:52 +00:00
machenbach
d5871e8125 [test] Fix js-perf config
The android_arm config is deprecated. We only use the v8 arch
strings.

NOTRY=true
TBR=adamk, caitp

Review-Url: https://codereview.chromium.org/2412513002
Cr-Commit-Position: refs/heads/master@{#40172}
2016-10-11 13:09:23 +00:00
machenbach
16055d51b4 Revert of Speedup access to global_proxy.* attributes/accessors. (patchset #3 id:80001 of https://codereview.chromium.org/2403003002/ )
Reason for revert:
Blocks roll:
https://codereview.chromium.org/2406213002/

Original issue's description:
> Speedup access to global_proxy.* attributes/accessors.
>
> Using a global proxy (e.g. 'window.f', 'w.f' or 'this.f') is considerably slower than evaluating just 'f'. This CL aims to perform the necessary checks at compile time and inline the accesses.
>
> This is a follow-on CL to crrev.com/2369933005:
> - The initial upload is crrev.com/2369933005 + a rebase.
> - The remaining issues are the fixes requested by the reviewers on that CL.
>
> BUG=chromium:634276
>
> Committed: https://crrev.com/8f43d748272536117008aa6a1b53ea52126261c1
> Cr-Commit-Position: refs/heads/master@{#40153}

TBR=jochen@chromium.org,verwaest@chromium.org,vogelheim@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:634276

Review-Url: https://codereview.chromium.org/2408133002
Cr-Commit-Position: refs/heads/master@{#40171}
2016-10-11 12:49:11 +00:00
mythria
6571601149 [Interpreter] Collect feedback about Oddballs in Subtract Stub.
Also include feedback about Oddballs when collecting the type feedback.
For now, Number and NumberOrOddball are collected separately
because crankshaft does not handle NumberOrOddballs consistently.
This should change once we fix crankshaft.

BUG=v8:4280, v8:5400
LOG=N

Committed: https://crrev.com/d5d283b27d406486e2f8d7b44c6d2b3db4f98458
Review-Url: https://codereview.chromium.org/2406843002
Cr-Original-Commit-Position: refs/heads/master@{#40124}
Cr-Commit-Position: refs/heads/master@{#40170}
2016-10-11 12:42:04 +00:00
titzer
ff6941966e [wasm] Canonicalize function signature indices for matching in indirect calls.
R=bradnelson@chromium.org, ahaas@chromium.org, clemensh@chromium.org
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2403093002
Cr-Commit-Position: refs/heads/master@{#40169}
2016-10-11 12:40:33 +00:00
heimbuef
826451f078 Added zone tracing
Added PrintF output whenever a zone is created or destroyed. Also
enables setting of a name for each zone, which can then be shown
in the v8-heap-stats tool: https://github.com/mlippautz/v8-heap-stats/pull/2

BUG=v8:5489

Review-Url: https://codereview.chromium.org/2397573007
Cr-Commit-Position: refs/heads/master@{#40168}
2016-10-11 12:37:09 +00:00
verwaest
14bf19af64 Allow lazy parsing of functions nested in eager compiled functions
This is blocked on https://bugs.chromium.org/p/v8/issues/detail?id=5484

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2405813002
Cr-Commit-Position: refs/heads/master@{#40167}
2016-10-11 12:13:53 +00:00
heimbuef
91a3517e24 Added zone pool metrics to gc-trace.
Can be displayed in the external tool as well.

BUG=v8:5489

Review-Url: https://codereview.chromium.org/2392183004
Cr-Commit-Position: refs/heads/master@{#40166}
2016-10-11 11:49:43 +00:00
petermarshall
08217e45a7 [builtins] Move StringStartsWith to a C++ builtin.
BUG=v8:5364

Review-Url: https://codereview.chromium.org/2407173002
Cr-Commit-Position: refs/heads/master@{#40165}
2016-10-11 11:36:12 +00:00
petermarshall
5af6ec76b2 [builtins] Move StringEndsWith to a C++ builtin.
BUG=v8:5364

Review-Url: https://codereview.chromium.org/2406873002
Cr-Commit-Position: refs/heads/master@{#40164}
2016-10-11 11:28:12 +00:00
bmeurer
001926cdec [fullcodegen] Don't count CallIC calls as patching ICs.
In fullcodegen we used to count CallICs as patching ICs, and thus the
heuristics are currently off by the number of calls in a code object.

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2408103002
Cr-Commit-Position: refs/heads/master@{#40163}
2016-10-11 11:24:22 +00:00
bmeurer
9192db2037 [stubs] Simplify the ArrayConstructorStub.
Remove the special side channel from the CallICStub to the
ArrayConstructorStub and make the CallICStub always use the
general entry point.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2405203002
Cr-Commit-Position: refs/heads/master@{#40162}
2016-10-11 11:18:02 +00:00
jgruber
05a5599234 [regexp] Port split
This CL ports RegExp.prototype[@@split] to C++. Performance
regressions are expected due to:

* Slow RegExpImpl::Exec implementation instead of RegExpExec
  stub. We should be able to improve this by straight-lining
  RegExpImpl::Exec.
* Slow Factory::NewSubString instead of SubStringStub.
* Slow elements access to lastMatchInfo.

These points will be addressed in a follow-up CL.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2401643002
Cr-Commit-Position: refs/heads/master@{#40161}
2016-10-11 10:38:14 +00:00
verwaest
86ec092318 Get rid of ParseInfo::lazy
BUG=v8:5501

Review-Url: https://codereview.chromium.org/2406803003
Cr-Commit-Position: refs/heads/master@{#40160}
2016-10-11 10:37:09 +00:00
clemensh
4f9976aa68 [wasm] Decouple function name and exported name in WasmFunctionBuilder
This is needed for the asm.js -> WASM pipeline. A single exported
function is exported as __single_function__, but we still want to see
the correct function name on the stack, so the underlying wasm function
has to carry the original name.

R=ahaas@chromium.org, titzer@chromium.org
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2406133003
Cr-Commit-Position: refs/heads/master@{#40159}
2016-10-11 10:36:02 +00:00
mstarzinger
1c1138388c [interpreter] Preserve bytecode by default.
This enables preservation of bytecode by default. Thus far bytecode was
cleared during tier-up by default and was only preserved in the staging
configuration.

R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2384063010
Cr-Commit-Position: refs/heads/master@{#40158}
2016-10-11 09:15:53 +00:00
clemensh
dde9c073bf [wasm] Implement decoding of i32v values
I use it in a follow-up commit to delta-encode asm.js source positions.

This commit also removes the redundant consume_bytes function.

R=ahaas@chromium.org, titzer@chromium.org
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2406163002
Cr-Commit-Position: refs/heads/master@{#40157}
2016-10-11 09:03:37 +00:00
clemensh
1b58614135 [wasm] Use WasmCompiledModule type in interfaces
Just a minor refactoring. We have the type for compiled modules, so use
it where possible for better type safety.

R=ahaas@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2405173002
Cr-Commit-Position: refs/heads/master@{#40156}
2016-10-11 08:28:51 +00:00
mlippautz
f2c0f97ad8 [heap] MemoryAllocator: Use size_t consistently
BUG=chromium:652721
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2406913002
Cr-Commit-Position: refs/heads/master@{#40155}
2016-10-11 08:25:08 +00:00
epertoso
a863620fbc [stubs] Fix some CodeStubAssembler macros and adds a bitcast in the ToObjectStub.
This makes the MachineGraphVerifier happy with the stub.

R=jarin@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2394193002
Cr-Commit-Position: refs/heads/master@{#40154}
2016-10-11 08:23:28 +00:00
vogelheim
8f43d74827 Speedup access to global_proxy.* attributes/accessors.
Using a global proxy (e.g. 'window.f', 'w.f' or 'this.f') is considerably slower than evaluating just 'f'. This CL aims to perform the necessary checks at compile time and inline the accesses.

This is a follow-on CL to crrev.com/2369933005:
- The initial upload is crrev.com/2369933005 + a rebase.
- The remaining issues are the fixes requested by the reviewers on that CL.

BUG=chromium:634276

Review-Url: https://codereview.chromium.org/2403003002
Cr-Commit-Position: refs/heads/master@{#40153}
2016-10-11 08:22:21 +00:00
jochen
515873cc9b Don't lazy-parse arrow functions if we eager compile them
R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2404913002
Cr-Commit-Position: refs/heads/master@{#40152}
2016-10-11 08:16:10 +00:00
machenbach
4e0b685acc [test] Bump timeout for js-test Strings on Android
The test still runs into the 240s timeout on Nexus5 and
Nexus7.

NOTRY=true
TBR=adamk, caitp

Review-Url: https://codereview.chromium.org/2406173002
Cr-Commit-Position: refs/heads/master@{#40151}
2016-10-11 07:29:08 +00:00
jgruber
effb8def76 [regexp] Skip regexp-property-lu-ui test in gc-stress
This test is timing out in gc-stress mode since RegExp.prototype.test
was moved to C++. RE.proto.test will be improved shortly, and this test
should be reenabled then.

BUG=v8:5339
NOTRY=true

Review-Url: https://codereview.chromium.org/2407133002
Cr-Commit-Position: refs/heads/master@{#40150}
2016-10-11 07:19:45 +00:00
yangguo
0d8e52123e [Math] implement Math.random as TFJ builtin.
R=bmeurer@chromium.org
BUG=v8:5049, v8:5086

Review-Url: https://codereview.chromium.org/2402363002
Cr-Commit-Position: refs/heads/master@{#40149}
2016-10-11 06:47:15 +00:00
v8-autoroll
3d5ae0f7d3 Update V8 DEPS.
Rolling v8/base/trace_event/common: b403fa6..98499f3

Rolling v8/build: 17093d4..83eadac

Rolling v8/third_party/catapult: c47d2e1..f1eba76

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2410723002
Cr-Commit-Position: refs/heads/master@{#40148}
2016-10-11 03:39:37 +00:00
zhengxing.li
90ebb7b4dd X87: Reland "[turbofan] Discard the shared code entry in the optimized code map.".
port ec132e05ec (r40086)

  original commit message:
  (GcStress failure was unrelated.)

  At one time, we hoped to generate the same code for different
  native contexts. But in truth, much performance comes from optimizing
  on the native context. Now we abandon this pathway.

BUG=

Review-Url: https://codereview.chromium.org/2404843002
Cr-Commit-Position: refs/heads/master@{#40147}
2016-10-11 02:38:32 +00:00
zhengxing.li
ecc7d969ea [X87] [crankshaft] Set Floating-point precision in Math.Cos/Math.Sin to standard double precision.
This CL set Floating-point precision in Math.Cos/Math.Sin in Crankshaft compiler to standard double precision which is expected by v8.

BUG=

Review-Url: https://codereview.chromium.org/2403803002
Cr-Commit-Position: refs/heads/master@{#40146}
2016-10-11 02:13:59 +00:00
adamk
127798897f Revert of [modules] Store Module metadata in per-Context EmbedderData (patchset #7 id:120001 of https://codereview.chromium.org/2393303002/ )
Reason for revert:
Fails under LeakSanitizer on auto-roll fyi bot:

https://build.chromium.org/p/client.v8.fyi/builders/Auto-roll%20-%20release%20process/builds/49447

Original issue's description:
> [modules] Store Module metadata in per-Context EmbedderData
>
> Unifies the approaches used for storing the specifier -> module mapping
> and the module -> directory mapping, using std::unordered_maps for both
> and storing them per-Context.
>
> This requires adding a method to the v8::Module API to get a hash code
> for a Module, but allows slimming down the API in return: gone are
> SetEmbedderData/GetEmbedderData, along with the fourth argument
> to ResolveModuleCallback.
>
> Besides a simpler API, this allows d8 to get closer to the HTML loader,
> which requires each Realm to have a persistent module map (though this
> capability is not yet exercised by any tests).
>
> BUG=v8:1569
>
> Committed: https://crrev.com/9cf8fce74cf6e7afd6aea3f3545f6bb61572f277
> Cr-Commit-Position: refs/heads/master@{#40133}

TBR=jochen@chromium.org,neis@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2406973003
Cr-Commit-Position: refs/heads/master@{#40145}
2016-10-11 00:25:12 +00:00
adamk
9da6f1203f Revert of [d8] Fix LeakSanitizer failures on the bots due to ModuleEmbedderData (patchset #2 id:20001 of https://codereview.chromium.org/2403303002/ )
Reason for revert:
Still failing on auto-roll fyi bot

Original issue's description:
> [d8] Fix LeakSanitizer failures on the bots due to ModuleEmbedderData
>
> BUG=v8:1569
> TBR=jochen@chromium.org
>
> Committed: https://crrev.com/cd6f1c98f989ef991da3ff465f183c1caa070918
> Cr-Commit-Position: refs/heads/master@{#40143}

TBR=jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2403103004
Cr-Commit-Position: refs/heads/master@{#40144}
2016-10-11 00:24:04 +00:00
adamk
cd6f1c98f9 [d8] Fix LeakSanitizer failures on the bots due to ModuleEmbedderData
BUG=v8:1569
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2403303002
Cr-Commit-Position: refs/heads/master@{#40143}
2016-10-10 23:53:27 +00:00
gsathya
1f80f66de0 [promises] update deferred reactions symbol
The behavior was changed in https://codereview.chromium.org/2357423002

Review-Url: https://codereview.chromium.org/2403163002
Cr-Commit-Position: refs/heads/master@{#40142}
2016-10-10 22:59:48 +00:00
littledan
6e95a8f0a6 Enable previously DCHECK-failing test
R=adamk
BUG=v8:5337

Review-Url: https://codereview.chromium.org/2313873003
Cr-Commit-Position: refs/heads/master@{#40141}
2016-10-10 22:20:38 +00:00
adamk
c0550b4cf4 Remove now-unused string_iterator symbols
These were used by the JS implementation, but are now dead code.

R=caitp@igalia.com
BUG=v8:5388

Review-Url: https://codereview.chromium.org/2410533002
Cr-Commit-Position: refs/heads/master@{#40140}
2016-10-10 19:46:34 +00:00
kozyatinskiy
085a445775 [inspector] fix minor issue in test/inspector.gyp
* Inspector should depend on v8_libbase, v8 depedency is added in conditions section.
* Inlined sources since they aren't used outside of this gyp file.

BUG=chromium:635948
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2408833002
Cr-Commit-Position: refs/heads/master@{#40139}
2016-10-10 19:08:46 +00:00
heimbuef
a96c2129af Replaced different means of zone pooling/reusing by one zone segment pool
BUG=v8:5409

Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f
Committed: https://crrev.com/fc840361e357a571c709e0239ae82cc089800b3f
Review-Url: https://codereview.chromium.org/2348303002
Cr-Original-Original-Commit-Position: refs/heads/master@{#39633}
Cr-Original-Commit-Position: refs/heads/master@{#40048}
Cr-Commit-Position: refs/heads/master@{#40138}
2016-10-10 19:00:55 +00:00
heimbuef
f29f3e3208 Pool implementation for zone segments
BUG=v8:5409

Committed: https://crrev.com/37c688a24578e787d3d8941093563ed049c3497e
Committed: https://crrev.com/316669f62ea3834395bf4caab7bc3d7c32f6bbc6
Review-Url: https://codereview.chromium.org/2335343007
Cr-Original-Original-Commit-Position: refs/heads/master@{#39631}
Cr-Original-Commit-Position: refs/heads/master@{#40044}
Cr-Commit-Position: refs/heads/master@{#40137}
2016-10-10 18:03:55 +00:00