Commit Graph

36384 Commits

Author SHA1 Message Date
cbruni
d4493222b9 [crankshaft] Fix IsClassOfTest helper method
Drive-by-fix: Add AstNode::Print() and improve printing of CallRuntime
              Expression.

BUG=v8:5749

Review-Url: https://codereview.chromium.org/2586933002
Cr-Commit-Position: refs/heads/master@{#41792}
2016-12-19 10:45:48 +00:00
yangguo
1296dd1f5a [debug-wrapper] remove last uses of --expose-debug-as
The inspector cannot deal with breaking inside of debug-evaluate.
There is therefore no point in supporting that in the debugger.
The optional additional context parameter for debug-evaluate also
can be removed since it's not being used.

R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2580323002
Cr-Commit-Position: refs/heads/master@{#41791}
2016-12-19 10:44:34 +00:00
titzer
b29d6d4968 [turbofan] Pass Runtime::FunctionId to TrapIf and TrapUnless isel methods.
This also fixes UBSAN failures due to improper OpParameter<> calls.

R=machenbach@chromium.org, clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2587763003
Cr-Commit-Position: refs/heads/master@{#41790}
2016-12-19 10:41:53 +00:00
machenbach
e669816e1f [foozzie] Initial correctness fuzzer harness.
Initial version of the correctness fuzzer harness for manual testing
and experiments.

For automated usage, some outstanding TODOs are left in the code. E.g.
- Hash source file names in error case
- Bundle script in out directory with executables
- Some suppressions are tied to already fixed bugs. We'll keep it like that for now to test
removing those suppressions in production later.

BUG=chromium:673246
NOTRY=true

Review-Url: https://codereview.chromium.org/2578503003
Cr-Commit-Position: refs/heads/master@{#41789}
2016-12-19 10:13:48 +00:00
henrique.ferreiro
815f91c0ed [es6] Perform the IsConstructor test in GetSuperConstructor.
This is so that a NotSuperConstructor error is thrown before evaluating the
arguments to the super constructor. Besides updating the runtime function, a
new bytecode GetSuperConstructor is introduced.

BUG=v8:5336

Review-Url: https://codereview.chromium.org/2504553003
Cr-Commit-Position: refs/heads/master@{#41788}
2016-12-19 10:12:22 +00:00
marja
b695c38842 Preparsing inner funcs: declare arguments for preparsed scopes
This makes maybe_assigned correct (instead of being overly pessimistic
in the following case):

function f() { function g() { arguments; }; }

(Tests upcoming as part of https://codereview.chromium.org/2580833005 )

BUG=v8:5501, v8:5678
R=verwaest@chromium.org, neis@chromium.org

Review-Url: https://codereview.chromium.org/2579303002
Cr-Commit-Position: refs/heads/master@{#41787}
2016-12-19 09:47:06 +00:00
vegorov
f63f64ca1f Fix positions printing in compiler/graph-visualizer.cc.
We are printing `inlining(...), pos:offset` where we should print `pos:inlining(...), offset`.

BUG=

Review-Url: https://codereview.chromium.org/2586823002
Cr-Commit-Position: refs/heads/master@{#41786}
2016-12-19 08:34:27 +00:00
yangguo
06ea4a2ca9 Add some more top-level OWNERS.
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2584373002
Cr-Commit-Position: refs/heads/master@{#41785}
2016-12-19 08:09:25 +00:00
v8-autoroll
d047c4ba59 Update V8 DEPS.
Rolling v8/buildtools: 55ad626..0ef8010

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

Review-Url: https://codereview.chromium.org/2587853002
Cr-Commit-Position: refs/heads/master@{#41784}
2016-12-19 04:20:08 +00:00
kozyatinskiy
c42915f02d [inspector] introduce limit for amount of stored async stacks
BUG=v8:5738
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2579403002
Cr-Commit-Position: refs/heads/master@{#41783}
2016-12-18 17:04:40 +00:00
v8-autoroll
083a5dcdfe Update V8 DEPS.
Rolling v8/build: d39391f..29ac3ae

Rolling v8/third_party/catapult: 42ba4df..4fc1816

Rolling v8/tools/clang: 4ffe7c4..fe25d46

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

Review-Url: https://codereview.chromium.org/2587693002
Cr-Commit-Position: refs/heads/master@{#41782}
2016-12-18 04:32:52 +00:00
bbudge
431223f34f [ARM] Add NEON instructions for implementing SIMD.
- Adds vabs, vneg, vmul, vext, vzip, vrev instructions.
- Adds Swizzle function to macro assembler.
- Simplifies if-else logic in disassembler, simulator, for Neon special.
- Some refactoring of Neon assembler, macro-assembler tests.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2579913002
Cr-Commit-Position: refs/heads/master@{#41781}
2016-12-17 21:56:26 +00:00
ahaas
01a2160600 [x64] Remove dead code in code-generator-x64.cc:AssembleArchBranch.
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2576153003
Cr-Commit-Position: refs/heads/master@{#41780}
2016-12-17 14:49:47 +00:00
v8-autoroll
d4330dc60e Update V8 DEPS.
Rolling v8/build: 3983535..d39391f

Rolling v8/third_party/catapult: eb5390d..42ba4df

Rolling v8/tools/clang: 286099f..4ffe7c4

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

Review-Url: https://codereview.chromium.org/2589453002
Cr-Commit-Position: refs/heads/master@{#41779}
2016-12-17 04:30:25 +00:00
mtrofin
9564d803ea Move register allocation unittests and constrain owners
There are subtle test expectations/nuances that are easy to break.

BUG=

Review-Url: https://codereview.chromium.org/2585583006
Cr-Commit-Position: refs/heads/master@{#41778}
2016-12-17 00:24:36 +00:00
mtrofin
8e833623e9 Revert of MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. (patchset #3 id:40001 of https://codereview.chromium.org/2433093002/ )
Reason for revert:
This change rendered InstructionSequenceTest::SetNumRegs ineffectual, thus
loosening the tests that were using that API to ensure correct register
allocation under intentionally constrained setups.

For the problem stated in this CL, a solution needs to continue supporting the
intentionally set-up test configuration.

Original issue's description:
> MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests.
>
> Test InstructionSequenceTest has been initialized with a testing RegisterConfiguration
> instance defined in instruction-sequence-unittest.h, whereas class ExplicitOperand which
> is being tested used RegisterConfiguration from instruction.cc. In case these two
> instances are different, the tests would fail. The issue is fixed by using the same
> instance of RegisterConfiguration both for test code and code under test.
>
> Additionally, the tests in register-allocator-unittest.cc use hardcoded values
> for register and begin failing is the hardcoded register is not available for
> allocation. Fix by forcing the use of allocatable registers only.
>
> TEST=unittests.MoveOptimizerTest.RemovesRedundantExplicit,unittests.RegisterAllocatorTest.SpillPhi
> BUG=
>
> Committed: https://crrev.com/0cf56232209d4c9c669b8426680de18806f6c29a
> Cr-Commit-Position: refs/heads/master@{#40862}

TBR=dcarney@chromium.org,bmeurer@chromium.org,mstarzinger@chromium.org,vogelheim@chromium.org,titzer@chromium.org,ivica.bogosavljevic@imgtec.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2587593002
Cr-Commit-Position: refs/heads/master@{#41777}
2016-12-16 23:09:34 +00:00
littledan
61833f5b9a Remove class fields desugaring
This patch removes parser code implementing desugaring for ESnext
public and private fields on classes. The desugaring should probably
be implemented in the interpreter instead, and more work needs to go
into optimization and debugger support. The actual parsing of class
fields is left in, as the syntax is relatively stable, and there are
strong cctests for the grammar.

R=marja
BUG=v8:5367

Review-Url: https://codereview.chromium.org/2578893005
Cr-Commit-Position: refs/heads/master@{#41776}
2016-12-16 19:52:27 +00:00
gsathya
b1c148b91f [promisehook] Implement PromiseHook
This adds kInit, kResolve, kBefore and kAfter lifecycle hooks to promises.

This also exposes an API to set the PromiseHook.

BUG=v8:4643

Review-Url: https://codereview.chromium.org/2575313002
Cr-Commit-Position: refs/heads/master@{#41775}
2016-12-16 19:17:16 +00:00
ahaas
ca8d3ba718 [wasm] TrapIf and TrapUnless TurboFan operators implemented on arm.
Original commit message:
[wasm] Introduce the TrapIf and TrapUnless operators to generate trap code.

Some instructions in WebAssembly trap for some inputs, which means that the
execution is terminated and (at least at the moment) a JavaScript exception is
thrown. Examples for traps are out-of-bounds memory accesses, or integer
divisions by zero.

Without the TrapIf and TrapUnless operators trap check in WebAssembly introduces 5
TurboFan nodes (branch, if_true, if_false, trap-reason constant, trap-position
constant), in addition to the trap condition itself. Additionally, each
WebAssembly function has four TurboFan nodes (merge, effect_phi, 2 phis) whose
number of inputs is linear to the number of trap checks in the function.
Especially for functions with high numbers of trap checks we observe a
significant slowdown in compilation time, down to 0.22 MiB/s in the sqlite
benchmark instead of the average of 3 MiB/s in other benchmarks. By introducing
a TrapIf common operator only a single node is necessary per trap check, in
addition to the trap condition. Also the nodes which are shared between trap
checks (merge, effect_phi, 2 phis) would disappear. First measurements suggest a
speedup of 30-50% on average.

This CL only implements TrapIf and TrapUnless on x64. The implementation is also
hidden behind the --wasm-trap-if flag.

Please take a special look at how the source position is transfered from the
instruction selector to the code generator, and at the context that is used for
the runtime call.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com

Review-Url: https://codereview.chromium.org/2584603002
Cr-Commit-Position: refs/heads/master@{#41774}
2016-12-16 17:16:44 +00:00
ulan
7bdb906946 [heap] Reland "Use RAIL mode for initial heap sizing".
The original patch was reverted because of performance
regressions caused by removal of old heap sizing heuristics.

This patch keeps the old heuristics and adds RAIL mode.

BUG=chromium:613518

Review-Url: https://codereview.chromium.org/2576543002
Cr-Commit-Position: refs/heads/master@{#41773}
2016-12-16 16:59:44 +00:00
tandrii
b2b5d0ab5b CQ config: remove unused hide_ref_in_committed_msg.
This has been superseeded by just-in-time determination based on state
of gnumbd and git-numberer validation.

BUG=chromium:644915
R=machenbach@chromium.org,sergiyb@chromium.org
NOTRY=True

Review-Url: https://codereview.chromium.org/2583703004
Cr-Commit-Position: refs/heads/master@{#41772}
2016-12-16 16:41:36 +00:00
mattloring
081fce326f ThreadTicks::Now support for Solaris
BUG=v8:5739

Review-Url: https://codereview.chromium.org/2576903004
Cr-Commit-Position: refs/heads/master@{#41771}
2016-12-16 16:01:30 +00:00
gsathya
3f5a60ac17 [promises] Use TF_BUILTIN
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2583753002
Cr-Commit-Position: refs/heads/master@{#41770}
2016-12-16 15:53:43 +00:00
clemensh
8341b8baf4 [wasm] Fix nondeterministic Win64 failures
E.g.
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20debug/builds/14083/steps/Check/logs/RunWasmCompiledWithTr..

This also reverts CL http://crrev.com/2584833002 which
disabled the tests on windows.

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

Review-Url: https://codereview.chromium.org/2579213004
Cr-Commit-Position: refs/heads/master@{#41769}
2016-12-16 15:32:09 +00:00
mythria
74ccda64dc [Interpreter] Transform StrictEquality with null/undefined to special bytecodes.
Transform LdaNull/LdaUndefined followed by StrictEquality to TestNull/TestUndefined.
This would avoid a call to the compare IC. In the bytecode-graph builder these are
mapped to StrictEqual javascript operator. When reducing this operator, we already
optimize the cases for null/undefined.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2554723004
Cr-Commit-Position: refs/heads/master@{#41768}
2016-12-16 15:01:08 +00:00
jochen
692ba84f4f Use idle time to make progress on scheduled compilation jobs
BUG=v8:5215
R=rmcilroy@chromium.org,marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2573493002
Cr-Commit-Position: refs/heads/master@{#41767}
2016-12-16 14:40:32 +00:00
cbruni
c0d6939836 [runtime] Improve Object::ToNumber, ToInteger, ToInt32, ToUint32, ToString
This CL adds inlineable fast-cases for the above conversion functions in
objects-inl.h and a slower conversion function in objects.cc.

BUG=

Review-Url: https://codereview.chromium.org/2579023002
Cr-Commit-Position: refs/heads/master@{#41766}
2016-12-16 14:30:05 +00:00
yangguo
bcb73f6219 [inspector] add scope type for modules.
R=jgruber@chromium.org, kozyatinskiy@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2568083002
Cr-Commit-Position: refs/heads/master@{#41765}
2016-12-16 14:28:56 +00:00
rossberg
16fe426320 Implement LinkError; import tweaks
- Implement new WebAssembly.LinkError exception
- Implement stricter checks for glboal imports
- Add tests
- Refactor handling of import names
- Add TODOs for empty import names

R=titzer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2584843002
Cr-Commit-Position: refs/heads/master@{#41764}
2016-12-16 14:23:35 +00:00
clemensh
bb76432fde [wasm] Disable trap-if test on windows for now
It's failing nondeterministically.
Disable trap-if tests on windows until this issue is fixed.

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

Review-Url: https://codereview.chromium.org/2584833002
Cr-Commit-Position: refs/heads/master@{#41763}
2016-12-16 14:20:13 +00:00
marja
f37d726435 PreParsing inner functions: Make inner functions less lazy.
Especially, make non-declaration type inner functions eagerly
parsed. Then we still have a chance to compile them eagerly if we see ()
after the function.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2583843002
Cr-Commit-Position: refs/heads/master@{#41762}
2016-12-16 13:34:30 +00:00
yangguo
d2d6da0354 [serializer] add test for snapshotting cached accessor property.
R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2582623003
Cr-Commit-Position: refs/heads/master@{#41761}
2016-12-16 13:25:19 +00:00
cbruni
89f159b042 [runtime] Port simple String.prototype.indexOf cases to TF Builtin
Many websites use simple calls to String.prototype.indexOf with either a
one character ASCII needle or needles bigger than the search string. This
CL adds a TFJ builtin for these simple cases, giving up to factor 5 speedup.

Drive-by-fix: Add default Object type to Arguments.at

BUG=

Review-Url: https://codereview.chromium.org/2539093002
Cr-Commit-Position: refs/heads/master@{#41760}
2016-12-16 13:24:07 +00:00
ishell
63279611b2 [interpreter] Avoid allocation of temporary array of Nodes when generating dispatch to bytecode handler.
BUG=

Review-Url: https://codereview.chromium.org/2576213007
Cr-Commit-Position: refs/heads/master@{#41759}
2016-12-16 12:58:19 +00:00
vegorov
686d8c8685 Move TraceInlinedFunction from Hydrogen graph builder to internal::CodeGenerator.
This allows to share source dumping infrastructure between CS and TF and opens a possibility for external tools like IRHydra to perform deoptimization to source mapping for TF generated code based on --trace-deopt --print-opt-code --code-comments output.

This CL also restores an old TraceInlinedFunction behavior which was lost during source positions refactoring - originally TraceInlinedFunction dumped source code only once per-SFI to avoid large traces whenever some helper function is inlined multiple times.

This CL also adds --print-opt-source flag that would in the future replace obsolete --hydrogen-track-positions.

BUG=

Review-Url: https://codereview.chromium.org/2575703003
Cr-Commit-Position: refs/heads/master@{#41758}
2016-12-16 12:57:10 +00:00
verwaest
3238b337c7 [builtins] Compare sloppy arguments length with the correct backing store length
BUG=

Review-Url: https://codereview.chromium.org/2579983002
Cr-Commit-Position: refs/heads/master@{#41757}
2016-12-16 12:41:47 +00:00
yangguo
55e8c2e4d3 [serializer] allocate global proxy with the expected size.
If a context snapshot includes the global proxy constructor function, we
expect the incoming global proxy to have the correct instance size so
that we can reinitialize it with said constructor. However, when the
bootstrapper allocates a new global proxy, we need to know the expected
size.

We solve this by storing the size on the to-be-serialized isolate.

R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2585693002
Cr-Commit-Position: refs/heads/master@{#41756}
2016-12-16 12:40:38 +00:00
ishell
a492ab3819 [turbofan] Combine family of TailCallStub() methods into single implementation.
.. by using variadic templates in CodeAssembler.

BUG=

Review-Url: https://codereview.chromium.org/2584743003
Cr-Commit-Position: refs/heads/master@{#41755}
2016-12-16 12:39:27 +00:00
jochen
87bf033799 Don't compile inner functions when compiling via the dispatcher
BUG=v8:5394
R=mstarzinger@chromium.org,rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2579973002
Cr-Commit-Position: refs/heads/master@{#41754}
2016-12-16 12:38:17 +00:00
ishell
01408ea653 [turbofan] Combine family of CallJS() methods into single implementation.
... by using variadic templates in CodeAssembler.

BUG=

Review-Url: https://codereview.chromium.org/2579163003
Cr-Commit-Position: refs/heads/master@{#41753}
2016-12-16 11:34:48 +00:00
mstarzinger
92b370ee64 Introduce {ConstantElementsPair} struct for type safety.
This introduces an explicit struct for the communication channel between
the {ArrayLiteral} AST node and the corresponding runtime methods. Those
methods take a pair of {ElementsKind} as well as an array (can either be
a FixedArray or a FixedDoubleArray) of constant values.

For bonus points it also reduces the size of the involved heap object by
one word (i.e. length field of FixedArray not needed anymore).

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2581683003
Cr-Commit-Position: refs/heads/master@{#41752}
2016-12-16 10:57:06 +00:00
rmcilroy
cb9d0fe7f4 [Complier] Only optimize a function marked for tier-up if it is compiled.
When mark-shared-funtion-for-tier-up is enabled, a function could be marked for
optimization, then the baseline (FCG) code is flushed by the GC. The next time
the function is executed, we shouldn't optimize the code if there isn't
baseline code.

BUG=chromium:673242

Review-Url: https://codereview.chromium.org/2575333003
Cr-Commit-Position: refs/heads/master@{#41751}
2016-12-16 10:44:50 +00:00
ishell
d4a7c4bf66 [turbofan] Remove arguments order independent versions of [Tail]CallStub() from CodeAssembler.
... as they are no longer needed.

BUG=

Review-Url: https://codereview.chromium.org/2582593005
Cr-Commit-Position: refs/heads/master@{#41750}
2016-12-16 10:43:41 +00:00
ishell
6eeab12414 [turbofan] Combine family of CallStub() methods into single implementation.
.. by using variadic templates in CodeAssembler.

BUG=

Review-Url: https://codereview.chromium.org/2577913003
Cr-Commit-Position: refs/heads/master@{#41749}
2016-12-16 10:40:16 +00:00
jarin
c5ea51259c Revert of [turbofan] Remove value numbering from late optimization pass. (patchset #1 id:1 of https://codereview.chromium.org/2570813002/ )
Reason for revert:
Tanks Kraken astar benchmark.

Original issue's description:
> [turbofan] Remove value numbering from late optimization pass.
>
> Committed: https://crrev.com/e32535af5a5f4776a58ef434ea77d56528ded427
> Cr-Commit-Position: refs/heads/master@{#41672}

TBR=bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2579273002
Cr-Commit-Position: refs/heads/master@{#41748}
2016-12-16 10:20:46 +00:00
clemensh
6709edd7f6 [wasm] Make WasmRunner the central test structure
The WasmRunner now always holds a TestingModule, and allows to add
several functions to it. The prepares a change to always run wasm code
with a full module behind it, removing the special handling for "no wasm
instance" at runtime (http://crrev.com/2551053002).
This CL here also templatizes the WasmRunner such that the Call method must
be called with the same signature specified for the WasmRunner. This
already catched several mismatches there.

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

Review-Url: https://codereview.chromium.org/2551043002
Cr-Original-Commit-Position: refs/heads/master@{#41728}
Committed: 2ff5906231
Review-Url: https://codereview.chromium.org/2551043002
Cr-Commit-Position: refs/heads/master@{#41747}
2016-12-16 10:13:11 +00:00
ishell
4bd0cbdd5f [turbofan] Combine family of TailCallRuntime() methods into single implementation.
.. by using variadic templates in CodeAssembler.

BUG=

Review-Url: https://codereview.chromium.org/2577013003
Cr-Commit-Position: refs/heads/master@{#41746}
2016-12-16 09:58:51 +00:00
neis
e3ad4f131b [modules] Remove @@iterator on namespace objects.
TC39 decided at their last meeting to remove this feature.

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

Review-Url: https://codereview.chromium.org/2578053003
Cr-Commit-Position: refs/heads/master@{#41745}
2016-12-16 08:57:29 +00:00
machenbach
6932ea5904 Revert of Disallow passing a SharedArrayBuffer in the transfer list. (patchset #4 id:60001 of https://codereview.chromium.org/2570433005/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/12098

See:
https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> Disallow passing a SharedArrayBuffer in the transfer list.
>
> This behavior changed recently. SharedArrayBuffers should not be put in the
> transfer list, because they are not detached, and that is the meaning of being
> in the transfer list.
>
> This is the V8 side of the change, the Blink side will come next.
>
> Review-Url: https://codereview.chromium.org/2570433005
> Cr-Commit-Position: refs/heads/master@{#41740}
> Committed: 1c5e1504e0

TBR=jbroman@chromium.org,jkummerow@chromium.org,binji@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/2579963002
Cr-Commit-Position: refs/heads/master@{#41744}
2016-12-16 07:34:40 +00:00
mtrofin
93e53da4c8 [wasm] simpler detection if we compiled asm-wasm
BUG=643595

Review-Url: https://codereview.chromium.org/2582583002
Cr-Original-Commit-Position: refs/heads/master@{#41738}
Committed: cb433bed0b
Review-Url: https://codereview.chromium.org/2582583002
Cr-Commit-Position: refs/heads/master@{#41743}
2016-12-16 06:13:30 +00:00