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

Unified Diff: runtime/vm/deferred_objects.cc

Issue 118133004: Revert r31326. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/deferred_objects.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deferred_objects.cc
===================================================================
--- runtime/vm/deferred_objects.cc (revision 31331)
+++ runtime/vm/deferred_objects.cc (working copy)
@@ -13,7 +13,7 @@
DECLARE_FLAG(bool, trace_deoptimization_verbose);
-void DeferredDouble::Materialize(DeoptContext* deopt_context) {
+void DeferredDouble::Materialize() {
RawDouble** double_slot = reinterpret_cast<RawDouble**>(slot());
*double_slot = Double::New(value());
@@ -24,7 +24,7 @@
}
-void DeferredMint::Materialize(DeoptContext* deopt_context) {
+void DeferredMint::Materialize() {
RawMint** mint_slot = reinterpret_cast<RawMint**>(slot());
ASSERT(!Smi::IsValid64(value()));
Mint& mint = Mint::Handle();
@@ -38,7 +38,7 @@
}
-void DeferredFloat32x4::Materialize(DeoptContext* deopt_context) {
+void DeferredFloat32x4::Materialize() {
RawFloat32x4** float32x4_slot = reinterpret_cast<RawFloat32x4**>(slot());
RawFloat32x4* raw_float32x4 = Float32x4::New(value());
*float32x4_slot = raw_float32x4;
@@ -54,7 +54,7 @@
}
-void DeferredInt32x4::Materialize(DeoptContext* deopt_context) {
+void DeferredInt32x4::Materialize() {
RawInt32x4** int32x4_slot = reinterpret_cast<RawInt32x4**>(slot());
RawInt32x4* raw_int32x4 = Int32x4::New(value());
*int32x4_slot = raw_int32x4;
@@ -70,8 +70,13 @@
}
-void DeferredObjectRef::Materialize(DeoptContext* deopt_context) {
- DeferredObject* obj = deopt_context->GetDeferredObject(index());
+void DeferredObjectRef::Materialize() {
+ // TODO(turnidge): Consider passing the deopt_context to materialize
+ // instead of accessing it through the current isolate. It would
+ // make it easier to test deferred object materialization in a unit
+ // test eventually.
+ DeferredObject* obj =
+ Isolate::Current()->deopt_context()->GetDeferredObject(index());
*slot() = obj->object();
if (FLAG_trace_deoptimization_verbose) {
OS::PrintErr("writing instance ref at %" Px ": %s\n",
« no previous file with comments | « runtime/vm/deferred_objects.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698