| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 Field& field = Field::Handle(); | 120 Field& field = Field::Handle(); |
| 121 Object& value = Object::Handle(); | 121 Object& value = Object::Handle(); |
| 122 const Array& offset_map = Array::Handle(cls.OffsetToFieldMap()); | 122 const Array& offset_map = Array::Handle(cls.OffsetToFieldMap()); |
| 123 | 123 |
| 124 for (intptr_t i = 0; i < field_count_; i++) { | 124 for (intptr_t i = 0; i < field_count_; i++) { |
| 125 offset ^= GetFieldOffset(i); | 125 offset ^= GetFieldOffset(i); |
| 126 field ^= offset_map.At(offset.Value() / kWordSize); | 126 field ^= offset_map.At(offset.Value() / kWordSize); |
| 127 value = GetValue(i); | 127 value = GetValue(i); |
| 128 if (!field.IsNull()) { | 128 if (!field.IsNull()) { |
| 129 obj.SetField(field, value); | 129 obj.SetField(field, value); |
| 130 if (FLAG_trace_deoptimization_verbose) { |
| 131 OS::PrintErr(" %s <- %s\n", |
| 132 String::Handle(field.name()).ToCString(), |
| 133 value.ToCString()); |
| 134 } |
| 130 } else { | 135 } else { |
| 131 ASSERT(cls.IsSignatureClass() || | 136 ASSERT(cls.IsSignatureClass() || |
| 132 (offset.Value() == cls.type_arguments_field_offset())); | 137 (offset.Value() == cls.type_arguments_field_offset())); |
| 133 obj.SetFieldAtOffset(offset.Value(), value); | 138 obj.SetFieldAtOffset(offset.Value(), value); |
| 134 } | 139 if (FLAG_trace_deoptimization_verbose) { |
| 135 | 140 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", |
| 136 if (FLAG_trace_deoptimization_verbose) { | 141 offset.Value(), |
| 137 OS::PrintErr(" %s <- %s\n", | 142 value.ToCString()); |
| 138 String::Handle(field.name()).ToCString(), | 143 } |
| 139 value.ToCString()); | |
| 140 } | 144 } |
| 141 } | 145 } |
| 142 | 146 |
| 143 object_ = &obj; | 147 object_ = &obj; |
| 144 } | 148 } |
| 145 | 149 |
| 146 } // namespace dart | 150 } // namespace dart |
| OLD | NEW |