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

Unified Diff: src/objects-inl.h

Issue 2224923003: [interpreter] Add ability to preserve bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable flag. Created 4 years, 4 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') | src/runtime/runtime-test.cc » ('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 fe4438d246cb5668d5bdb59c245e89ccbb5ba9da..79ac617c22b6aae2119b1a2f9a43258bab53f163 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6105,6 +6105,9 @@ void SharedFunctionInfo::ReplaceCode(Code* value) {
if (is_compiled()) set_never_compiled(false);
}
+bool SharedFunctionInfo::HasBaselineCode() const {
+ return code()->kind() == Code::FUNCTION;
+}
ScopeInfo* SharedFunctionInfo::scope_info() const {
return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset));
@@ -6121,8 +6124,7 @@ void SharedFunctionInfo::set_scope_info(ScopeInfo* value,
mode);
}
-
-bool SharedFunctionInfo::is_compiled() {
+bool SharedFunctionInfo::is_compiled() const {
Builtins* builtins = GetIsolate()->builtins();
DCHECK(code() != builtins->builtin(Builtins::kCompileOptimizedConcurrent));
DCHECK(code() != builtins->builtin(Builtins::kCompileOptimized));
@@ -6151,7 +6153,7 @@ DebugInfo* SharedFunctionInfo::GetDebugInfo() {
bool SharedFunctionInfo::HasDebugCode() {
return HasBytecodeArray() ||
- (code()->kind() == Code::FUNCTION && code()->has_debug_break_slots());
+ (HasBaselineCode() && code()->has_debug_break_slots());
}
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698