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

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

Issue 569313002: Skip compilation of signature classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/vm/compiler.cc » ('j') | 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (!error.IsNull()) { 245 if (!error.IsNull()) {
246 return error.raw(); 246 return error.raw();
247 } 247 }
248 } 248 }
249 return Error::null(); 249 return Error::null();
250 } 250 }
251 251
252 252
253 RawError* Bootstrap::LoadandCompileScripts() { 253 RawError* Bootstrap::LoadandCompileScripts() {
254 Isolate* isolate = Isolate::Current(); 254 Isolate* isolate = Isolate::Current();
255 String& uri = String::Handle(); 255 String& uri = String::Handle(isolate);
256 String& patch_uri = String::Handle(); 256 String& patch_uri = String::Handle(isolate);
257 String& source = String::Handle(); 257 String& source = String::Handle(isolate);
258 Script& script = Script::Handle(); 258 Script& script = Script::Handle(isolate);
259 Library& lib = Library::Handle(); 259 Library& lib = Library::Handle(isolate);
260 Error& error = Error::Handle(); 260 Error& error = Error::Handle(isolate);
261 Dart_LibraryTagHandler saved_tag_handler = isolate->library_tag_handler(); 261 Dart_LibraryTagHandler saved_tag_handler = isolate->library_tag_handler();
262 262
263 // Set the library tag handler for the isolate to the bootstrap 263 // Set the library tag handler for the isolate to the bootstrap
264 // library tag handler so that we can load all the bootstrap libraries. 264 // library tag handler so that we can load all the bootstrap libraries.
265 isolate->set_library_tag_handler(BootstrapLibraryTagHandler); 265 isolate->set_library_tag_handler(BootstrapLibraryTagHandler);
266 266
267 HANDLESCOPE(isolate); 267 HANDLESCOPE(isolate);
268 268
269 // Create library objects for all the bootstrap libraries. 269 // Create library objects for all the bootstrap libraries.
270 for (intptr_t i = 0; 270 for (intptr_t i = 0;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 if (!error.IsNull()) { 310 if (!error.IsNull()) {
311 break; 311 break;
312 } 312 }
313 } 313 }
314 } 314 }
315 if (error.IsNull()) { 315 if (error.IsNull()) {
316 SetupNativeResolver(); 316 SetupNativeResolver();
317 ClassFinalizer::ProcessPendingClasses(); 317 ClassFinalizer::ProcessPendingClasses();
318 } 318 }
319 319
320 Class& cls = Class::Handle(isolate);
321 // Eagerly compile the function implementation class as it is the super
322 // class of signature classes. This allows us to just finalize signature
323 // classes without going through the hoops of trying to compile them.
324 const Type& type =
325 Type::Handle(isolate, isolate->object_store()->function_impl_type());
326 cls = type.type_class();
327 Compiler::CompileClass(cls);
328
320 // Restore the library tag handler for the isolate. 329 // Restore the library tag handler for the isolate.
321 isolate->set_library_tag_handler(saved_tag_handler); 330 isolate->set_library_tag_handler(saved_tag_handler);
322 331
323 return error.raw(); 332 return error.raw();
324 } 333 }
325 334
326 } // namespace dart 335 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698