Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index f8d94bc79116b7ef1b1e2317d81513eeeb805e71..8a1433767c53d3b928dd50dd238a3c166590289f 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -6265,6 +6265,10 @@ void SharedFunctionInfo::ReplaceCode(Code* value) { |
if (is_compiled()) set_never_compiled(false); |
} |
+bool SharedFunctionInfo::IsInterpreted() const { |
+ return code()->is_interpreter_trampoline_builtin(); |
+} |
+ |
bool SharedFunctionInfo::HasBaselineCode() const { |
return code()->kind() == Code::FUNCTION; |
} |
@@ -6506,6 +6510,10 @@ bool JSFunction::IsOptimized() { |
return code()->kind() == Code::OPTIMIZED_FUNCTION; |
} |
+bool JSFunction::IsInterpreted() { |
+ return code()->is_interpreter_trampoline_builtin(); |
+} |
+ |
bool JSFunction::IsMarkedForBaseline() { |
return code() == |
GetIsolate()->builtins()->builtin(Builtins::kCompileBaseline); |
@@ -6551,11 +6559,10 @@ void Map::InobjectSlackTrackingStep() { |
} |
AbstractCode* JSFunction::abstract_code() { |
- Code* code = this->code(); |
- if (code->is_interpreter_trampoline_builtin()) { |
+ if (IsInterpreted()) { |
return AbstractCode::cast(shared()->bytecode_array()); |
} else { |
- return AbstractCode::cast(code); |
+ return AbstractCode::cast(code()); |
} |
} |