Commit Graph

31506 Commits

Author SHA1 Message Date
neis
54b405ce65 [generators] Make runtime functions more robust.
Only look at the --ignition-generators flag when determining whether to use
Ignition (in compiler.cc).  In generator runtime functions, instead of looking
at the flag, determine the generator kind based on whether the generator has a
bytecode array.  This allows compiling some generator function using
full-codegen and others using Ignition, e.g when using --ignition-filter.

R=mstarzinger@chromium.org
BUG=chromium:618657,v8:4907

Review-Url: https://codereview.chromium.org/2052873002
Cr-Commit-Position: refs/heads/master@{#36864}
2016-06-09 14:20:58 +00:00
oth
769d332619 [interpreter] Filter expression positions at source.
With this change the bytecode array builder only emits expression
positions for bytecodes that can throw. This allows more peephole
optimization opportunities and results in smaller code.

BUG=v8:4280,chromium:615979
LOG=N

Review-Url: https://codereview.chromium.org/2038323002
Cr-Commit-Position: refs/heads/master@{#36863}
2016-06-09 13:33:29 +00:00
machenbach
77af83ba18 [build] Use icu data file by default
BUG=chromium:616033
LOG=y

Review-Url: https://codereview.chromium.org/2049743002
Cr-Commit-Position: refs/heads/master@{#36862}
2016-06-09 13:24:58 +00:00
machenbach
956f28b816 Revert of [mb] Switch staging bot to gyp for testing purposes (patchset #1 id:1 of https://codereview.chromium.org/2056673002/ )
Reason for revert:
Looks good. Switch back to gn.

Original issue's description:
> [mb] Switch staging bot to gyp for testing purposes
>
> This is to test the migration workflow. Will be reverted
> afterwards.
>
> BUG=chromium:616035
> NOTRY=true
> TBR=vogelheim@chromium.org, jochen@chromium.org
>
> Committed: https://crrev.com/6a5d769be2b97a9ebca8ec58496cb20aed077f18
> Cr-Commit-Position: refs/heads/master@{#36848}

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

Review-Url: https://codereview.chromium.org/2050243002
Cr-Commit-Position: refs/heads/master@{#36861}
2016-06-09 13:21:36 +00:00
machenbach
cb18c379a8 [gn] Skip gyp_v8 when gn should run
This ports logic from gyp_chromium to skip gyp by environment
variable. The variable name stays the same for chromium
and v8 as it is shared across other infra tools.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2049683004
Cr-Commit-Position: refs/heads/master@{#36860}
2016-06-09 12:49:07 +00:00
machenbach
19fca22505 [test] Skip tail-call-megatest for tsan
This test gets slower with tsan when the print() calls
in the tests are deleted. It is also only very slow with
crankshaft not with turbofan, but we have no config atm
to only run it with turbofan.

TBR=ishell@chromium.org, ahaas@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2049993003
Cr-Commit-Position: refs/heads/master@{#36859}
2016-06-09 12:49:06 +00:00
cbruni
1ed327977d [--trace-ic] always print short form of keys
BUG=
NOTRY=Y

Review-Url: https://codereview.chromium.org/2045013005
Cr-Commit-Position: refs/heads/master@{#36858}
2016-06-09 12:38:27 +00:00
machenbach
8898fef850 Reland of [ic] Don't pollute per-map code cache with CompareIC stubs. (patchset #1 id:1 of https://codereview.chromium.org/2055793002/ )
Reason for revert:
Not the cause...

Original issue's description:
> Revert of [ic] Don't pollute per-map code cache with CompareIC stubs. (patchset #1 id:20001 of https://codereview.chromium.org/2053583002/ )
>
> Reason for revert:
> [Sheriff] Speculative revert. Tail call test timing out:
> https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/10014
>
> Original issue's description:
> > [ic] Don't pollute per-map code cache with CompareIC stubs.
> >
> > Given that
> > 1) because of code flags mismatch we are not able to fetch any CompareIC stub that was put into the cache (we put MONOMORPHIC stubs but query only UNINITIALIZED ones),
> > 2) it was already broken for a couple of years,
> > 3) we will not need to cache any stub once CompareIC becomes vector-based.
> >
> > Committed: https://crrev.com/172ddf4250e5c4b7510ce352631fb9f8eb291940
> > Cr-Commit-Position: refs/heads/master@{#36854}
>
> TBR=verwaest@chromium.org,jkummerow@chromium.org,ishell@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/1d2ee8fd10adbfa5d213462c46181fa1ca899a61
> Cr-Commit-Position: refs/heads/master@{#36856}

TBR=verwaest@chromium.org,jkummerow@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2051823002
Cr-Commit-Position: refs/heads/master@{#36857}
2016-06-09 12:34:10 +00:00
machenbach
1d2ee8fd10 Revert of [ic] Don't pollute per-map code cache with CompareIC stubs. (patchset #1 id:20001 of https://codereview.chromium.org/2053583002/ )
Reason for revert:
[Sheriff] Speculative revert. Tail call test timing out:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/10014

Original issue's description:
> [ic] Don't pollute per-map code cache with CompareIC stubs.
>
> Given that
> 1) because of code flags mismatch we are not able to fetch any CompareIC stub that was put into the cache (we put MONOMORPHIC stubs but query only UNINITIALIZED ones),
> 2) it was already broken for a couple of years,
> 3) we will not need to cache any stub once CompareIC becomes vector-based.
>
> Committed: https://crrev.com/172ddf4250e5c4b7510ce352631fb9f8eb291940
> Cr-Commit-Position: refs/heads/master@{#36854}

TBR=verwaest@chromium.org,jkummerow@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2055793002
Cr-Commit-Position: refs/heads/master@{#36856}
2016-06-09 12:26:51 +00:00
oth
a9af61d002 [interpreter] Ensure optimizations preserve source positions.
The optimization stages in the bytecode generation pipeline must
preserve source position information. Failure to preserve
source position information could result in single stepping
in the debugger misbehaving or mis-reporting in exception stack traces.

This change adds tests intended to check optimizations do not damage
source position info.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2042633002
Cr-Commit-Position: refs/heads/master@{#36855}
2016-06-09 12:04:38 +00:00
ishell
172ddf4250 [ic] Don't pollute per-map code cache with CompareIC stubs.
Given that
1) because of code flags mismatch we are not able to fetch any CompareIC stub that was put into the cache (we put MONOMORPHIC stubs but query only UNINITIALIZED ones),
2) it was already broken for a couple of years,
3) we will not need to cache any stub once CompareIC becomes vector-based.

Review-Url: https://codereview.chromium.org/2053583002
Cr-Commit-Position: refs/heads/master@{#36854}
2016-06-09 11:44:48 +00:00
ahaas
cd98c2c350 [tests] Remove prints in tail-call-megatest.js
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2045253006
Cr-Commit-Position: refs/heads/master@{#36853}
2016-06-09 11:38:37 +00:00
mstarzinger
206cf39851 [runtime] Deprecate RUNTIME_ASSERT from object ops.
This removes explicit uses of the RUNTIME_ASSERT macro from some runtime
methods. The implicit ones in CONVERT_FOO_ARG_CHECKED will be addressed
in a separate CL for all runtime modules at once.

R=bmeurer@chromium.org
BUG=v8:5066

Review-Url: https://codereview.chromium.org/2045193002
Cr-Commit-Position: refs/heads/master@{#36852}
2016-06-09 11:22:19 +00:00
mlippautz
f4e4fd7105 Reland of "heap] Fix Sweeper::IsSweepingCompleted"
This reverts commit 0bccf3e664.

R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2049063004
Cr-Commit-Position: refs/heads/master@{#36851}
2016-06-09 11:22:18 +00:00
mlippautz
0bccf3e664 Revert of [heap] Fix Sweeper::IsSweepingCompleted (patchset #1 id:1 of https://codereview.chromium.org/2047013004/ )
Reason for revert:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/10009

Original issue's description:
> [heap] Fix Sweeper::IsSweepingCompleted
>
> R=ulan@chromium.org
>
> Committed: https://crrev.com/b4475fff4fe1c423a3c8c3b072e09becd6b2f8ed
> Cr-Commit-Position: refs/heads/master@{#36845}

TBR=ulan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2053623002
Cr-Commit-Position: refs/heads/master@{#36850}
2016-06-09 10:28:49 +00:00
jkummerow
bf5f2b5998 [tools] Fix detect-builtins.js
- include non-default prototypes (useful for TypedArrays)
- print value of string/number properties (avoids endless recursion)

Review-Url: https://codereview.chromium.org/2048593004
Cr-Commit-Position: refs/heads/master@{#36849}
2016-06-09 10:17:32 +00:00
machenbach
6a5d769be2 [mb] Switch staging bot to gyp for testing purposes
This is to test the migration workflow. Will be reverted
afterwards.

BUG=chromium:616035
NOTRY=true
TBR=vogelheim@chromium.org, jochen@chromium.org

Review-Url: https://codereview.chromium.org/2056673002
Cr-Commit-Position: refs/heads/master@{#36848}
2016-06-09 10:06:14 +00:00
machenbach
6de74c782c [mb] Add mb config
This adds a minimal mb config to switch the v8 staging bot
to mb. External mb documentation:
https://chromium.googlesource.com/chromium/src/tools/mb/+/HEAD/docs/user_guide.md

After this is tested on the staging bot, mb configs for the
remaining bots will be provided and all bots will be
systematically switched.

BUG=chromium:616035
NOTRY=true

Review-Url: https://codereview.chromium.org/2024893002
Cr-Commit-Position: refs/heads/master@{#36847}
2016-06-09 09:12:54 +00:00
yangguo
d77963feea Add UseCounter for Date.parse's legacy parse heuristics.
R=adamk@chromium.org, jochen@chromium.org
BUG=chromium:618595

Review-Url: https://codereview.chromium.org/2050733004
Cr-Commit-Position: refs/heads/master@{#36846}
2016-06-09 09:09:59 +00:00
mlippautz
b4475fff4f [heap] Fix Sweeper::IsSweepingCompleted
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2047013004
Cr-Commit-Position: refs/heads/master@{#36845}
2016-06-09 09:03:20 +00:00
ishell
8b52429224 [stubs] Fixed PrimaryStubCache and SecondaryStubCache tests.
Now they use a proper way of checking if the snapshot is available or not.

Review-Url: https://codereview.chromium.org/2054693002
Cr-Commit-Position: refs/heads/master@{#36844}
2016-06-09 08:07:11 +00:00
jarin
546dd77ffc [stubs] StringToNumberStub --> StringToNumber builtin.
Since some builtins use StringToNumberStub (so the code is always there),
it makes more sense to have StringToNumber builtin.

Review-Url: https://codereview.chromium.org/2050853003
Cr-Commit-Position: refs/heads/master@{#36843}
2016-06-09 07:58:27 +00:00
danno
40b5c1d41f [turbofan] Add comments to CodeAssembler
Review-Url: https://codereview.chromium.org/2056503003
Cr-Commit-Position: refs/heads/master@{#36842}
2016-06-09 07:28:20 +00:00
bmeurer
fe561a7a18 Add LICENSE.fdlibm for all the fdlibm imported sources.
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2054543003
Cr-Commit-Position: refs/heads/master@{#36841}
2016-06-09 07:17:03 +00:00
bmeurer
eb1c9e2723 [es6] Fix prototype chain walk for instanceof.
When walking up the prototype chain during OrdinaryHasInstance, we first
check if the current prototype equals the expected one, and only
afterwards check the current prototype against null. That's obviously
wrong if we check something like Proxy, whose prototype is null.

R=yangguo@chromium.org
BUG=v8:5085

Review-Url: https://codereview.chromium.org/2041103007
Cr-Commit-Position: refs/heads/master@{#36840}
2016-06-09 06:26:03 +00:00
jarin
f2312019af [turbofan] Introduce CheckIf node (deopt without explicit frame state).
Type feedback introduced DeoptimizeIf node in representation inference
(for Int32AddWithOverflow); we found the frame state for the deopt by
walking the effect chain. Unfortunately, the effect chain can hit
effect merges introduced by simplified lowering (e.g., in LoadBuffer)
and thus fail the assertion (we refuse to go through effect phis).

This CL postpones assignment of the frame state to the effect-control
lninearizer, so that we can correctly propagate the frame state to
the deopt point. The DeoptimizeIf node with unassigned frame state is
called CheckIf.

BUG=

Review-Url: https://codereview.chromium.org/2050813003
Cr-Commit-Position: refs/heads/master@{#36839}
2016-06-09 05:41:23 +00:00
alph
81c8ce723a Remove dependencies of V8 on cpu-profiler is_profiling.
Move is_profiling to the isolate for now.

BUG=v8:4789

Review-Url: https://codereview.chromium.org/2040683002
Cr-Commit-Position: refs/heads/master@{#36838}
2016-06-09 05:25:09 +00:00
v8-autoroll
a1b80d6801 Update V8 DEPS.
Rolling v8/build to 4842479bd8da7b9e5eb027f8c15bee533f9c328f

Rolling v8/buildtools to 099f1da55bfe8caa12266371a7eb983698fb1d87

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

Review-Url: https://codereview.chromium.org/2056613002
Cr-Commit-Position: refs/heads/master@{#36837}
2016-06-09 03:22:26 +00:00
alph
2f863593d1 Move stack trace extraction code out of TickSample::Init
Make it a part of V8 API GetStackSample function.
Also expose external_callback_entry in SampleInfo to break dependency
of clients on internal V8 structures.

BUG=v8:4789

Committed: https://crrev.com/70acfe39c07322144f5fe9b40bb584a8b1099ffd
Review-Url: https://codereview.chromium.org/2007343003
Cr-Original-Commit-Position: refs/heads/master@{#36831}
Cr-Commit-Position: refs/heads/master@{#36836}
2016-06-08 21:36:57 +00:00
alph
9ac4a6efa9 Revert of Move stack trace extraction code out of TickSample::Init (patchset #1 id:1 of https://codereview.chromium.org/2007343003/ )
Reason for revert:
Make MSAN arm bot flaky

Original issue's description:
> Move stack trace extraction code out of TickSample::Init
>
> Make it a part of V8 API GetStackSample function.
> Also expose external_callback_entry in SampleInfo to break dependency
> of clients on internal V8 structures.
>
> BUG=v8:4789
>
> Committed: https://crrev.com/70acfe39c07322144f5fe9b40bb584a8b1099ffd
> Cr-Commit-Position: refs/heads/master@{#36831}

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

Review-Url: https://codereview.chromium.org/2049903002
Cr-Commit-Position: refs/heads/master@{#36835}
2016-06-08 19:48:31 +00:00
mtrofin
88a92c47f8 Use standard datastructures for tracking constant pool entries.
This improves maintainability. The Compile and Wasm benchmarks,
tracking compile time, show no regression.

BUG=

Review-Url: https://codereview.chromium.org/2044283003
Cr-Commit-Position: refs/heads/master@{#36834}
2016-06-08 19:35:57 +00:00
balazs.kilvady
bf6ae33845 MIPS: Fix 'Fix Turbofan: Modify WASM linkage to store floats using only 4 bytes.'
Port b9ded4ce9c

BUG=
TEST=cctest/test-run-native-calls/Float32Select_stack_params_return_reg,
cctest/test-run-native-calls/MixedParams_2, cctest/test-run-native-calls/MixedParams_3

Review-Url: https://codereview.chromium.org/2043743005
Cr-Commit-Position: refs/heads/master@{#36833}
2016-06-08 15:57:30 +00:00
mstarzinger
ed90142fc2 [turbofan] Limit use of FrameStateBeforeAndAfter helper.
This limits the use of the aforementioned helper class to only binary
and compare operations. These are the only operatins left that require
two frame state inputs on the same node.

R=jarin@chromium.org
BUG=v8:5021

Review-Url: https://codereview.chromium.org/2050673002
Cr-Commit-Position: refs/heads/master@{#36832}
2016-06-08 15:39:23 +00:00
alph
70acfe39c0 Move stack trace extraction code out of TickSample::Init
Make it a part of V8 API GetStackSample function.
Also expose external_callback_entry in SampleInfo to break dependency
of clients on internal V8 structures.

BUG=v8:4789

Review-Url: https://codereview.chromium.org/2007343003
Cr-Commit-Position: refs/heads/master@{#36831}
2016-06-08 15:36:18 +00:00
machenbach
c4fab3ec25 [build] Use sysroot for linux compilation with clang
This ports the configuration for using a sysroot from
chromium's common.gypi.

This is restricted to clang only.

BUG=chromium:474921, chromium:616032
LOG=y

Committed: https://crrev.com/c47d3c63695d2999752f5fc61ff171f3ff100553
Review-Url: https://codereview.chromium.org/2028623002
Cr-Original-Commit-Position: refs/heads/master@{#36729}
Cr-Commit-Position: refs/heads/master@{#36830}
2016-06-08 15:27:59 +00:00
mstarzinger
2822d2df40 [turbofan] Remove threading of FrameStateBeforeAndAfter.
This removes the by now obsolete threading of the helper class attaching
two frame states (before and after) to a given node. This helper is no
longer required for variable loads and stores.

R=jarin@chromium.org
BUG=v8:5021

Review-Url: https://codereview.chromium.org/2051443003
Cr-Commit-Position: refs/heads/master@{#36829}
2016-06-08 14:55:47 +00:00
jkummerow
be0494ba5b Keep prototype maps in dictionary mode until ICs see them
Adding properties to prototypes is faster when we don't force their
maps into fast mode yet. Once a prototype shows up in the IC system,
its setup phase is likely over, and it makes sense to transition it
to fast properties.
This patch speeds up the microbenchmark in the bug by 20x.
Octane-Typescript sees a 3% improvement.

BUG=chromium:607010

Review-Url: https://codereview.chromium.org/2036493006
Cr-Commit-Position: refs/heads/master@{#36828}
2016-06-08 14:43:47 +00:00
jochen
490131987e Remove deprecated access check callbacks
BUG=chromium:618305
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2045273002
Cr-Commit-Position: refs/heads/master@{#36827}
2016-06-08 14:43:46 +00:00
machenbach
0d4983fbb8 [build] Ensure target_arch is set correctly in toplevel Makefile
This sets the target_arch for simulator builds.

Fix needed for https://codereview.chromium.org/2028623002/

BUG=chromium:616032
NOTRY=true

Review-Url: https://codereview.chromium.org/2045173003
Cr-Commit-Position: refs/heads/master@{#36826}
2016-06-08 13:54:13 +00:00
verwaest
7f7918d373 Only mark 'recompute' after fetching the handler from the nexus
BUG=

Review-Url: https://codereview.chromium.org/2040393003
Cr-Commit-Position: refs/heads/master@{#36825}
2016-06-08 13:43:00 +00:00
bgeron
b6a15350b2 [turbofan] add more comments to compiler/graph-visualizer.cc.
BUG=

Review-Url: https://codereview.chromium.org/2040243002
Cr-Commit-Position: refs/heads/master@{#36824}
2016-06-08 12:31:24 +00:00
machenbach
cec0ed0f77 [icu] Support loading data file from default location
This allows using icu data, bundled in the icudtl.dat file,
to be loaded automatically from a default location
side-by-side with the executable.

The v8 stand-alone default is still to use statically
linked ICU data, but this will be switched in a separate
follow-up CL.

BUG=chromium:616033
LOG=y

Review-Url: https://codereview.chromium.org/2042253002
Cr-Commit-Position: refs/heads/master@{#36823}
2016-06-08 12:11:34 +00:00
neis
ea139c5b4a Run more tests with --ignition-generators.
Also, make %GeneratorGetSourcePosition fail if called on a suspended Ignition generator
(rather than return nonsense).  This functionality is currently not implemented.

BUG=v8:4907

Review-Url: https://codereview.chromium.org/2049663002
Cr-Commit-Position: refs/heads/master@{#36822}
2016-06-08 11:59:54 +00:00
cbruni
c8e286c918 [--trace-ic] Print map pointer value too
This might help with some further investigations when using the IC-Explorer.

BUG=

Review-Url: https://codereview.chromium.org/2046943003
Cr-Commit-Position: refs/heads/master@{#36821}
2016-06-08 11:47:22 +00:00
Toon Verwaest
e8b10cec4c Merge FastPathFailed reasons to avoid deoptimizer reason overflow
BUG=
R=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#36820}
2016-06-08 11:11:08 +00:00
verwaest
58f753bf33 Always mark contextual ICs as 'recompute'
Now that we track feedback per realm, this kind of IC is always guaranteed to be an update to the object structure.

BUG=

Review-Url: https://codereview.chromium.org/2040363003
Cr-Commit-Position: refs/heads/master@{#36819}
2016-06-08 10:12:17 +00:00
yangguo
7c3cad2d14 [crankshaft] do not sign-extend int32 immediate in DoMathMinMax.
R=bmeurer@chromium.org
BUG=chromium:495493

Review-Url: https://codereview.chromium.org/2044353002
Cr-Commit-Position: refs/heads/master@{#36818}
2016-06-08 10:12:16 +00:00
verwaest
520a214b88 Turn Function.prototype.bind into a hydrogen stub optimized for the common case
This speeds up .bind by >10x as measured by
function f(a,b,c) {}

for (var i = 0; i < 10000000; i++) {
  f.bind(1); // or more arguments.
}

(Uses hydrogen-stubs rather than TF due to var-args + possible runtime fallback, which is still unsupported in TF.)

BUG=

Review-Url: https://codereview.chromium.org/2044113002
Cr-Commit-Position: refs/heads/master@{#36817}
2016-06-08 09:46:14 +00:00
mstarzinger
c1693f8abc Remove workaround for borked sem_init library function.
This workaround had been added because sanitizer interceptors were
linking against an old version of GLIBC. The respective sanitizers
within LLVM have by now be fixed, workaround can be removed.

The original workaround: https://codereview.chromium.org/1407463002

R=machenbach@chromium.org
BUG=chromium:536813

Review-Url: https://codereview.chromium.org/2045993003
Cr-Commit-Position: refs/heads/master@{#36816}
2016-06-08 09:34:58 +00:00
mstarzinger
8e02f47ea1 [runtime] Deprecate RUNTIME_ASSERT from primitive ops.
This removes explicit uses of the RUNTIME_ASSERT macro from some runtime
methods. The implicit ones in CONVERT_FOO_ARG_CHECKED will be addressed
in a separate CL for all runtime modules at once.

R=verwaest@chromium.org
BUG=v8:5066

Review-Url: https://codereview.chromium.org/2041353003
Cr-Commit-Position: refs/heads/master@{#36815}
2016-06-08 09:29:27 +00:00