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}
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}
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}
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}
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}
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}
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}
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}
This CL more or less reverts commit https://codereview.chromium.org/2107733002/
The use of the MathPow code stub that was introduced by that commit caused
problems on arm64, and the MathPow code stub was also an obstacle in the
implementation of parallel code generation.
In addition this CL turns on the mjsunit/wasm/embenchen tests for arm64
which were turned off because of problems with MathPow on arm64.
R=titzer@chromium.org, bradnelson@chromium.org
Review-Url: https://codereview.chromium.org/2166793002
Cr-Commit-Position: refs/heads/master@{#37911}
This CL fixes weird performance implications when changing layout of Code::flags field:
it happened that the unused ICStateField with MONOMORPHIC value in the handlers' flags
was accidentally offsetting the underflow bug in stub cache probing code on arm, arm64,
mips and mips64.
Stub cache tests now work even when snapshot is enabled.
Drive-by-change: Fixed counters manipulation on arm64 and mips64.
BUG=chromium:618701
Review-Url: https://codereview.chromium.org/2161153002
Cr-Commit-Position: refs/heads/master@{#37910}
It's the only Scope type that has outer scope nullptr; and it always has outer scope nullptr.
BUG=v8:5209
Review-Url: https://codereview.chromium.org/2158913005
Cr-Commit-Position: refs/heads/master@{#37907}
For some bytecodes it is beneficial to always look for a Star
bytecode when dispatching to the next and inline perform it
without dispatching to the Star handler.
BUG=v8:4280
LOG=N
Review-Url: https://codereview.chromium.org/2142273003
Cr-Commit-Position: refs/heads/master@{#37904}
This additionally makes the invariant obvious that outer_scope==nullptr+is_with_scope is impossible.
BUG=v8:5209
Review-Url: https://codereview.chromium.org/2165923002
Cr-Commit-Position: refs/heads/master@{#37902}
It takes the number of additional elements, not the total target
capacity.
Also, avoid right-shifting a negative integer as this is undefined in general
BUG=v8:4909
R=verwaest@chromium.org
Review-Url: https://codereview.chromium.org/2162333002
Cr-Commit-Position: refs/heads/master@{#37901}
By now TurboFan is shipping on a broad range of language constructs and
wholesale disabling TurboFan can still be done with the --turbo-filter
flag. A dedicated flag controlling AST numbering heuristics is no longer
needed.
R=bmeurer@chromium.org
Review-Url: https://codereview.chromium.org/2155243006
Cr-Commit-Position: refs/heads/master@{#37900}
This creates the guarantee that we can compute the parent scope later on. We'll do the same for other types of scopes as well (with perhaps a limited number of exceptions that will need to be eagerly allocated).
BUG=v8:5209
Review-Url: https://codereview.chromium.org/2168563002
Cr-Commit-Position: refs/heads/master@{#37898}
As required by the spec.
This is a variant of what I reverted in f47e722403.
It will probably still cause a regression but now it's easier to migrate (parts of)
the current implementation to C++, which is expected to make things faster again.
BUG=chromium:627729,v8:5113
Review-Url: https://codereview.chromium.org/2164923002
Cr-Commit-Position: refs/heads/master@{#37897}
This avoids implementation-defined signed overflow in the simulator's
AddWithCarry implementation. The implementation of AddWithCarry now uses
unsigned arithmetic exclusively.
Testing coverage is also significantly improved.
BUG=
Review-Url: https://codereview.chromium.org/2157283003
Cr-Commit-Position: refs/heads/master@{#37895}
Using Isolate is unsafe, because we might parse (and do scope analysis)
on a background thread.
The illegal access happens when encountering f(arguments) { ... }.
Kudos to verwaest@ for finding this bug.
R=verwaest@chromium.org, rossberg@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2158343002
Cr-Commit-Position: refs/heads/master@{#37893}
This frees up a field in Scope and untangles scope a little from the parser.
BUG=v8:5209
Review-Url: https://codereview.chromium.org/2160943004
Cr-Commit-Position: refs/heads/master@{#37887}
In a few places in the parser base, we were forced to initialize
variables of type ExpressionT even if it's not necessary, as they
are assigned to later on before their use. This was required
because, for the case of the preparser, ExpressionT is
PreParserExpression which had no default constructor.
This patch adds a default constructor, equivalent to EmptyExpression
for this class, and gets rid of the unnecessary initializations.
R=adamk@chromium.org, littledan@chromium.org
BUG=
LOG=N
Review-Url: https://codereview.chromium.org/2162763003
Cr-Commit-Position: refs/heads/master@{#37884}
Add a dedicated simplified operator to inline the general case for the
ToBoolean conversion. In a follow up CL we will also use the ToBoolean
hints gathered by the baseline compiler.
Review-Url: https://codereview.chromium.org/2167593002
Cr-Commit-Position: refs/heads/master@{#37882}
port 9be015a254 (r37854)
original commit 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()?
BUG=
Review-Url: https://codereview.chromium.org/2166703002
Cr-Commit-Position: refs/heads/master@{#37880}
Rolling v8/build to 4b2ee7d1824cdc45d8e3d4076c05f9a8af10e4ac
Rolling v8/tools/mb to 3f6bbf669fa2b89399cead251fe693ce71132779
TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org
Review-Url: https://codereview.chromium.org/2166433004
Cr-Commit-Position: refs/heads/master@{#37879}
We are enabling this trial on canary to see if we can flush out some missing
context restores.
BUG=
Review-Url: https://codereview.chromium.org/2164633002
Cr-Commit-Position: refs/heads/master@{#37875}
Copies the behaviour of FullCode in attempting to get the state for
ForInPrepare inline and falling back to the runtime if necessary.
BUG=v8:4280
LOG=N
Review-Url: https://codereview.chromium.org/2155153002
Cr-Commit-Position: refs/heads/master@{#37874}
This adds an additional column with percentages to the output of
bytecode_dispatch_report.py --top-dispatches-for-bytecode.
The percentages always represent the relative number of dispatches to
the target bytecode to all dispatches from the source bytecode.
The additional flag --sort-sources-relative/-r allows sorting the
"Top sources of dispatches to" the given bytecode by this column to more
easily find bytecodes that significantly often dispatch to the target.
BUG=v8:4899
LOG=N
Review-Url: https://codereview.chromium.org/2159683003
Cr-Commit-Position: refs/heads/master@{#37873}