Commit 7c18f197 authored by leszeks's avatar leszeks Committed by Commit bot

Revert of abstract_code: return compiled code for compiled shared funcs...

Revert of abstract_code: return compiled code for compiled shared funcs (patchset #2 id:20001 of https://codereview.chromium.org/2592703002/ )

Reason for revert:
Breaks tree:

http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/9970

Original issue's description:
> abstract_code: return compiled code for compiled shared funcs
>
> SharedFunctionInfo's abstract_code was returning the bytecode array
> whenever SharedFunctionInfo had a bytecode array, even if the function
> was compiled (e.g. tiered up to FCG). This meant that abstract_code
> could return code that is not actually the code that will run, which was
> causing problems in profiling as the sampled PC did not match the known
> code offset.
>
> This patch changes both SharedFunctionInfo and JSFunction to return the
> bytecode if-and-only-if they are not compiled and have a bytecode array
> to return, or they already point to the interpreter trampoline.
>
> BUG=v8:5758
>
> Review-Url: https://codereview.chromium.org/2592703002
> Cr-Commit-Position: refs/heads/master@{#41894}
> Committed: https://chromium.googlesource.com/v8/v8/+/679b31c21425ecdd86c40a8a02ac131b72f7bc6b

TBR=bmeurer@chromium.org,mstarzinger@chromium.org,mvstanton@chromium.org,mythria@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:5758

Review-Url: https://codereview.chromium.org/2591223002
Cr-Commit-Position: refs/heads/master@{#41896}
parent 7a6138ae
......@@ -6159,7 +6159,7 @@ BOOL_GETTER(SharedFunctionInfo,
kOptimizationDisabled)
AbstractCode* SharedFunctionInfo::abstract_code() {
if ((!is_compiled() && HasBytecodeArray()) || IsInterpreted()) {
if (HasBytecodeArray()) {
return AbstractCode::cast(bytecode_array());
} else {
return AbstractCode::cast(code());
......@@ -6577,7 +6577,7 @@ void Map::InobjectSlackTrackingStep() {
}
AbstractCode* JSFunction::abstract_code() {
if ((!is_compiled() && shared()->HasBytecodeArray()) || IsInterpreted()) {
if (IsInterpreted()) {
return AbstractCode::cast(shared()->bytecode_array());
} else {
return AbstractCode::cast(code());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment