Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 if (code.IsNull()) { | 95 if (code.IsNull()) { |
| 96 // Code was garbage collected already. | 96 // Code was garbage collected already. |
| 97 continue; | 97 continue; |
| 98 } | 98 } |
| 99 owner = code.owner(); | 99 owner = code.owner(); |
| 100 if (owner.IsFunction()) { | 100 if (owner.IsFunction()) { |
| 101 function ^= owner.raw(); | 101 function ^= owner.raw(); |
| 102 } else if (owner.IsClass()) { | 102 } else if (owner.IsClass()) { |
| 103 Class& cls = Class::Handle(); | 103 Class& cls = Class::Handle(); |
| 104 cls ^= owner.raw(); | 104 cls ^= owner.raw(); |
| 105 OS::Print("Skipping code owned by class %s\n", cls.ToCString()); | |
|
rmacnak
2016/02/05 00:44:07
Yikes
| |
| 106 cls.DisableAllocationStub(); | 105 cls.DisableAllocationStub(); |
| 107 continue; | 106 continue; |
| 108 } else if (owner.IsNull()) { | 107 } else if (owner.IsNull()) { |
| 109 OS::Print("Skipping code owned by null: "); | |
| 110 code.Print(); | 108 code.Print(); |
| 111 continue; | 109 continue; |
| 112 } | 110 } |
| 113 | 111 |
| 114 // If function uses dependent code switch it to unoptimized. | 112 // If function uses dependent code switch it to unoptimized. |
| 115 if (code.is_optimized() && (function.CurrentCode() == code.raw())) { | 113 if (code.is_optimized() && (function.CurrentCode() == code.raw())) { |
| 116 ReportSwitchingCode(code); | 114 ReportSwitchingCode(code); |
| 117 function.SwitchToUnoptimizedCode(); | 115 function.SwitchToUnoptimizedCode(); |
| 118 } else if (function.unoptimized_code() == code.raw()) { | 116 } else if (function.unoptimized_code() == code.raw()) { |
| 119 ReportSwitchingCode(code); | 117 ReportSwitchingCode(code); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 130 // Make non-OSR code non-entrant. | 128 // Make non-OSR code non-entrant. |
| 131 if (!code.IsDisabled()) { | 129 if (!code.IsDisabled()) { |
| 132 ReportSwitchingCode(code); | 130 ReportSwitchingCode(code); |
| 133 code.DisableDartCode(); | 131 code.DisableDartCode(); |
| 134 } | 132 } |
| 135 } | 133 } |
| 136 } | 134 } |
| 137 } | 135 } |
| 138 | 136 |
| 139 } // namespace dart | 137 } // namespace dart |
| OLD | NEW |