| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 56c2e1b61432da7915d08a61d1f6ab520acbf949..18f8575e4754b8836a9c0249c51938394a4e6cfb 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -968,6 +968,15 @@ RawError* Object::Init(Isolate* isolate) {
|
| if (!error.IsNull()) {
|
| return error.raw();
|
| }
|
| + const Script& collection_dev_script =
|
| + Script::Handle(Bootstrap::LoadCollectionDevScript(false));
|
| + const Library& collection_dev_lib =
|
| + Library::Handle(Library::CollectionDevLibrary());
|
| + ASSERT(!collection_dev_lib.IsNull());
|
| + error = Bootstrap::Compile(collection_dev_lib, collection_dev_script);
|
| + if (!error.IsNull()) {
|
| + return error.raw();
|
| + }
|
| const Script& math_script = Script::Handle(Bootstrap::LoadMathScript(false));
|
| const Library& math_lib = Library::Handle(Library::MathLibrary());
|
| ASSERT(!math_lib.IsNull());
|
| @@ -6057,8 +6066,14 @@ void Library::InitCoreLibrary(Isolate* isolate) {
|
| Library::Handle(Library::CollectionLibrary());
|
| const Namespace& collection_ns = Namespace::Handle(
|
| Namespace::New(collection_lib, Array::Handle(), Array::Handle()));
|
| + Library::InitCollectionDevLibrary(isolate);
|
| + const Library& collection_dev_lib =
|
| + Library::Handle(Library::CollectionDevLibrary());
|
| + const Namespace& collection_dev_ns = Namespace::Handle(
|
| + Namespace::New(collection_dev_lib, Array::Handle(), Array::Handle()));
|
| core_lib.AddImport(math_ns);
|
| core_lib.AddImport(collection_ns);
|
| + core_lib.AddImport(collection_dev_ns);
|
| isolate->object_store()->set_root_library(Library::Handle());
|
|
|
| // Hook up predefined classes without setting their library pointers. These
|
| @@ -6081,6 +6096,14 @@ void Library::InitCollectionLibrary(Isolate* isolate) {
|
| }
|
|
|
|
|
| +void Library::InitCollectionDevLibrary(Isolate* isolate) {
|
| + const String& url = String::Handle(Symbols::New("dart:collection_dev"));
|
| + const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true));
|
| + lib.Register();
|
| + isolate->object_store()->set_collection_dev_library(lib);
|
| +}
|
| +
|
| +
|
| void Library::InitMathLibrary(Isolate* isolate) {
|
| const String& url = String::Handle(Symbols::New("dart:math"));
|
| const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true));
|
| @@ -6253,6 +6276,11 @@ RawLibrary* Library::CollectionLibrary() {
|
| }
|
|
|
|
|
| +RawLibrary* Library::CollectionDevLibrary() {
|
| + return Isolate::Current()->object_store()->collection_dev_library();
|
| +}
|
| +
|
| +
|
| RawLibrary* Library::MathLibrary() {
|
| return Isolate::Current()->object_store()->math_library();
|
| }
|
|
|