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

Unified Diff: runtime/vm/object.cc

Issue 2981173002: Remove the debugger_ field from Isolate in a PRODUCT build (Closed)
Patch Set: Remove flag support_debugger 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/kernel_to_il.cc ('k') | runtime/vm/object_test.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..5a3eecc28299e2894c55eb3b6c847e186bc6798f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5173,11 +5173,12 @@ intptr_t Function::Hash() const {
}
bool Function::HasBreakpoint() const {
- if (!FLAG_support_debugger) {
- return false;
- }
+#if defined(PRODUCT)
+ return false;
+#else
Thread* thread = Thread::Current();
return thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone());
+#endif
}
void Function::InstallOptimizedCode(const Code& code) const {
@@ -5958,10 +5959,13 @@ 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()));
+ !thread->isolate()->debugger()->HasBreakpoint(*this, thread->zone());
+#endif
}
intptr_t Function::NumParameters() const {
@@ -13588,10 +13592,11 @@ void Code::set_static_calls_target_table(const Array& value) const {
}
bool Code::HasBreakpoint() const {
- if (!FLAG_support_debugger) {
- return false;
- }
+#if defined(PRODUCT)
+ return false;
+#else
return Isolate::Current()->debugger()->HasBreakpoint(*this);
+#endif
}
RawTypedData* Code::GetDeoptInfoAtPc(uword pc,
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698