Index: runtime/vm/debugger.cc |
=================================================================== |
--- runtime/vm/debugger.cc (revision 4638) |
+++ runtime/vm/debugger.cc (working copy) |
@@ -31,7 +31,8 @@ |
saved_bytes_(0), |
line_number_(-1), |
next_(NULL) { |
- Code& code = Code::Handle(func.code()); |
+ ASSERT(!func.HasOptimizedCode()); |
+ Code& code = Code::Handle(func.unoptimized_code()); |
ASSERT(!code.IsNull()); // Function must be compiled. |
PcDescriptors& desc = PcDescriptors::Handle(code.pc_descriptors()); |
ASSERT(pc_desc_index < desc.Length()); |
@@ -87,7 +88,8 @@ |
ASSERT(Isolate::Current() != NULL); |
CodeIndexTable* code_index_table = Isolate::Current()->code_index_table(); |
ASSERT(code_index_table != NULL); |
- function_ = code_index_table->LookupFunction(pc_); |
+ const Code& code = Code::Handle(code_index_table->LookupCode(pc_)); |
+ function_ = code.function(); |
} |
return function_; |
} |
@@ -136,7 +138,8 @@ |
intptr_t ActivationFrame::TokenIndex() { |
if (token_index_ < 0) { |
const Function& func = DartFunction(); |
- Code& code = Code::Handle(func.code()); |
+ ASSERT(!func.HasOptimizedCode()); |
+ Code& code = Code::Handle(func.unoptimized_code()); |
ASSERT(!code.IsNull()); |
PcDescriptors& desc = PcDescriptors::Handle(code.pc_descriptors()); |
for (int i = 0; i < desc.Length(); i++) { |
@@ -164,7 +167,8 @@ |
void ActivationFrame::GetDescIndices() { |
if (var_descriptors_ == NULL) { |
- const Code& code = Code::Handle(DartFunction().code()); |
+ ASSERT(!DartFunction().HasOptimizedCode()); |
+ const Code& code = Code::Handle(DartFunction().unoptimized_code()); |
var_descriptors_ = |
&LocalVarDescriptors::ZoneHandle(code.var_descriptors()); |
GrowableArray<String*> var_names(8); |
@@ -361,7 +365,8 @@ |
return NULL; |
} |
} |
- Code& code = Code::Handle(target_function.code()); |
+ ASSERT(!target_function.HasOptimizedCode()); |
+ Code& code = Code::Handle(target_function.unoptimized_code()); |
ASSERT(!code.IsNull()); |
PcDescriptors& desc = PcDescriptors::Handle(code.pc_descriptors()); |
for (int i = 0; i < desc.Length(); i++) { |
@@ -395,7 +400,7 @@ |
Function& func = Function::Handle(); |
CodePatcher::GetStaticCallAt(desc.PC(i), &func, &bpt->saved_bytes_); |
CodePatcher::PatchStaticCallAt( |
- desc.PC(i), StubCode::BreakpointStaticEntryPoint()); |
+ desc.PC(i), StubCode::BreakpointStaticEntryPoint()); |
RegisterBreakpoint(bpt); |
} |
} |
@@ -415,7 +420,8 @@ |
void Debugger::UnsetBreakpoint(Breakpoint* bpt) { |
const Function& func = Function::Handle(bpt->function()); |
- const Code& code = Code::Handle(func.code()); |
+ ASSERT(!func.HasOptimizedCode()); |
+ const Code& code = Code::Handle(func.unoptimized_code()); |
PcDescriptors& desc = PcDescriptors::Handle(code.pc_descriptors()); |
intptr_t desc_index = bpt->pc_desc_index(); |
ASSERT(desc_index < desc.Length()); |