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

Unified Diff: runtime/vm/compiler.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 40272)
+++ runtime/vm/compiler.cc (working copy)
@@ -157,6 +157,27 @@
if (cls.is_marked_for_parsing()) {
return Error::null();
}
+ // If the class is a signature class there is no need to try and
+ // compile it. Just finalize it directly.
+ if (cls.IsSignatureClass()) {
+#if defined(DEBUG)
+ const Type& type = Type::Handle(
+ Isolate::Current()->object_store()->function_impl_type());
+ const Class& type_cls = Class::Handle(type.type_class());
+ ASSERT(type_cls.is_finalized());
+#endif
+ LongJumpScope jump;
+ if (setjmp(*jump.Set()) == 0) {
+ ClassFinalizer::FinalizeClass(cls);
+ return Error::null();
+ } else {
+ Isolate* isolate = Isolate::Current();
+ Error& error = Error::Handle(isolate);
+ error = isolate->object_store()->sticky_error();
+ isolate->object_store()->clear_sticky_error();
+ return error.raw();
+ }
+ }
Isolate* isolate = Isolate::Current();
// We remember all the classes that are being compiled in these lists. This
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698