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

Unified Diff: src/objects-inl.h

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: Created 4 years, 1 month 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.cc ('k') | src/runtime-profiler.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 db358632db0767d4077bb37d32879ced5814ec69..9100c114141cab10af5f74f4d8b3f98c9504cea5 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5948,6 +5948,10 @@
set_flags(BooleanBit::set(flags(), kCompilationTypeBit,
type == COMPILATION_TYPE_EVAL));
}
+bool Script::hide_source() { return BooleanBit::get(flags(), kHideSourceBit); }
+void Script::set_hide_source(bool value) {
+ set_flags(BooleanBit::set(flags(), kHideSourceBit, value));
+}
Script::CompilationState Script::compilation_state() {
return BooleanBit::get(flags(), kCompilationStateBit) ?
COMPILATION_STATE_COMPILED : COMPILATION_STATE_INITIAL;
@@ -6493,15 +6497,17 @@
opt_count_and_bailout_reason(), reason));
}
-bool SharedFunctionInfo::IsUserJavaScript() {
+
+bool SharedFunctionInfo::IsBuiltin() {
Object* script_obj = script();
- if (script_obj->IsUndefined(GetIsolate())) return false;
+ if (script_obj->IsUndefined(GetIsolate())) return true;
Script* script = Script::cast(script_obj);
- return static_cast<Script::Type>(script->type()) == Script::TYPE_NORMAL;
+ Script::Type type = static_cast<Script::Type>(script->type());
+ return type != Script::TYPE_NORMAL;
}
bool SharedFunctionInfo::IsSubjectToDebugging() {
- return IsUserJavaScript() && !HasAsmWasmData();
+ return !IsBuiltin() && !HasAsmWasmData();
}
bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {
« no previous file with comments | « src/objects.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698