Commit Graph

32603 Commits

Author SHA1 Message Date
ritesht
b887013712 Revert "[wasm] Adding a convolution matrix filter test to highlight the performance advantages of JITing"
GC-Stress asserts in filter-jit.

This reverts commit ccfd224ec3.

BUG=v8:5044
R=bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2168343002
Cr-Commit-Position: refs/heads/master@{#37961}
2016-07-22 02:10:44 +00:00
bjaideep
0145ba864b PPC: [ic] [stubs] Don't use Code::flags in megamorphic stub cache hash computations.
Port 8aeb7439c9

     Fix for ppc file, using macro functions to xor and add to
     handle the case when kPrimaryMagic/kSecondaryMagic is > 16bits.

R=ishell@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/2169183002
Cr-Commit-Position: refs/heads/master@{#37960}
2016-07-22 01:44:28 +00:00
jwolfe
3cfd80d6a2 Adjust whitespace to make tests oblivious to --harmony-function-tostring
See discussion in https://codereview.chromium.org/2156303002/#msg8

With the new --harmony-function-tostring behavior, these tests would
fail without this change. This change makes the tests pass regardless
of whether or not --harmony-function-tostring is used.

All of these changes are simply inserting a space after the "function"
keyword to match the current function toString behavior. When
--harmony-function-tostring is enabled, the toString behavior matches
the spacing used in the function declaration. With the declaration
matching the current formatting, the toString behavior becomes
unaffected by --harmony-function-tostring.

BUG=v8:4958
LOG=n

Review-Url: https://codereview.chromium.org/2161413002
Cr-Commit-Position: refs/heads/master@{#37959}
2016-07-22 00:18:41 +00:00
adamk
88707c98b4 [cleanup] Remove some leftover strong mode code from the parser
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2172723003
Cr-Commit-Position: refs/heads/master@{#37958}
2016-07-21 22:53:00 +00:00
ritesht
ccfd224ec3 [wasm] Adding a convolution matrix filter test to highlight the performance advantages of JITing
This cl also fixes two bugs in the previous code:
    1) JITed functions were not allowed access to the heap because the module instance wasn't correctly synthesized. This wasn't discovered in the previous test.
    2) Decoding of functions with the JITSingleFunction opcode was off by 1 as the length of the opcode wasn't computed correctly.
BUG=5044

Review-Url: https://codereview.chromium.org/2168183002
Cr-Commit-Position: refs/heads/master@{#37957}
2016-07-21 22:39:41 +00:00
bjaideep
e6d12302e5 PPC/s390: [arm] Fix infinite loop in Math.pow(2,2147483648).
Port e83739c0ae

    Fix applies to PPC/s390 as well.

R=jacob.bramley@arm.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:5214
LOG=N

Review-Url: https://codereview.chromium.org/2167273003
Cr-Commit-Position: refs/heads/master@{#37956}
2016-07-21 21:53:39 +00:00
ivica.bogosavljevic
eaa86cbf06 MIPS: Fix infinite loop in Math.pow(2,-2147483648)
BUG=v8:5213

Review-Url: https://codereview.chromium.org/2163963003
Cr-Commit-Position: refs/heads/master@{#37955}
2016-07-21 19:38:01 +00:00
jpp
6f31bc9ce8 [wasm] ASM-2-WASM. Enforces switch default clause appearing last.
BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=628803
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer.cc
LOG= N

Review-Url: https://codereview.chromium.org/2172603002
Cr-Commit-Position: refs/heads/master@{#37954}
2016-07-21 19:03:40 +00:00
mattloring
fb2feee616 Fix objdump assembly truncations, d8 support
Update the custom objdump script to handle inline comments starting
with '--' or ';;'.

Load d8 code.asm file if present.

BUG=

Review-Url: https://codereview.chromium.org/2159103007
Cr-Commit-Position: refs/heads/master@{#37953}
2016-07-21 18:16:31 +00:00
rmcilroy
53e5f66bc8 [Interpreter] Add Mythri to OWNERS
Review-Url: https://codereview.chromium.org/2168913002
Cr-Commit-Position: refs/heads/master@{#37952}
2016-07-21 17:56:40 +00:00
dpranke
8526513ce5 Fix mips64el typo in snapshot_toolchain.gni.
I had written "mipsel64", not "mips64el".

R=machenbach@chromium.org, milko.leporis@imgtec.com
BUG=629057

Review-Url: https://codereview.chromium.org/2167873002
Cr-Commit-Position: refs/heads/master@{#37951}
2016-07-21 17:20:39 +00:00
jpp
d50998c480 V8. ASM-2-WASM. Enforces source code layout.
BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=628450
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer.cc
TEST= mjsunit/wasm/*
LOG= N

Review-Url: https://codereview.chromium.org/2164273002
Cr-Commit-Position: refs/heads/master@{#37950}
2016-07-21 15:34:33 +00:00
jgruber
46e896e76d Remove stack overflow boilerplate
We no longer need to prepare the stack overflow error in advance now that
Errors are constructed in C++.

R=yangguo@chromium.org
BUG=

Committed: https://crrev.com/ba95d10ccbe13e2fca427228483b045576f2dc4c
Review-Url: https://codereview.chromium.org/2161953003
Cr-Original-Commit-Position: refs/heads/master@{#37923}
Cr-Commit-Position: refs/heads/master@{#37949}
2016-07-21 14:32:07 +00:00
yangguo
767d7fff61 [debugger] remove obsolete work-around for return position.
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2168883002
Cr-Commit-Position: refs/heads/master@{#37948}
2016-07-21 13:58:54 +00:00
machenbach
7f07809c2c [tools] Build generator script
Helper script to generate gn arguments based on common
developer defaults or builder configurations.

BUG=chromium:625791
NOTRY=true

Review-Url: https://codereview.chromium.org/2138693002
Cr-Commit-Position: refs/heads/master@{#37947}
2016-07-21 13:23:44 +00:00
ishell
8aeb7439c9 [ic] [stubs] Don't use Code::flags in megamorphic stub cache hash computations.
BUG=chromium:618701

Review-Url: https://codereview.chromium.org/2167493003
Cr-Commit-Position: refs/heads/master@{#37946}
2016-07-21 12:58:10 +00:00
titzer
d9eb33582f [wasm] Remove special memory type for (internal) globals and use local type instead.
R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2165633006
Cr-Commit-Position: refs/heads/master@{#37945}
2016-07-21 12:35:10 +00:00
bmeurer
1b004d3f9d [turbofan] Remove unused function_type_ from Typer.
This is never passed to the Typer, and actually wouldn't work
anyways, since we cannot derive any meaningful types for
Parameters in JavaScript.

R=mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2171723002
Cr-Commit-Position: refs/heads/master@{#37944}
2016-07-21 11:42:45 +00:00
marija.antic
24d432cb82 MIPS64: Fix 32bit right shift operators
Add sign extension for Mips64Shr and Mips64Sar operators.

BUG=

Review-Url: https://codereview.chromium.org/2154703002
Cr-Commit-Position: refs/heads/master@{#37943}
2016-07-21 11:39:21 +00:00
yangguo
07a0f9ebff [debugger] be more lenient about argument type in %DebugGetProperty.
R=mstarzinger@chromium.org
BUG=chromium:629996

Review-Url: https://codereview.chromium.org/2166123003
Cr-Commit-Position: refs/heads/master@{#37942}
2016-07-21 11:29:24 +00:00
verwaest
f04fd635b6 Turn ZoneList inner_scopes into a linked list
Replace the zonelist with a link from a scope to any of its inner scopes, and a link to any sibling scope.
This makes scopes that track inner scopes use roughly the same amount of space as previously scopes without inner scopes would use for the empty zonelist (pointer to the memory + length field, which, granted could be slightly smaller on 64bit).

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2162143005
Cr-Commit-Position: refs/heads/master@{#37941}
2016-07-21 11:25:56 +00:00
cbruni
211615d41e [keys] Postpone shadowed key checking in the KeyAccumulator
Only start checking if new keys are shadowed after the first prototype has added
non-enumerable shadow keys. This helps minimally in some corner cases if there
are few enumerable properties on the prototype compared to the receiver.

BUG=chromium:628173

Review-Url: https://codereview.chromium.org/2169523002
Cr-Commit-Position: refs/heads/master@{#37940}
2016-07-21 11:06:20 +00:00
titzer
ff0b6d49ce [wasm] Remove the explicit count from WASM_BLOCK and WASM_LOOP macros.
R=ahaas@chromium.org, rossberg@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2170773003
Cr-Commit-Position: refs/heads/master@{#37939}
2016-07-21 11:06:19 +00:00
marja
17376b6d85 FunctionState doesn't need to know AstNodeFactory.
It's anyway just the "same" AstNodeFactory (i.e., it's passed the same
AstValueFactory), so no need to have several of them for each
FunctionState.

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2169823002
Cr-Commit-Position: refs/heads/master@{#37938}
2016-07-21 11:06:18 +00:00
weiliang.lin
b973a77775 [x64] add Absps/d and Negps/d macro
BUG=

Review-Url: https://codereview.chromium.org/2161513002
Cr-Commit-Position: refs/heads/master@{#37937}
2016-07-21 11:02:42 +00:00
machenbach
f6f8062fca Revert of Fix double-building of v8 in GN builds when setting just v8_target_cpu. (patchset #1 id:1 of https://codereview.chromium.org/2166173002/ )
Reason for revert:
Breaks:
https://build.chromium.org/p/client.v8.fyi/builders/V8%20Android%20GN%20%28dbg%29/builds/4590

And also the trybot:
https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/99806

Original issue's description:
> Fix double-building of v8 in GN builds when setting just v8_target_cpu.
>
> Because of the somewhat strange way default toolchains and custom
> toolchains and user-specified arguments work in GN, if you did a v8
> build that just set v8_target_cpu, you could end up building two
> identical copies of v8 (see the comments in the change for more).
>
> This CL identifies that case and fixes it.
>
> R=machenbach@chromium.org
> BUG=629825
>
> Committed: https://crrev.com/3536db45c9409c9aadc4eee6004cf337c0588cdb
> Cr-Commit-Position: refs/heads/master@{#37926}

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

Review-Url: https://codereview.chromium.org/2167113002
Cr-Commit-Position: refs/heads/master@{#37936}
2016-07-21 10:55:58 +00:00
bmeurer
a04467f9e3 [turbofan] Sanitize the Truncation query method names.
Use better names for the query methods on the Truncation class, that
express more clearly what you intend to query.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2171703002
Cr-Commit-Position: refs/heads/master@{#37935}
2016-07-21 09:40:45 +00:00
cbruni
4b59bf5313 [fullcodegen] [crankshaft] Avoid jumping to the runtime for ForInFilter
Use the ForInFilterStub directly. Hence we will only jump to the runtime for
special receivers (instance_type <= LAST_SPECIAL_RECEIVER_TYPE) and for
converting element indices which are not in the string cache.

BUG=

Review-Url: https://codereview.chromium.org/2151773002
Cr-Commit-Position: refs/heads/master@{#37934}
2016-07-21 09:34:11 +00:00
jacob.bramley
e83739c0ae [arm] Fix infinite loop in Math.pow(2,2147483648).
BUG=v8:5214

Review-Url: https://codereview.chromium.org/2166743003
Cr-Commit-Position: refs/heads/master@{#37933}
2016-07-21 09:30:32 +00:00
cbruni
55f903500a [runtime] enable fast key accumulator by default
BUG=

Review-Url: https://codereview.chromium.org/2162393002
Cr-Commit-Position: refs/heads/master@{#37932}
2016-07-21 09:23:54 +00:00
rmcilroy
6b5949a8a0 [Interpreter] Avoid accessing on-heap literal in VisitLiteral.
Move VisitLiteral to decide what type of literal is being emitted by
checking the raw ASTValue type, instead of the internalized on-heap
value. This is required for concurrent bytecode generation.

As part of this change, the NUMBER AstValue constructor is modified to
try to convert numbers without a dot to SMIs where possible. This is to
maintain the behavior in NewNumber where such numbers are internalized as
SMIs, and ensures that we still emit LdaSmi bytecodes for these values
in the generated bytecode.

BUG=v8:5203

Review-Url: https://codereview.chromium.org/2152853002
Cr-Commit-Position: refs/heads/master@{#37931}
2016-07-21 09:20:19 +00:00
mstarzinger
57981a48bd [interpreter] Remove duped control scope in ForOfStatement.
This removes a duplicate control scope. The visitor for ForOfStatement
nodes in the AST uses VisitIterationBody which pushes a separate control
scope. The number of control scopes will be off when we use them for
tracking loop depths.

R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2164503005
Cr-Commit-Position: refs/heads/master@{#37930}
2016-07-21 09:13:44 +00:00
ahaas
66cb026f4a Reland of [builtins] Introduce a builtin for Abort().
Original message:

Calling Runtime::kAbort through a builtin instead of the c-entry stub
will allow to generate the call in a background thread, because a
builtin provides its own handle, whereas a code stub does not.

@v8-mips-ports: Could you take a special look at the padding that is
done in MacroAssembler::Abort()?

Reason for revert:
The reason for reverting is: Blocks roll:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/builds/1622

The problem was that on arm64 the builtin for Abort() contained a call to
Abort(). The problem is fixed by using a NoUseRealAbortsScope in the
code generation of Abort().

R=titzer@chromium.org, rmcilroy@chromium.org, rodolph.perfetta@arm.com

Review-Url: https://codereview.chromium.org/2163263002
Cr-Commit-Position: refs/heads/master@{#37929}
2016-07-21 09:13:43 +00:00
bmeurer
2744fcbb6c [turbofan] Eliminate unused effectful nodes during representation selection.
We can actually eliminate certain effectful operations like loads and
speculative number operations during representation selection if we
discover that their value outputs are unused (we also propagate this
information through pure operations as well, so that we remove the
maximum number of effectful nodes possible).

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2168023002
Cr-Commit-Position: refs/heads/master@{#37928}
2016-07-21 09:10:08 +00:00
jgruber
c4ef8a8d6e Revert of Remove stack overflow boilerplate (patchset #3 id:40001 of https://codereview.chromium.org/2161953003/ )
Reason for revert:
Clusterfuzz failures in parent CL https://codereview.chromium.org/2142933003/

Original issue's description:
> Remove stack overflow boilerplate
>
> We no longer need to prepare the stack overflow error in advance now that
> Errors are constructed in C++.
>
> R=yangguo@chromium.org
> BUG=
>
> Committed: https://crrev.com/ba95d10ccbe13e2fca427228483b045576f2dc4c
> Cr-Commit-Position: refs/heads/master@{#37923}

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

Review-Url: https://codereview.chromium.org/2169563003
Cr-Commit-Position: refs/heads/master@{#37927}
2016-07-21 09:10:07 +00:00
dpranke
3536db45c9 Fix double-building of v8 in GN builds when setting just v8_target_cpu.
Because of the somewhat strange way default toolchains and custom
toolchains and user-specified arguments work in GN, if you did a v8
build that just set v8_target_cpu, you could end up building two
identical copies of v8 (see the comments in the change for more).

This CL identifies that case and fixes it.

R=machenbach@chromium.org
BUG=629825

Review-Url: https://codereview.chromium.org/2166173002
Cr-Commit-Position: refs/heads/master@{#37926}
2016-07-21 09:06:42 +00:00
machenbach
714b95f0ff Revert of [Intepreter] Always use BytecodeGraphBuilder when --turbo-from-bytecode (patchset #3 id:80001 of https://codereview.chromium.org/2156753002/ )
Reason for revert:
Breaks tsan:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/10758

Original issue's description:
> [Intepreter] Always use BytecodeGraphBuilder when --turbo-from-bytecode
>
> Always use the BytecodeGraphBuilder when the  --turbo-from-bytecode
> is enabled, assuming the function should be compiled for Ignition.
> Adds a new MaybeOptimizeIgnition function to runtime-profiler
> which is called if the function should be optimized from bytecode
> rather than going via full-codegen.
>
> BUG=v8:4280
>
> Committed: https://crrev.com/9ca7db914be88e6792a88eab4a1988ee031d70c4
> Cr-Commit-Position: refs/heads/master@{#37921}

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

Review-Url: https://codereview.chromium.org/2165223002
Cr-Commit-Position: refs/heads/master@{#37925}
2016-07-21 08:43:28 +00:00
jochen
3138862703 Enable v8 backtrace support in all debug builds
R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2167723004
Cr-Commit-Position: refs/heads/master@{#37924}
2016-07-21 08:27:00 +00:00
jgruber
ba95d10ccb Remove stack overflow boilerplate
We no longer need to prepare the stack overflow error in advance now that
Errors are constructed in C++.

R=yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2161953003
Cr-Commit-Position: refs/heads/master@{#37923}
2016-07-21 08:17:04 +00:00
yangguo
5dbed74448 Remove some obsolete flags.
R=franzih@chromium.org

Review-Url: https://codereview.chromium.org/2157363005
Cr-Commit-Position: refs/heads/master@{#37922}
2016-07-21 08:00:35 +00:00
rmcilroy
9ca7db914b [Intepreter] Always use BytecodeGraphBuilder when --turbo-from-bytecode
Always use the BytecodeGraphBuilder when the  --turbo-from-bytecode
is enabled, assuming the function should be compiled for Ignition.
Adds a new MaybeOptimizeIgnition function to runtime-profiler
which is called if the function should be optimized from bytecode
rather than going via full-codegen.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2156753002
Cr-Commit-Position: refs/heads/master@{#37921}
2016-07-21 07:50:29 +00:00
marja
c1da025b03 Fix r37816: SloppyBlockFunctionStatement needs to go to parser_zone_.
Putting SloppyBlockFunctionStatement into local_zone_ was too early. It
needs to go into parser_zone_ because Scope refers to it. It will be
moved back to local_zone_ when we can put Scopes into temporary Zones.

A test (to demonstrate we crash without this CL) will follow in a separate CL.

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2170813002
Cr-Commit-Position: refs/heads/master@{#37920}
2016-07-21 07:27:34 +00:00
bmeurer
f793cb1fc3 [runtime] %TransitionElementsKind works for any kind of JSObject.
The optimizing compilers actually invoke %TransitionElementsKind for
any kind of JSObject, the only relevant thing is the elements kind.
The runtime function was however checking for JSArray unnecessarily.
This only worked by coincindence in Crankshaft because the stub would
normally not call into the runtime fallback.

R=jarin@chromium.org
BUG=chromium:629823

Review-Url: https://codereview.chromium.org/2166963004
Cr-Commit-Position: refs/heads/master@{#37919}
2016-07-21 07:23:58 +00:00
marja
442801dd0c DiscardableZoneScope fix. It was an unintentional noop.
BUG=

Review-Url: https://codereview.chromium.org/2166633003
Cr-Commit-Position: refs/heads/master@{#37918}
2016-07-21 07:10:38 +00:00
v8-autoroll
db2763cf7d Update V8 DEPS.
Rolling v8/base/trace_event/common to 315bf1e2d45be7d53346c31cfcc37424a32c30c8

Rolling v8/build to 47d75963ee42a9b9688e4f85c097b3a15d4f2bb2

Rolling v8/buildtools to 60f7f9a8b421ebf9a46041dfa2ff11c0fe59c582

Rolling v8/tools/mb to 1815b6867db701b1bba1c223e4f67811196122ea

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

Review-Url: https://codereview.chromium.org/2168733003
Cr-Commit-Position: refs/heads/master@{#37917}
2016-07-21 06:50:35 +00:00
yangguo
ad4eb051e7 [debugger] use absolute source positions for break locations.
There is simply no point in converting between relative and absolute source
positions in both C++ and Javascript code.

R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2169463002
Cr-Commit-Position: refs/heads/master@{#37916}
2016-07-21 06:30:40 +00:00
bbudge
8730875b2b [Turbofan] Fix GapResolver tests.
Fixes bug in test-gap-resolver.cc that didn't test different move reps.
Fixes test canonicalization so all slots have the same type (non-float).
Improve test failure text output.

LOG=N
BUG=v8:5187

Review-Url: https://codereview.chromium.org/2169493002
Cr-Commit-Position: refs/heads/master@{#37915}
2016-07-20 19:09:51 +00:00
adamk
f1cf71aa4d Simplify and correct logic in CallSite::GetMethodName
SharedFunctionInfo::name is always a String if present (never a Symbol),
so there's no need to first test it for IsName() before testing IsString().
This is enforced by a check in %FunctionSetName.

As a bonus, the code no longer looks invalid (unconditionally casting
a Name to a String). The logic came into this broken-looking state
accidentally in the flag cleanup CL https://codereview.chromium.org/2096933002/.

Review-Url: https://codereview.chromium.org/2162853003
Cr-Commit-Position: refs/heads/master@{#37914}
2016-07-20 18:13:49 +00:00
mattloring
dbba4b40be Custom objdump to enable perf annotation
Allows jitted code to be annotated in perf. To use:

1) Report generated code in code-(pid)-1.asm.

  perf record -- d8 --print-code --redirect-code-traces script.js

2) Run perf report from the directory containing the above code file.

  perf report --objdump=v8/tools/objdump-v8

This script supports generated code from both crankshaft or turbofan.

BUG=

Review-Url: https://codereview.chromium.org/2167553002
Cr-Commit-Position: refs/heads/master@{#37913}
2016-07-20 16:59:24 +00:00
verwaest
2ca608041b Split NewScope into NewScope and NewScopeWithParent
NewScope automatically uses scope(), whereas NewScopeWithParent can pass along any local Scope* as outer scope. The number of calls to NewScopeWithParent should be reduced over time.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2164943002
Cr-Commit-Position: refs/heads/master@{#37912}
2016-07-20 14:43:42 +00:00