port b8294aaa97 (r42264)
original commit message:
Literal arrays and feedback vectors for a function can be garbage
collected if we don't have a rooted closure for the function, which
happens often. It's expensive to come back from this (recreating
boilerplates and gathering feedback again), and the cost is
disproportionate if the function was inlined into optimized code.
To guard against losing these arrays when we need them, we'll now
create literal arrays when creating the feedback vector for the outer
closure, and root them strongly in that vector.
BUG=
Review-Url: https://codereview.chromium.org/2627973007
Cr-Commit-Position: refs/heads/master@{#42351}
1.
DCHECK in runtime-i18n.cc for case mapping was wrong to
assume that the longest primary language tag is 3 characters.
BCP 47 actually allows up to 8 characters.
2. GetFlatContent() was called to a string without flattening it first.
BUG=680314,680464
TEST=intl/general/case-mapping (see also the bugs)
Review-Url: https://codereview.chromium.org/2629763003
Cr-Commit-Position: refs/heads/master@{#42343}
In the ideal case, this will speed up Object.create(null) by ~10x.
Drive-by-fix: Spread usage of new IsSpecialReceiverMap() and
IsSpecialReceiverInstanceType(InstanceType) helpers.
BUG=v8:5788
Review-Url: https://codereview.chromium.org/2622723003
Cr-Commit-Position: refs/heads/master@{#42336}
With this CL, context loads and stores are "strengthened" by reducing
the incoming context chain and decreasing the depth accordingly,
whenever possible. This enables more opportunities for specialization
and will let us easily add module context specialization later.
BUG=
Review-Url: https://codereview.chromium.org/2559173003
Cr-Commit-Position: refs/heads/master@{#42334}
When we merge two NotFound access infos, we currently forgot to include
all the maps into the final PropertyAccessInfo, which results in a deopt
loop.
R=jarin@chromium.org
Review-Url: https://codereview.chromium.org/2625413003
Cr-Commit-Position: refs/heads/master@{#42332}
This puts lowering of {JSCreateClosure} operations behind a flag. For
now the benefit of inline allocating such closures is negligible, it
does increase code size, and breaks in combination with inlining based
on {SharedFunctionInfo}.
R=jarin@chromium.org
BUG=v8:2206
Review-Url: https://codereview.chromium.org/2636493002
Cr-Commit-Position: refs/heads/master@{#42331}
This changes the {MessageLocation} structure to no longer contain a
concrete {JSFunction} object but rather a {SharedFunctionInfo}. It is
much easier by now to determine, and also the concrete closure is never
actually being used.
R=yangguo@chromium.org
Review-Url: https://codereview.chromium.org/2628973005
Cr-Commit-Position: refs/heads/master@{#42324}
Fix a deoptimization loop in TurboFan, where we'd constantly fail the
same map check due to not trying instance migration, when there are
migration targets in the map check list. This deoptimization loop
showed up on the React test in Speedometer.
R=jarin@chromium.org
Review-Url: https://codereview.chromium.org/2621423006
Cr-Commit-Position: refs/heads/master@{#42323}
In the ideal case, this will speed up Object.create(null) by ~10x.
Drive-by-fix: Spread usage of new IsSpecialReceiverMap() and
IsSpecialReceiverInstanceType(InstanceType) helpers.
BUG=v8:5788
Review-Url: https://codereview.chromium.org/2622723003
Cr-Commit-Position: refs/heads/master@{#42321}
The simulator implements these exactly, but on ARM hardware,
the estimates are not exact, so CHECK_EQ will fail. This CL adds
a tolerance to the checks.
LOG=N
BUG=v8:4124
Review-Url: https://codereview.chromium.org/2628153003
Cr-Commit-Position: refs/heads/master@{#42320}
The CL #42279 (https://codereview.chromium.org/2619353006 ) caused a gcc error (-Werror=strict-overflow).
Here is the error message:
In file included from .././src/globals.h:15:0,
from .././src/allocation.h:9,
from .././src/profiler/profile-generator.h:9,
from ../src/profiler/profile-generator.cc:5:
.././src/base/logging.h: In member function ‘void v8::internal::ProfileTree::TraverseDepthFirst(Callback*) [with Callback = v8::internal::DeleteNodesCallback]’:
.././src/base/logging.h:179:70: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow]
: MakeCheckOpString<Lhs, Rhs>(lhs, rhs, msg); \
^
.././src/base/logging.h:191:1: note: in expansion of macro ‘DEFINE_CHECK_OP_IMPL’
DEFINE_CHECK_OP_IMPL(GT, > )
^
CXX(target) /home/zxli/work/google-v8/v8/out/x87.optdebug/obj.target/v8_base/src/regexp/regexp-macro-assembler.o
cc1plus: all warnings being treated as errors
This CL fix it.
BUG=
Review-Url: https://codereview.chromium.org/2632633002
Cr-Commit-Position: refs/heads/master@{#42318}
Prior to this, traces recorded through chrome://tracing would not
include time spent in RunMicrotasks.
BUG=v8:5382
Review-Url: https://codereview.chromium.org/2592793003
Cr-Commit-Position: refs/heads/master@{#42316}
This adapts the aformentioned interface to no longer return a list of
{JSFunction} objects, but {SharedFunctionInfo} objects instead. Since
deoptimization data only contains the latter as literals, this by now
represents the fast path. All call sites requiring the former can use
the slow path via {JavaScriptFrame::Summarize} instead.
R=jarin@chromium.org
Review-Url: https://codereview.chromium.org/2626213002
Cr-Original-Commit-Position: refs/heads/master@{#42311}
Committed: 25a9364f25
Review-Url: https://codereview.chromium.org/2626213002
Cr-Commit-Position: refs/heads/master@{#42314}
Reason for revert:
Breaks compilation.
Original issue's description:
> [runtime] Change JavaScriptFrame::GetFunctions interface.
>
> This adapts the aformentioned interface to no longer return a list of
> {JSFunction} objects, but {SharedFunctionInfo} objects instead. Since
> deoptimization data only contains the latter as literals, this by now
> represents the fast path. All call sites requiring the former can use
> the slow path via {JavaScriptFrame::Summarize} instead.
>
> R=jarin@chromium.org
>
> Review-Url: https://codereview.chromium.org/2626213002
> Cr-Commit-Position: refs/heads/master@{#42311}
> Committed: 25a9364f25TBR=jarin@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/2629113004
Cr-Commit-Position: refs/heads/master@{#42312}
This adapts the aformentioned interface to no longer return a list of
{JSFunction} objects, but {SharedFunctionInfo} objects instead. Since
deoptimization data only contains the latter as literals, this by now
represents the fast path. All call sites requiring the former can use
the slow path via {JavaScriptFrame::Summarize} instead.
R=jarin@chromium.org
Review-Url: https://codereview.chromium.org/2626213002
Cr-Commit-Position: refs/heads/master@{#42311}
If a breakpoint is set on a wasm function, compile an interpreter entry
stub for it, and replace all calls to the original function by calls to
this interpreter entry.
Also, instantiate a wasm interpreter object on demand and set the
breakpoint there.
R=titzer@chromium.org
BUG=v8:5822
Review-Url: https://codereview.chromium.org/2625093004
Cr-Commit-Position: refs/heads/master@{#42309}