OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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/weak_code.h" | 5 #include "vm/weak_code.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 | 8 |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Code was garbage collected already. | 87 // Code was garbage collected already. |
88 continue; | 88 continue; |
89 } | 89 } |
90 owner = code.owner(); | 90 owner = code.owner(); |
91 if (owner.IsFunction()) { | 91 if (owner.IsFunction()) { |
92 function ^= owner.raw(); | 92 function ^= owner.raw(); |
93 } else if (owner.IsClass()) { | 93 } else if (owner.IsClass()) { |
94 Class& cls = Class::Handle(); | 94 Class& cls = Class::Handle(); |
95 cls ^= owner.raw(); | 95 cls ^= owner.raw(); |
96 OS::Print("Skipping code owned by class %s\n", cls.ToCString()); | 96 OS::Print("Skipping code owned by class %s\n", cls.ToCString()); |
97 cls.SwitchAllocationStub(); | 97 cls.DisableAllocationStub(); |
98 continue; | 98 continue; |
99 } else if (owner.IsNull()) { | 99 } else if (owner.IsNull()) { |
100 OS::Print("Skipping code owned by null: "); | 100 OS::Print("Skipping code owned by null: "); |
101 code.Print(); | 101 code.Print(); |
102 continue; | 102 continue; |
103 } | 103 } |
104 | 104 |
105 // If function uses dependent code switch it to unoptimized. | 105 // If function uses dependent code switch it to unoptimized. |
106 if (code.is_optimized() && (function.CurrentCode() == code.raw())) { | 106 if (code.is_optimized() && (function.CurrentCode() == code.raw())) { |
107 ReportSwitchingCode(code); | 107 ReportSwitchingCode(code); |
(...skipping 15 matching lines...) Expand all Loading... |
123 if (!CodePatcher::IsEntryPatched(code)) { | 123 if (!CodePatcher::IsEntryPatched(code)) { |
124 ReportSwitchingCode(code); | 124 ReportSwitchingCode(code); |
125 CodePatcher::PatchEntry(code); | 125 CodePatcher::PatchEntry(code); |
126 } | 126 } |
127 } | 127 } |
128 } | 128 } |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 } // namespace dart | 132 } // namespace dart |
OLD | NEW |