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

Unified Diff: runtime/vm/object.cc

Issue 2981173002: Remove the debugger_ field from Isolate in a PRODUCT build (Closed)
Patch Set: Created 3 years, 5 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 | « runtime/vm/isolate.cc ('k') | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index aa2f340ee9b21715ad748a72dab7a7db0ed740cd..7e66d4b68ea1606a3de26916320583640a7953ca 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5173,11 +5173,15 @@ intptr_t Function::Hash() const {
}
bool Function::HasBreakpoint() const {
+#if defined(PRODUCT)
+ return false;
+#else
if (!FLAG_support_debugger) {
rmacnak 2017/07/18 18:17:40 Consider removing FLAG_support_debugger since we n
zra 2017/07/18 20:28:54 Done.
return false;
}
Thread* thread = Thread::Current();
return thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone());
+#endif
}
void Function::InstallOptimizedCode(const Code& code) const {
@@ -5958,10 +5962,14 @@ void Function::SetIsOptimizable(bool value) const {
}
bool Function::CanBeInlined() const {
+#if defined(PRODUCT)
+ return is_inlinable() && !is_external() && !is_generated_body();
+#else
Thread* thread = Thread::Current();
return is_inlinable() && !is_external() && !is_generated_body() &&
(!FLAG_support_debugger ||
!thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone()));
+#endif
}
intptr_t Function::NumParameters() const {
@@ -13588,10 +13596,14 @@ void Code::set_static_calls_target_table(const Array& value) const {
}
bool Code::HasBreakpoint() const {
+#if defined(PRODUCT)
+ return false;
+#else
if (!FLAG_support_debugger) {
return false;
}
return Isolate::Current()->debugger()->HasBreakpoint(*this);
+#endif
}
RawTypedData* Code::GetDeoptInfoAtPc(uword pc,
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698