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

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
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();
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/compiler.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698