Index: runtime/vm/deopt_instructions.cc |
=================================================================== |
--- runtime/vm/deopt_instructions.cc (revision 45086) |
+++ runtime/vm/deopt_instructions.cc (working copy) |
@@ -27,7 +27,7 @@ |
fpu_register_t* fpu_registers, |
intptr_t* cpu_registers) |
: code_(code.raw()), |
- object_table_(code.object_table()), |
+ object_pool_(code.ObjectPool()), |
deopt_info_(TypedData::null()), |
dest_frame_is_allocated_(false), |
dest_frame_(NULL), |
@@ -130,7 +130,7 @@ |
void DeoptContext::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
- visitor->VisitPointer(reinterpret_cast<RawObject**>(&object_table_)); |
+ visitor->VisitPointer(reinterpret_cast<RawObject**>(&object_pool_)); |
visitor->VisitPointer(reinterpret_cast<RawObject**>(&deopt_info_)); |
// Visit any object pointers on the destination stack. |
@@ -916,12 +916,13 @@ |
}; |
-DeoptInfoBuilder::DeoptInfoBuilder(Zone* zone, const intptr_t num_args) |
+DeoptInfoBuilder::DeoptInfoBuilder(Zone* zone, |
+ const intptr_t num_args, |
+ Assembler* assembler) |
: zone_(zone), |
instructions_(), |
- object_table_(GrowableObjectArray::Handle( |
- GrowableObjectArray::New(Heap::kOld))), |
num_args_(num_args), |
+ assembler_(assembler), |
trie_root_(new(zone) TrieNode()), |
current_info_number_(0), |
frame_start_(-1), |
@@ -930,15 +931,7 @@ |
intptr_t DeoptInfoBuilder::FindOrAddObjectInTable(const Object& obj) const { |
- for (intptr_t i = 0; i < object_table_.Length(); i++) { |
- if (object_table_.At(i) == obj.raw()) { |
- return i; |
- } |
- } |
- // Add object. |
- const intptr_t result = object_table_.Length(); |
- object_table_.Add(obj, Heap::kOld); |
- return result; |
+ return assembler_->object_pool().FindObject(obj, kNotPatchable); |
} |