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

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

Issue 605493002: Do not eagerly compile the function implementation class in case of an error. (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 | 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 patch_uri, 308 patch_uri,
309 bootstrap_libraries[i].patch_paths_); 309 bootstrap_libraries[i].patch_paths_);
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
319 Class& cls = Class::Handle(isolate);
320 // Eagerly compile the function implementation class as it is the super
321 // class of signature classes. This allows us to just finalize signature
322 // classes without going through the hoops of trying to compile them.
323 const Type& type =
324 Type::Handle(isolate, isolate->object_store()->function_impl_type());
325 cls = type.type_class();
326 Compiler::CompileClass(cls);
318 } 327 }
319 328
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
329 // Restore the library tag handler for the isolate. 329 // Restore the library tag handler for the isolate.
330 isolate->set_library_tag_handler(saved_tag_handler); 330 isolate->set_library_tag_handler(saved_tag_handler);
331 331
332 return error.raw(); 332 return error.raw();
333 } 333 }
334 334
335 } // namespace dart 335 } // 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