| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 4033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4044 void Function::DetachCode() const { | 4044 void Function::DetachCode() const { |
| 4045 // Set unoptimized code as non-entrant, and set code and unoptimized code | 4045 // Set unoptimized code as non-entrant, and set code and unoptimized code |
| 4046 // to null. | 4046 // to null. |
| 4047 CodePatcher::PatchEntry(Code::Handle(unoptimized_code())); | 4047 CodePatcher::PatchEntry(Code::Handle(unoptimized_code())); |
| 4048 StorePointer(&raw_ptr()->code_, Code::null()); | 4048 StorePointer(&raw_ptr()->code_, Code::null()); |
| 4049 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); | 4049 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); |
| 4050 } | 4050 } |
| 4051 | 4051 |
| 4052 | 4052 |
| 4053 void Function::ReattachCode(const Code& code) const { | 4053 void Function::ReattachCode(const Code& code) const { |
| 4054 set_unoptimized_code(code); | 4054 StorePointer(&raw_ptr()->code_, code.raw()); |
| 4055 SetCode(code); | 4055 StorePointer(&raw_ptr()->unoptimized_code_, code.raw()); |
| 4056 CodePatcher::RestoreEntry(code); | 4056 CodePatcher::RestoreEntry(code); |
| 4057 } | 4057 } |
| 4058 | 4058 |
| 4059 | 4059 |
| 4060 void Function::SwitchToUnoptimizedCode() const { | 4060 void Function::SwitchToUnoptimizedCode() const { |
| 4061 ASSERT(HasOptimizedCode()); | 4061 ASSERT(HasOptimizedCode()); |
| 4062 | 4062 |
| 4063 const Code& current_code = Code::Handle(CurrentCode()); | 4063 const Code& current_code = Code::Handle(CurrentCode()); |
| 4064 | 4064 |
| 4065 // Optimized code object might have been actually fully produced by the | 4065 // Optimized code object might have been actually fully produced by the |
| (...skipping 11522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15588 return "_MirrorReference"; | 15588 return "_MirrorReference"; |
| 15589 } | 15589 } |
| 15590 | 15590 |
| 15591 | 15591 |
| 15592 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 15592 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 15593 JSONObject jsobj(stream); | 15593 JSONObject jsobj(stream); |
| 15594 } | 15594 } |
| 15595 | 15595 |
| 15596 | 15596 |
| 15597 } // namespace dart | 15597 } // namespace dart |
| OLD | NEW |