Index: runtime/vm/debugger.cc |
=================================================================== |
--- runtime/vm/debugger.cc (revision 45130) |
+++ runtime/vm/debugger.cc (working copy) |
@@ -460,7 +460,12 @@ |
void ActivationFrame::GetVarDescriptors() { |
if (var_descriptors_.IsNull()) { |
- var_descriptors_ = code().var_descriptors(); |
+ if (code().is_optimized()) { |
+ Compiler::EnsureUnoptimizedCode(Thread::Current(), function()); |
+ } |
+ var_descriptors_ = code().is_optimized() |
+ ? Code::Handle(function().unoptimized_code()).var_descriptors() |
+ : code().var_descriptors(); |
srdjan
2015/04/15 16:25:45
Could this be just :
var_descriptors = Code::Handl
Florian Schneider
2015/04/16 11:37:18
Yes. I'll simplify it.
I think it is fine to have
|
ASSERT(!var_descriptors_.IsNull()); |
} |
} |
@@ -654,7 +659,7 @@ |
return desc_indices_.length(); |
} |
-// TODO(hausner): Handle captured variables. |
+ |
RawObject* ActivationFrame::GetLocalVar(intptr_t slot_index) { |
if (deopt_frame_.IsNull()) { |
uword var_address = fp() + slot_index * kWordSize; |