| OLD | NEW |
| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 bootstrap_libraries[i].patch_paths_); | 332 bootstrap_libraries[i].patch_paths_); |
| 333 if (!error.IsNull()) { | 333 if (!error.IsNull()) { |
| 334 break; | 334 break; |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 if (error.IsNull()) { | 338 if (error.IsNull()) { |
| 339 SetupNativeResolver(); | 339 SetupNativeResolver(); |
| 340 ClassFinalizer::ProcessPendingClasses(); | 340 ClassFinalizer::ProcessPendingClasses(); |
| 341 | 341 |
| 342 Class& cls = Class::Handle(zone); | 342 // Eagerly compile the _Closure class as it is the class of all closure |
| 343 // Eagerly compile the function implementation class as it is the super | 343 // instances. This allows us to just finalize function types |
| 344 // class of signature classes. This allows us to just finalize signature | 344 // without going through the hoops of trying to compile their scope class. |
| 345 // classes without going through the hoops of trying to compile them. | 345 const Class& cls = |
| 346 const Type& type = | 346 Class::Handle(zone, isolate->object_store()->closure_class()); |
| 347 Type::Handle(zone, isolate->object_store()->function_impl_type()); | |
| 348 cls = type.type_class(); | |
| 349 Compiler::CompileClass(cls); | 347 Compiler::CompileClass(cls); |
| 350 } | 348 } |
| 351 | 349 |
| 352 // Restore the library tag handler for the isolate. | 350 // Restore the library tag handler for the isolate. |
| 353 isolate->set_library_tag_handler(saved_tag_handler); | 351 isolate->set_library_tag_handler(saved_tag_handler); |
| 354 | 352 |
| 355 return error.raw(); | 353 return error.raw(); |
| 356 } | 354 } |
| 357 | 355 |
| 358 } // namespace dart | 356 } // namespace dart |
| OLD | NEW |