Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 562c4921023de034b0fce2d697f359da7524615d..97caee3c32285dea59f7e76fe521d2ef77166f6f 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -663,6 +663,15 @@ RawError* Object::Init(Isolate* isolate) { |
return error.raw(); |
} |
+ const Script& isolate_script = Script::Handle(Bootstrap::LoadIsolateScript()); |
+ Library::InitIsolateLibrary(isolate); |
+ Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); |
+ ASSERT(!isolate_lib.IsNull()); |
+ error = Bootstrap::Compile(isolate_lib, isolate_script); |
+ if (!error.IsNull()) { |
+ return error.raw(); |
+ } |
+ |
Bootstrap::SetupNativeResolver(); |
// Remove the Object superclass cycle by setting the super type to null (not |
@@ -4627,6 +4636,14 @@ void Library::InitCoreLibrary(Isolate* isolate) { |
} |
+void Library::InitIsolateLibrary(Isolate* isolate) { |
+ const String& url = String::Handle(String::NewSymbol("dart:isolate")); |
+ const Library& lib = Library::Handle(Library::New(url)); |
+ lib.Register(); |
+ isolate->object_store()->set_isolate_library(lib); |
+} |
+ |
+ |
void Library::InitNativeWrappersLibrary(Isolate* isolate) { |
static const int kNumNativeWrappersClasses = 4; |
ASSERT(kNumNativeWrappersClasses > 0 && kNumNativeWrappersClasses < 10); |
@@ -4734,6 +4751,11 @@ RawLibrary* Library::CoreImplLibrary() { |
} |
+RawLibrary* Library::IsolateLibrary() { |
+ return Isolate::Current()->object_store()->isolate_library(); |
+} |
+ |
+ |
RawLibrary* Library::NativeWrappersLibrary() { |
return Isolate::Current()->object_store()->native_wrappers_library(); |
} |