| 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/code_patcher.h" | 7 #include "vm/code_patcher.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/deopt_instructions.h" | 9 #include "vm/deopt_instructions.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 function ^= deopt_context->ObjectAt(index_); | 107 function ^= deopt_context->ObjectAt(index_); |
| 108 const Error& error = Error::Handle(zone, | 108 const Error& error = Error::Handle(zone, |
| 109 Compiler::EnsureUnoptimizedCode(thread, function)); | 109 Compiler::EnsureUnoptimizedCode(thread, function)); |
| 110 if (!error.IsNull()) { | 110 if (!error.IsNull()) { |
| 111 Exceptions::PropagateError(error); | 111 Exceptions::PropagateError(error); |
| 112 } | 112 } |
| 113 const Code& code = Code::Handle(zone, function.unoptimized_code()); | 113 const Code& code = Code::Handle(zone, function.unoptimized_code()); |
| 114 // Check that deopt_id exists. | 114 // Check that deopt_id exists. |
| 115 // TODO(vegorov): verify after deoptimization targets as well. | 115 // TODO(vegorov): verify after deoptimization targets as well. |
| 116 #ifdef DEBUG | 116 #ifdef DEBUG |
| 117 ASSERT(Isolate::IsDeoptAfter(deopt_id_) || | 117 ASSERT(Thread::IsDeoptAfter(deopt_id_) || |
| 118 (code.GetPcForDeoptId(deopt_id_, RawPcDescriptors::kDeopt) != 0)); | 118 (code.GetPcForDeoptId(deopt_id_, RawPcDescriptors::kDeopt) != 0)); |
| 119 #endif | 119 #endif |
| 120 | 120 |
| 121 uword continue_at_pc = code.GetPcForDeoptId(deopt_id_, | 121 uword continue_at_pc = code.GetPcForDeoptId(deopt_id_, |
| 122 RawPcDescriptors::kDeopt); | 122 RawPcDescriptors::kDeopt); |
| 123 ASSERT(continue_at_pc != 0); | 123 ASSERT(continue_at_pc != 0); |
| 124 uword* dest_addr = reinterpret_cast<uword*>(slot()); | 124 uword* dest_addr = reinterpret_cast<uword*>(slot()); |
| 125 *dest_addr = continue_at_pc; | 125 *dest_addr = continue_at_pc; |
| 126 | 126 |
| 127 if (FLAG_trace_deoptimization_verbose) { | 127 if (FLAG_trace_deoptimization_verbose) { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", | 329 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", |
| 330 offset.Value(), | 330 offset.Value(), |
| 331 value.ToCString()); | 331 value.ToCString()); |
| 332 } | 332 } |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace dart | 338 } // namespace dart |
| OLD | NEW |