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

Unified Diff: runtime/vm/object.cc

Issue 12260026: Add support for object pool (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 18603)
+++ runtime/vm/object.cc (working copy)
@@ -7648,9 +7648,12 @@
region.Store<RawObject*>(offset_in_instrs, object->raw());
}
- // Hook up Code and Instruction objects.
+ // Hook up Code and Instructions objects.
instrs.set_code(code.raw());
code.set_instructions(instrs.raw());
+
+ // Set object pool in Instructions object.
+ instrs.set_object_pool(Array::MakeArray(assembler->object_pool()));
}
return code.raw();
}
@@ -7708,7 +7711,7 @@
if ((descriptors.DeoptId(i) == deopt_id) &&
(descriptors.DescriptorKind(i) == kind)) {
uword pc = descriptors.PC(i);
- ASSERT((EntryPoint() <= pc) && (pc < (EntryPoint() + Size())));
+ ASSERT(ContainsInstructionAt(pc));
return pc;
}
}
@@ -7777,7 +7780,8 @@
max_id = deopt_id;
}
node_ids->Add(deopt_id);
- CodePatcher::GetInstanceCallAt(descriptors.PC(i), &ic_data_obj, NULL);
+ CodePatcher::GetInstanceCallAt(descriptors.PC(i), *this,
+ &ic_data_obj, NULL);
ic_data_objs.Add(ic_data_obj);
}
}
@@ -7813,7 +7817,7 @@
if (descriptors.DescriptorKind(i) == PcDescriptors::kFuncCall) {
// Static call.
const uword target_addr =
- CodePatcher::GetStaticCallTargetAt(descriptors.PC(i));
+ CodePatcher::GetStaticCallTargetAt(descriptors.PC(i), *this);
if (target_addr == StubCode::CallStaticFunctionEntryPoint()) {
deopt_ids->Add(descriptors.DeoptId(i));
}
@@ -11890,6 +11894,9 @@
RawArray* Array::MakeArray(const GrowableObjectArray& growable_array) {
+ if (growable_array.IsNull()) {
+ return Array::null();
+ }
intptr_t used_len = growable_array.Length();
intptr_t capacity_len = growable_array.Capacity();
Isolate* isolate = Isolate::Current();
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698