| Index: runtime/vm/code_generator.cc
|
| diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
|
| index 0a207de71a5df68920f4bbeb5741de86c09a8019..ddc444aefa84af2e9107f43a7dec03217e95ff60 100644
|
| --- a/runtime/vm/code_generator.cc
|
| +++ b/runtime/vm/code_generator.cc
|
| @@ -705,6 +705,7 @@ 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) {
|
| +#ifndef PRODUCT
|
| DartFrameIterator iterator;
|
| StackFrame* caller_frame = iterator.NextFrame();
|
| ASSERT(caller_frame != NULL);
|
| @@ -716,16 +717,23 @@ DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
|
| UNREACHABLE();
|
| }
|
| arguments.SetReturn(orig_stub);
|
| +#else
|
| + UNREACHABLE();
|
| +#endif // !PRODUCT
|
| }
|
|
|
|
|
| DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) {
|
| +#ifndef PRODUCT
|
| const Error& error =
|
| Error::Handle(isolate->debugger()->DebuggerStepCallback());
|
| if (!error.IsNull()) {
|
| Exceptions::PropagateError(error);
|
| UNREACHABLE();
|
| }
|
| +#else
|
| + UNREACHABLE();
|
| +#endif // !PRODUCT
|
| }
|
|
|
|
|
| @@ -1242,6 +1250,7 @@ DEFINE_RUNTIME_ENTRY(InvokeClosureNoSuchMethod, 3) {
|
|
|
|
|
| static bool CanOptimizeFunction(const Function& function, Thread* thread) {
|
| +#ifndef PRODUCT
|
| Isolate* isolate = thread->isolate();
|
| if (isolate->debugger()->IsStepping() ||
|
| isolate->debugger()->HasBreakpoint(function, thread->zone())) {
|
| @@ -1250,6 +1259,7 @@ static bool CanOptimizeFunction(const Function& function, Thread* thread) {
|
| function.set_usage_counter(0);
|
| return false;
|
| }
|
| +#endif
|
| if (function.deoptimization_counter() >=
|
| FLAG_max_deoptimization_counter_threshold) {
|
| if (FLAG_trace_failed_optimization_attempts ||
|
| @@ -1371,7 +1381,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();
|
|
|