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

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

Issue 1808523002: Eagerly finalize bool class, before bool constants are used in the compiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 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/bootstrap.h" 5 #include "vm/bootstrap.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/bootstrap_natives.h" 9 #include "vm/bootstrap_natives.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 } 349 }
350 } 350 }
351 if (error.IsNull()) { 351 if (error.IsNull()) {
352 SetupNativeResolver(); 352 SetupNativeResolver();
353 ClassFinalizer::ProcessPendingClasses(); 353 ClassFinalizer::ProcessPendingClasses();
354 354
355 // Eagerly compile the _Closure class as it is the class of all closure 355 // Eagerly compile the _Closure class as it is the class of all closure
356 // instances. This allows us to just finalize function types 356 // instances. This allows us to just finalize function types
357 // without going through the hoops of trying to compile their scope class. 357 // without going through the hoops of trying to compile their scope class.
358 const Class& cls = 358 Class& cls =
359 Class::Handle(zone, isolate->object_store()->closure_class()); 359 Class::Handle(zone, isolate->object_store()->closure_class());
360 Compiler::CompileClass(cls); 360 Compiler::CompileClass(cls);
361 // Eagerly compile Bool class, bool constants are used from within compiler.
362 cls = isolate->object_store()->bool_class();
363 Compiler::CompileClass(cls);
361 } 364 }
362 365
363 // Restore the library tag handler for the isolate. 366 // Restore the library tag handler for the isolate.
364 isolate->set_library_tag_handler(saved_tag_handler); 367 isolate->set_library_tag_handler(saved_tag_handler);
365 368
366 return error.raw(); 369 return error.raw();
367 } 370 }
368 371
369 } // namespace dart 372 } // 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