Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: runtime/vm/weak_code.cc

Issue 609893002: Track references to allocation stubs via static_calls_table, instead of keeping two referencers ali… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698