Index: runtime/vm/instructions_dbc.cc |
diff --git a/runtime/vm/instructions_dbc.cc b/runtime/vm/instructions_dbc.cc |
index 38b69f41a04a97cc160b39e6704d3d6f0ccaf9c0..65143ac3a2dcf194d0b5dfcccf2db131eff8ce99 100644 |
--- a/runtime/vm/instructions_dbc.cc |
+++ b/runtime/vm/instructions_dbc.cc |
@@ -112,7 +112,17 @@ uword InstructionPattern::DecodeLoadWordFromPool(uword end, |
bool DecodeLoadObjectFromPoolOrThread(uword pc, |
const Code& code, |
Object* obj) { |
- UNIMPLEMENTED(); |
+ ASSERT(code.ContainsInstructionAt(pc)); |
+ Instr instr = Bytecode::At(pc); |
+ if ((Bytecode::DecodeOpcode(instr) == Bytecode::kPushConstant) || |
+ (Bytecode::DecodeOpcode(instr) == Bytecode::kLoadConstant)) { |
Vyacheslav Egorov (Google)
2016/05/09 18:26:13
There are more instructions that load stuff from p
zra
2016/05/09 19:36:11
Ah, yah, it looks like lots of these have potentia
|
+ uint16_t index = Bytecode::DecodeD(instr); |
+ const ObjectPool& pool = ObjectPool::Handle(code.object_pool()); |
+ if (pool.InfoAt(index) == ObjectPool::kTaggedObject) { |
+ *obj = pool.ObjectAt(index); |
+ return true; |
+ } |
+ } |
return false; |
} |