| 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 5089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5100 StorePointer(&raw_ptr()->instructions_, | 5100 StorePointer(&raw_ptr()->instructions_, |
| 5101 Code::Handle(stub_code->LazyCompile_entry()->code()).instructions()); | 5101 Code::Handle(stub_code->LazyCompile_entry()->code()).instructions()); |
| 5102 } | 5102 } |
| 5103 | 5103 |
| 5104 | 5104 |
| 5105 void Function::SwitchToUnoptimizedCode() const { | 5105 void Function::SwitchToUnoptimizedCode() const { |
| 5106 ASSERT(HasOptimizedCode()); | 5106 ASSERT(HasOptimizedCode()); |
| 5107 Isolate* isolate = Isolate::Current(); | 5107 Isolate* isolate = Isolate::Current(); |
| 5108 const Code& current_code = Code::Handle(isolate, CurrentCode()); | 5108 const Code& current_code = Code::Handle(isolate, CurrentCode()); |
| 5109 | 5109 |
| 5110 if (FLAG_trace_disabling_optimized_code) { | 5110 if (FLAG_trace_deoptimization) { |
| 5111 OS::Print("Disabling optimized code: '%s' entry: %#" Px "\n", | 5111 OS::Print("Disabling optimized code: '%s' entry: %#" Px "\n", |
| 5112 ToFullyQualifiedCString(), | 5112 ToFullyQualifiedCString(), |
| 5113 current_code.EntryPoint()); | 5113 current_code.EntryPoint()); |
| 5114 } | 5114 } |
| 5115 // Patch entry of the optimized code. | 5115 // Patch entry of the optimized code. |
| 5116 CodePatcher::PatchEntry(current_code); | 5116 CodePatcher::PatchEntry(current_code); |
| 5117 // Use previously compiled unoptimized code. | 5117 // Use previously compiled unoptimized code. |
| 5118 AttachCode(Code::Handle(isolate, unoptimized_code())); | 5118 AttachCode(Code::Handle(isolate, unoptimized_code())); |
| 5119 CodePatcher::RestoreEntry(Code::Handle(isolate, unoptimized_code())); | 5119 CodePatcher::RestoreEntry(Code::Handle(isolate, unoptimized_code())); |
| 5120 isolate->TrackDeoptimizedCode(current_code); | 5120 isolate->TrackDeoptimizedCode(current_code); |
| (...skipping 15609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20730 return tag_label.ToCString(); | 20730 return tag_label.ToCString(); |
| 20731 } | 20731 } |
| 20732 | 20732 |
| 20733 | 20733 |
| 20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20735 Instance::PrintJSONImpl(stream, ref); | 20735 Instance::PrintJSONImpl(stream, ref); |
| 20736 } | 20736 } |
| 20737 | 20737 |
| 20738 | 20738 |
| 20739 } // namespace dart | 20739 } // namespace dart |
| OLD | NEW |