Commit Graph

36309 Commits

Author SHA1 Message Date
titzer
b6a57e6ff5 [wasm] Add js-api test and fix property details for some functions.
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2585193004
Cr-Commit-Position: refs/heads/master@{#41817}
2016-12-19 17:19:56 +00:00
gsathya
81f765718e [builtins] move PromiseBuiltinsAssembler to it's own header file
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2585133002
Cr-Commit-Position: refs/heads/master@{#41816}
2016-12-19 17:14:36 +00:00
hpayer
dc03ed5811 [heap] Turn on black allocation.
BUG=

Review-Url: https://codereview.chromium.org/2589853002
Cr-Commit-Position: refs/heads/master@{#41815}
2016-12-19 17:09:56 +00:00
hpayer
9997530df2 [heap] Make aligned allocations in black areas completely black.
BUG=

Review-Url: https://codereview.chromium.org/2591433002
Cr-Commit-Position: refs/heads/master@{#41814}
2016-12-19 16:37:23 +00:00
jkummerow
9fcceeb176 [cleanup] Drop unused Allocate*String MacroAssembler instructions
Review-Url: https://codereview.chromium.org/2580653002
Cr-Commit-Position: refs/heads/master@{#41813}
2016-12-19 16:36:13 +00:00
franzih
86eafdd4c0 Add CreateDataPropertyInLiteralFlags.
Encode the PropertyAttribute and whether the function
names must be set as a flag instead of setting two registers.

BUG=v8:5624

Review-Url: https://codereview.chromium.org/2586463002
Cr-Commit-Position: refs/heads/master@{#41812}
2016-12-19 16:30:36 +00:00
hpayer
1c763e004c [heap] Explicitly clear mark bits when writing filler for left and right trimming.
Since left and right trimming may install a lot of one pointer filler maps, it may still make sense to clear the freed-up black area to speed up sweeping.

BUG=

Review-Url: https://codereview.chromium.org/2578233003
Cr-Commit-Position: refs/heads/master@{#41811}
2016-12-19 16:06:58 +00:00
mvstanton
0d4b990497 CompilerDispatcher unittest should use is_compiled() predicate.
BUG=v8:5759
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2588743003
Cr-Commit-Position: refs/heads/master@{#41810}
2016-12-19 15:41:04 +00:00
clemensh
21a85c4a03 [wasm] Always provide a wasm instance object at runtime
When executing wasm code for testing, we did not create a
WasmInstanceObject and link it to the generated code. This required
some special handling at runtime (mainly for stack trace generation).
This CL always provides the WasmInstanceObject, such that e.g. function
names can be resolved the usual way.
The module bytes referenced by the WasmCompiledModule linked with the
WasmInstanceObject do not hold a valid wasm module yet. Instead, we
just add the bytes we need, and make the objects in WasmModule point to
those bytes (currently only used for function names). Those bytes will
not be parsed at runtime anyway.

R=titzer@chromium.org
CC=jgruber@chromium.org
BUG=v8:5620

Review-Url: https://codereview.chromium.org/2551053002
Cr-Commit-Position: refs/heads/master@{#41809}
2016-12-19 15:03:13 +00:00
titzer
34d2402a0b [wasm] Adjust limits for WASM binary entities.
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2587003002
Cr-Commit-Position: refs/heads/master@{#41808}
2016-12-19 14:20:00 +00:00
yangguo
d5566b9e77 [inspector] gracefully handle stack overflows in the inspector.
Hopefully we can avoid going through JS at all, so we can avoid this issue.

R=jgruber@chromium.org, kozyatinskiy@chromium.org
BUG=v8:5654

Review-Url: https://codereview.chromium.org/2510093002
Cr-Original-Commit-Position: refs/heads/master@{#41802}
Committed: 3ab3b6261a
Review-Url: https://codereview.chromium.org/2510093002
Cr-Commit-Position: refs/heads/master@{#41807}
2016-12-19 14:07:55 +00:00
machenbach
2c2d0e5036 Revert of [profiler] fix memory leak for code entries for runtime callstats. (patchset #1 id:1 of https://codereview.chromium.org/2586923002/ )
Reason for revert:
Looks like the layout tests want these leaks:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/12151

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

Original issue's description:
> [profiler] fix memory leak for code entries for runtime callstats.
>
> Track allocated code entries and delete at the end. This is what we
> do in ProfileListener too.
>
> R=alph@chromium.org, cbruni@chromium.org
> BUG=v8:5753
>
> Review-Url: https://codereview.chromium.org/2586923002
> Cr-Commit-Position: refs/heads/master@{#41793}
> Committed: d0bb789f03

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

Review-Url: https://codereview.chromium.org/2590483002
Cr-Commit-Position: refs/heads/master@{#41806}
2016-12-19 13:49:38 +00:00
yangguo
a680b260ed Revert of [inspector] gracefully handle stack overflows in the inspector. (patchset #13 id:240001 of https://codereview.chromium.org/2510093002/ )
Reason for revert:
asan failure: https://build.chromium.org/p/client.v8/builders/V8%20Mac64%20ASAN/builds/10047/steps/Ignition%20-%20turbofan/logs/regress-2318

Original issue's description:
> [inspector] gracefully handle stack overflows in the inspector.
>
> Hopefully we can avoid going through JS at all, so we can avoid this issue.
>
> R=jgruber@chromium.org, kozyatinskiy@chromium.org
> BUG=v8:5654
>
> Review-Url: https://codereview.chromium.org/2510093002
> Cr-Commit-Position: refs/heads/master@{#41802}
> Committed: 3ab3b6261a

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

Review-Url: https://codereview.chromium.org/2583173002
Cr-Commit-Position: refs/heads/master@{#41805}
2016-12-19 13:28:10 +00:00
cbruni
c0282f608c Add unittests to keep InstanceType lists in sync
STRUCT_LIST and INSTANCE_TYPE_LIST are now forced to have the same order
as the InstanceType enum.

Drive-by-fix 1: Move type check and cast functions closer together in objects-inl.h

Drive-by-fix 2: Remove unused instance types SIGNATURE_INFO_TYPE and  TYPE_SWITCH_INFO_TYPE.

BUG=

Review-Url: https://codereview.chromium.org/2578573002
Cr-Commit-Position: refs/heads/master@{#41804}
2016-12-19 12:50:30 +00:00
cbruni
99a5aa1b95 [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@{#41803}
2016-12-19 12:49:21 +00:00
yangguo
3ab3b6261a [inspector] gracefully handle stack overflows in the inspector.
Hopefully we can avoid going through JS at all, so we can avoid this issue.

R=jgruber@chromium.org, kozyatinskiy@chromium.org
BUG=v8:5654

Review-Url: https://codereview.chromium.org/2510093002
Cr-Commit-Position: refs/heads/master@{#41802}
2016-12-19 12:24:57 +00:00
cbruni
1c1465f124 [runtime] Add PositiveNumberToUint32 helper to avoid double to uint roundtrip
BUG=

Review-Url: https://codereview.chromium.org/2577143002
Cr-Commit-Position: refs/heads/master@{#41801}
2016-12-19 12:06:58 +00:00
yangguo
8ac9e55aa6 [serializer] fix leak in test.
BUG=chromium:662388
R=cbruni@chromium.org

Review-Url: https://codereview.chromium.org/2582333002
Cr-Commit-Position: refs/heads/master@{#41800}
2016-12-19 12:04:19 +00:00
yangguo
2a19ad3603 Fix memory leak in logging-unittest.
R=cbruni@chromium.org
BUG=chromium:662388

Review-Url: https://codereview.chromium.org/2586203002
Cr-Commit-Position: refs/heads/master@{#41799}
2016-12-19 11:58:28 +00:00
ishell
52702e55aa [turbofan] Avoid allocation of temporary array of Nodes when generating calls.
BUG=

Review-Url: https://codereview.chromium.org/2586903002
Cr-Commit-Position: refs/heads/master@{#41798}
2016-12-19 11:35:42 +00:00
ulan
039e29f750 [heap] Use RAIL mode for starting incremental marking.
This patch delays start of incremental marking during L phase of RAIL
and adjusts ShouldOptimizeForLoadTime to check allocation limit.

BUG=chromium:613518

Review-Url: https://codereview.chromium.org/2583033003
Cr-Commit-Position: refs/heads/master@{#41797}
2016-12-19 11:34:34 +00:00
jochen
58247e87be Use preexisting SharedFunctionInfos in the asm-wasm builder
BUG=chromium:675114
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2583113002
Cr-Commit-Position: refs/heads/master@{#41796}
2016-12-19 11:33:26 +00:00
machenbach
81dd9847cf Revert of [crankshaft] Fix IsClassOfTest helper method (patchset #1 id:1 of https://codereview.chromium.org/2586933002/ )
Reason for revert:
Breaks vtune:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20vtunejit/builds/15379

Original issue's description:
> [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}
> Committed: d4493222b9

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

Review-Url: https://codereview.chromium.org/2587973002
Cr-Commit-Position: refs/heads/master@{#41795}
2016-12-19 11:22:36 +00:00
yangguo
07fa0f4967 [serializer] do not serialize script wrappers.
The scenario here: the asm function fails asm validation,
so we emit a message. In doing so, we create a JSValue wrapper for
the script object that we cache on the script object. This wrapper
is context-dependent and causes the code serializer to choke.

R=mtrofin@chromium.org, titzer@chromium.org
BUG=chromium:674446,chromium:673321

Review-Url: https://codereview.chromium.org/2586943003
Cr-Commit-Position: refs/heads/master@{#41794}
2016-12-19 10:53:02 +00:00
yangguo
d0bb789f03 [profiler] fix memory leak for code entries for runtime callstats.
Track allocated code entries and delete at the end. This is what we
do in ProfileListener too.

R=alph@chromium.org, cbruni@chromium.org
BUG=v8:5753

Review-Url: https://codereview.chromium.org/2586923002
Cr-Commit-Position: refs/heads/master@{#41793}
2016-12-19 10:46:56 +00:00
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