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

Unified Diff: runtime/vm/debugger.cc

Issue 2994863002: Reapply "Eliminate dependencies on assemblers and code stubs in precompiled runtime." (Closed)
Patch Set: Exclude references to disassembler in precompiled mode Created 3 years, 4 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/debugger.h ('k') | runtime/vm/deferred_objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 396a86974a67a5e334543a3a445ae54da0175e85..f50937e9ff407882847cb70e5344a856bff2ade4 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -672,8 +672,10 @@ void ActivationFrame::PrintDescriptorsError(const char* message) {
OS::PrintErr("pc_ %" Px "\n", pc_);
OS::PrintErr("deopt_id_ %" Px "\n", deopt_id_);
OS::PrintErr("context_level_ %" Px "\n", context_level_);
+#if !defined(DART_PRECOMPILED_RUNTIME)
DisassembleToStdout formatter;
code().Disassemble(&formatter);
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
PcDescriptors::Handle(code().pc_descriptors()).Print();
StackFrameIterator frames(StackFrameIterator::kDontValidateFrames,
Thread::Current(),
@@ -1780,6 +1782,7 @@ ActivationFrame* Debugger::CollectDartFrame(Isolate* isolate,
return activation;
}
+#if !defined(DART_PRECOMPILED_RUNTIME)
RawArray* Debugger::DeoptimizeToArray(Thread* thread,
StackFrame* frame,
const Code& code) {
@@ -1801,6 +1804,7 @@ RawArray* Debugger::DeoptimizeToArray(Thread* thread,
return dest_frame.raw();
}
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
DebuggerStackTrace* Debugger::CollectStackTrace() {
Thread* thread = Thread::Current();
@@ -1838,7 +1842,8 @@ void Debugger::AppendCodeFrames(Thread* thread,
Code* code,
Code* inlined_code,
Array* deopt_frame) {
- if (code->is_optimized() && !FLAG_precompiled_runtime) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ if (code->is_optimized()) {
// TODO(rmacnak): Use CodeSourceMap
*deopt_frame = DeoptimizeToArray(thread, frame, *code);
for (InlinedFunctionsIterator it(*code, frame->pc()); !it.Done();
@@ -1855,10 +1860,11 @@ void Debugger::AppendCodeFrames(Thread* thread,
*inlined_code, *deopt_frame,
deopt_frame_offset));
}
- } else {
- stack_trace->AddActivation(CollectDartFrame(
- isolate, frame->pc(), frame, *code, Object::null_array(), 0));
+ return;
}
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
+ stack_trace->AddActivation(CollectDartFrame(isolate, frame->pc(), frame,
+ *code, Object::null_array(), 0));
}
DebuggerStackTrace* Debugger::CollectAsyncCausalStackTrace() {
@@ -1947,11 +1953,14 @@ DebuggerStackTrace* Debugger::CollectAsyncCausalStackTrace() {
}
DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
+#if defined(DART_PRECOMPILED_RUNTIME)
+ // Causal async stacks are not supported in the AOT runtime.
+ ASSERT(!FLAG_async_debugger);
+ return NULL;
+#else
if (!FLAG_async_debugger) {
return NULL;
}
- // Causal async stacks are not supported in the AOT runtime.
- ASSERT(!FLAG_precompiled_runtime);
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
@@ -2090,6 +2099,7 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
}
return stack_trace;
+#endif // defined(DART_PRECOMPILED_RUNTIME)
}
ActivationFrame* Debugger::TopDartFrame() const {
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/deferred_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698