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

Unified Diff: runtime/vm/intrinsifier.cc

Issue 14820028: Delay Class parsing until the class is actually used. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/dart_api_impl.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier.cc
===================================================================
--- runtime/vm/intrinsifier.cc (revision 23087)
+++ runtime/vm/intrinsifier.cc (working copy)
@@ -92,10 +92,12 @@
void Intrinsifier::InitializeState() {
- Library& lib = Library::Handle();
- Class& cls = Class::Handle();
- Function& func = Function::Handle();
- String& str = String::Handle();
+ Isolate* isolate = Isolate::Current();
+ Library& lib = Library::Handle(isolate);
+ Class& cls = Class::Handle(isolate);
+ Function& func = Function::Handle(isolate);
+ String& str = String::Handle(isolate);
+ Error& error = Error::Handle(isolate);
#define SETUP_FUNCTION(class_name, function_name, destination, fp) \
if (strcmp(#class_name, "::") == 0) { \
@@ -105,6 +107,8 @@
str = String::New(#class_name); \
cls = lib.LookupClassAllowPrivate(str); \
ASSERT(!cls.IsNull()); \
+ error = cls.EnsureIsFinalized(isolate); \
+ ASSERT(error.IsNull()); \
if (#function_name[0] == '.') { \
str = String::New(#class_name#function_name); \
} else { \
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698