| 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 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 DECLARE_FLAG(bool, trace_deoptimization_verbose); | 13 DECLARE_FLAG(bool, trace_deoptimization_verbose); |
| 14 | 14 |
| 15 | 15 |
| 16 void DeferredDouble::Materialize(DeoptContext* deopt_context) { | 16 void DeferredDouble::Materialize(DeoptContext* deopt_context) { |
| 17 RawDouble** double_slot = reinterpret_cast<RawDouble**>(slot()); | 17 RawDouble** double_slot = reinterpret_cast<RawDouble**>(slot()); |
| 18 *double_slot = Double::New(value()); | 18 *double_slot = Double::New(value()); |
| 19 | 19 |
| 20 if (FLAG_trace_deoptimization_verbose) { | 20 if (FLAG_trace_deoptimization_verbose) { |
| 21 OS::PrintErr("materializing double at %" Px ": %g\n", | 21 OS::PrintErr("materializing double at %" Px ": %g\n", |
| 22 reinterpret_cast<uword>(slot()), value()); | 22 reinterpret_cast<uword>(slot()), value()); |
| 23 } | 23 } |
| 24 } | 24 } |
| 25 | 25 |
| 26 | 26 |
| 27 void DeferredMint::Materialize(DeoptContext* deopt_context) { | 27 void DeferredMint::Materialize(DeoptContext* deopt_context) { |
| 28 RawMint** mint_slot = reinterpret_cast<RawMint**>(slot()); | 28 RawMint** mint_slot = reinterpret_cast<RawMint**>(slot()); |
| 29 ASSERT(!Smi::IsValid64(value())); | 29 ASSERT(!Smi::IsValid(value())); |
| 30 Mint& mint = Mint::Handle(); | 30 Mint& mint = Mint::Handle(); |
| 31 mint ^= Integer::New(value()); | 31 mint ^= Integer::New(value()); |
| 32 *mint_slot = mint.raw(); | 32 *mint_slot = mint.raw(); |
| 33 | 33 |
| 34 if (FLAG_trace_deoptimization_verbose) { | 34 if (FLAG_trace_deoptimization_verbose) { |
| 35 OS::PrintErr("materializing mint at %" Px ": %" Pd64 "\n", | 35 OS::PrintErr("materializing mint at %" Px ": %" Pd64 "\n", |
| 36 reinterpret_cast<uword>(slot()), value()); | 36 reinterpret_cast<uword>(slot()), value()); |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 | 39 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 offset.Value(), | 141 offset.Value(), |
| 142 value.ToCString()); | 142 value.ToCString()); |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 object_ = &obj; | 147 object_ = &obj; |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace dart | 150 } // namespace dart |
| OLD | NEW |