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

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

Issue 1405253004: Precompilation: Including generative constructor entry points should mark a class as instantiated. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/precompiler.h" 5 #include "vm/precompiler.h"
6 6
7 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/log.h" 10 #include "vm/log.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (FLAG_trace_precompiler) { 275 if (FLAG_trace_precompiler) {
276 THR_Print("WARNING: Missing %s %s %s\n", 276 THR_Print("WARNING: Missing %s %s %s\n",
277 entry_points[i].library_uri, 277 entry_points[i].library_uri,
278 entry_points[i].class_name, 278 entry_points[i].class_name,
279 entry_points[i].function_name); 279 entry_points[i].function_name);
280 } 280 }
281 continue; 281 continue;
282 } 282 }
283 283
284 AddFunction(func); 284 AddFunction(func);
285 if (func.IsGenerativeConstructor()) {
286 // Allocation stubs are referenced from the call site of the constructor,
287 // not in the constructor itself. So compiling the constructor isn't
288 // enough for us to discover the class is instantiated if the class isn't
289 // otherwise instantiated from Dart code and only instantiated from C++.
290 AddClass(cls);
srdjan 2015/10/16 20:10:21 Maybe AddInstantiatedClass?
rmacnak 2015/10/16 20:31:02 That's better.
291 }
285 } 292 }
286 } 293 }
287 294
288 295
289 void Precompiler::Iterate() { 296 void Precompiler::Iterate() {
290 Function& function = Function::Handle(Z); 297 Function& function = Function::Handle(Z);
291 298
292 while (changed_) { 299 while (changed_) {
293 changed_ = false; 300 changed_ = false;
294 301
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 continue; // class 'dynamic' is in the read-only VM isolate. 873 continue; // class 'dynamic' is in the read-only VM isolate.
867 } 874 }
868 cls.EnsureIsFinalized(T); 875 cls.EnsureIsFinalized(T);
869 } 876 }
870 } 877 }
871 I->set_all_classes_finalized(true); 878 I->set_all_classes_finalized(true);
872 } 879 }
873 880
874 881
875 } // namespace dart 882 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698