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

Unified Diff: runtime/vm/code_generator.cc

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/class_table.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 0a207de71a5df68920f4bbeb5741de86c09a8019..54c48c881e0097382e05bbeeeedd1c35edd482ad 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -705,6 +705,9 @@ static void CheckResultError(const Object& result) {
// Gets called from debug stub when code reaches a breakpoint
// set on a runtime stub call.
DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
+ if (!FLAG_support_debugger) {
+ UNREACHABLE();
+ }
DartFrameIterator iterator;
StackFrame* caller_frame = iterator.NextFrame();
ASSERT(caller_frame != NULL);
@@ -720,6 +723,9 @@ DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) {
+ if (!FLAG_support_debugger) {
+ UNREACHABLE();
+ }
const Error& error =
Error::Handle(isolate->debugger()->DebuggerStepCallback());
if (!error.IsNull()) {
@@ -1242,13 +1248,15 @@ DEFINE_RUNTIME_ENTRY(InvokeClosureNoSuchMethod, 3) {
static bool CanOptimizeFunction(const Function& function, Thread* thread) {
- Isolate* isolate = thread->isolate();
- if (isolate->debugger()->IsStepping() ||
- isolate->debugger()->HasBreakpoint(function, thread->zone())) {
- // We cannot set breakpoints and single step in optimized code,
- // so do not optimize the function.
- function.set_usage_counter(0);
- return false;
+ if (FLAG_support_debugger) {
+ Isolate* isolate = thread->isolate();
+ if (isolate->debugger()->IsStepping() ||
+ isolate->debugger()->HasBreakpoint(function, thread->zone())) {
+ // We cannot set breakpoints and single step in optimized code,
+ // so do not optimize the function.
+ function.set_usage_counter(0);
+ return false;
+ }
}
if (function.deoptimization_counter() >=
FLAG_max_deoptimization_counter_threshold) {
@@ -1371,7 +1379,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
// TODO(turnidge): Consider using DeoptimizeAt instead.
DeoptimizeFunctionsOnStack();
}
- if (do_stacktrace) {
+ if (FLAG_support_debugger && do_stacktrace) {
String& var_name = String::Handle();
Instance& var_value = Instance::Handle();
DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698