Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: src/objects-inl.h

Issue 1921853005: [debugger,interpreter] precisely determine execution tier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 5ff72651c106a4bdb6eb916f47a8523c60bad098..a629326262070db710ebf4981d9bd3a788623c9d 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5885,7 +5885,7 @@ DebugInfo* SharedFunctionInfo::GetDebugInfo() {
bool SharedFunctionInfo::HasDebugCode() {
- return HasBytecodeArray() ||
+ return IsInterpreted() ||
(code()->kind() == Code::FUNCTION && code()->has_debug_break_slots());
}
@@ -5909,6 +5909,15 @@ bool SharedFunctionInfo::HasBytecodeArray() {
return function_data()->IsBytecodeArray();
}
+bool SharedFunctionInfo::IsInterpreted() {
+ // Currently, having bytecode does not mean the function is actually being
+ // interpreted. However, the debugger has to know precisely what is going to
+ // be executed.
+ // TODO(yangguo,mstarzinger): make this a synonym of HasBytecodeArray().
+ return code() ==
+ GetIsolate()->builtins()->builtin(
+ Builtins::kInterpreterEntryTrampoline);
+}
BytecodeArray* SharedFunctionInfo::bytecode_array() {
DCHECK(HasBytecodeArray());
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698