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

Unified Diff: runtime/vm/stub_code.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
« runtime/vm/parser.h ('K') | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code.cc
===================================================================
--- runtime/vm/stub_code.cc (revision 23046)
+++ runtime/vm/stub_code.cc (working copy)
@@ -96,7 +96,10 @@
RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
- Code& stub = Code::Handle(cls.allocation_stub());
+ Isolate* isolate = Isolate::Current();
+ const Error& error = Error::Handle(isolate, cls.EnsureIsFinalized(isolate));
+ ASSERT(error.IsNull());
+ Code& stub = Code::Handle(isolate, cls.allocation_stub());
if (stub.IsNull()) {
Assembler assembler;
const char* name = cls.ToCString();
« runtime/vm/parser.h ('K') | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698