Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 1073173003: Eliminate object table and use regular object pool for deoptimization infos. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698