OLD | NEW |
---|---|
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
7 | 7 |
8 #include "vm/instructions.h" | 8 #include "vm/instructions.h" |
9 #include "vm/instructions_dbc.h" | 9 #include "vm/instructions_dbc.h" |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 Register* reg, | 105 Register* reg, |
106 intptr_t* index) { | 106 intptr_t* index) { |
107 UNIMPLEMENTED(); | 107 UNIMPLEMENTED(); |
108 return 0; | 108 return 0; |
109 } | 109 } |
110 | 110 |
111 | 111 |
112 bool DecodeLoadObjectFromPoolOrThread(uword pc, | 112 bool DecodeLoadObjectFromPoolOrThread(uword pc, |
113 const Code& code, | 113 const Code& code, |
114 Object* obj) { | 114 Object* obj) { |
115 UNIMPLEMENTED(); | 115 ASSERT(code.ContainsInstructionAt(pc)); |
116 Instr instr = Bytecode::At(pc); | |
117 if ((Bytecode::DecodeOpcode(instr) == Bytecode::kPushConstant) || | |
118 (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
| |
119 uint16_t index = Bytecode::DecodeD(instr); | |
120 const ObjectPool& pool = ObjectPool::Handle(code.object_pool()); | |
121 if (pool.InfoAt(index) == ObjectPool::kTaggedObject) { | |
122 *obj = pool.ObjectAt(index); | |
123 return true; | |
124 } | |
125 } | |
116 return false; | 126 return false; |
117 } | 127 } |
118 | 128 |
119 | 129 |
120 RawICData* CallPattern::IcData() { | 130 RawICData* CallPattern::IcData() { |
121 UNIMPLEMENTED(); | 131 UNIMPLEMENTED(); |
122 return ICData::null(); | 132 return ICData::null(); |
123 } | 133 } |
124 | 134 |
125 | 135 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 | 181 |
172 | 182 |
173 bool ReturnPattern::IsValid() const { | 183 bool ReturnPattern::IsValid() const { |
174 UNIMPLEMENTED(); | 184 UNIMPLEMENTED(); |
175 return false; | 185 return false; |
176 } | 186 } |
177 | 187 |
178 } // namespace dart | 188 } // namespace dart |
179 | 189 |
180 #endif // defined TARGET_ARCH_DBC | 190 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |