| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/deferred_objects.h" | 5 #include "vm/deferred_objects.h" |
| 6 | 6 |
| 7 #include "vm/deopt_instructions.h" | 7 #include "vm/deopt_instructions.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 OS::PrintErr("materializing Int32x4 at %" Px ": %x,%x,%x,%x\n", | 81 OS::PrintErr("materializing Int32x4 at %" Px ": %x,%x,%x,%x\n", |
| 82 reinterpret_cast<uword>(slot()), x, y, z, w); | 82 reinterpret_cast<uword>(slot()), x, y, z, w); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 | 86 |
| 87 void DeferredObjectRef::Materialize(DeoptContext* deopt_context) { | 87 void DeferredObjectRef::Materialize(DeoptContext* deopt_context) { |
| 88 DeferredObject* obj = deopt_context->GetDeferredObject(index()); | 88 DeferredObject* obj = deopt_context->GetDeferredObject(index()); |
| 89 *slot() = obj->object(); | 89 *slot() = obj->object(); |
| 90 if (FLAG_trace_deoptimization_verbose) { | 90 if (FLAG_trace_deoptimization_verbose) { |
| 91 const Class& cls = Class::Handle(Isolate::Current()->class_table()->At( | 91 OS::PrintErr("writing instance ref at %" Px ": %s\n", |
| 92 Object::Handle(obj->object()).GetClassId())); | 92 reinterpret_cast<uword>(slot()), |
| 93 OS::PrintErr("writing instance of class %s ref at %" Px ".\n", | 93 Instance::Handle(obj->object()).ToCString()); |
| 94 cls.ToCString(), | |
| 95 reinterpret_cast<uword>(slot())); | |
| 96 } | 94 } |
| 97 } | 95 } |
| 98 | 96 |
| 99 | 97 |
| 100 RawInstance* DeferredObject::object() { | 98 RawInstance* DeferredObject::object() { |
| 101 if (object_ == NULL) { | 99 if (object_ == NULL) { |
| 102 Create(); | 100 Create(); |
| 103 } | 101 } |
| 104 return object_->raw(); | 102 return object_->raw(); |
| 105 } | 103 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (FLAG_trace_deoptimization_verbose) { | 153 if (FLAG_trace_deoptimization_verbose) { |
| 156 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", | 154 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", |
| 157 offset.Value(), | 155 offset.Value(), |
| 158 value.ToCString()); | 156 value.ToCString()); |
| 159 } | 157 } |
| 160 } | 158 } |
| 161 } | 159 } |
| 162 } | 160 } |
| 163 | 161 |
| 164 } // namespace dart | 162 } // namespace dart |
| OLD | NEW |