| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 error = Bootstrap::Compile(core_impl_lib, impl_script); | 852 error = Bootstrap::Compile(core_impl_lib, impl_script); |
| 853 if (!error.IsNull()) { | 853 if (!error.IsNull()) { |
| 854 return error.raw(); | 854 return error.raw(); |
| 855 } | 855 } |
| 856 patch_script = Bootstrap::LoadCoreImplScript(true); | 856 patch_script = Bootstrap::LoadCoreImplScript(true); |
| 857 error = core_impl_lib.Patch(patch_script); | 857 error = core_impl_lib.Patch(patch_script); |
| 858 if (!error.IsNull()) { | 858 if (!error.IsNull()) { |
| 859 return error.raw(); | 859 return error.raw(); |
| 860 } | 860 } |
| 861 const Script& math_script = Script::Handle(Bootstrap::LoadMathScript(false)); | 861 const Script& math_script = Script::Handle(Bootstrap::LoadMathScript(false)); |
| 862 Library::InitMathLibrary(isolate); | |
| 863 const Library& math_lib = Library::Handle(Library::MathLibrary()); | 862 const Library& math_lib = Library::Handle(Library::MathLibrary()); |
| 864 ASSERT(!math_lib.IsNull()); | 863 ASSERT(!math_lib.IsNull()); |
| 865 error = Bootstrap::Compile(math_lib, math_script); | 864 error = Bootstrap::Compile(math_lib, math_script); |
| 866 if (!error.IsNull()) { | 865 if (!error.IsNull()) { |
| 867 return error.raw(); | 866 return error.raw(); |
| 868 } | 867 } |
| 869 patch_script = Bootstrap::LoadMathScript(true); | 868 patch_script = Bootstrap::LoadMathScript(true); |
| 870 error = math_lib.Patch(patch_script); | 869 error = math_lib.Patch(patch_script); |
| 871 if (!error.IsNull()) { | 870 if (!error.IsNull()) { |
| 872 return error.raw(); | 871 return error.raw(); |
| (...skipping 5299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6172 core_lib.Register(); | 6171 core_lib.Register(); |
| 6173 isolate->object_store()->set_core_library(core_lib); | 6172 isolate->object_store()->set_core_library(core_lib); |
| 6174 const String& core_impl_lib_url = | 6173 const String& core_impl_lib_url = |
| 6175 String::Handle(Symbols::New("dart:coreimpl")); | 6174 String::Handle(Symbols::New("dart:coreimpl")); |
| 6176 const Library& core_impl_lib = | 6175 const Library& core_impl_lib = |
| 6177 Library::Handle(Library::NewLibraryHelper(core_impl_lib_url, false)); | 6176 Library::Handle(Library::NewLibraryHelper(core_impl_lib_url, false)); |
| 6178 isolate->object_store()->set_core_impl_library(core_impl_lib); | 6177 isolate->object_store()->set_core_impl_library(core_impl_lib); |
| 6179 core_impl_lib.Register(); | 6178 core_impl_lib.Register(); |
| 6180 core_lib.AddImport(core_impl_lib); | 6179 core_lib.AddImport(core_impl_lib); |
| 6181 core_impl_lib.AddImport(core_lib); | 6180 core_impl_lib.AddImport(core_lib); |
| 6181 Library::InitMathLibrary(isolate); |
| 6182 const Library& math_lib = Library::Handle(Library::MathLibrary()); |
| 6183 core_lib.AddImport(math_lib); |
| 6184 core_impl_lib.AddImport(math_lib); |
| 6182 isolate->object_store()->set_root_library(Library::Handle()); | 6185 isolate->object_store()->set_root_library(Library::Handle()); |
| 6183 | 6186 |
| 6184 // Hook up predefined classes without setting their library pointers. These | 6187 // Hook up predefined classes without setting their library pointers. These |
| 6185 // classes are coming from the VM isolate, and are shared between multiple | 6188 // classes are coming from the VM isolate, and are shared between multiple |
| 6186 // isolates so setting their library pointers would be wrong. | 6189 // isolates so setting their library pointers would be wrong. |
| 6187 const Class& cls = Class::Handle(Object::dynamic_class()); | 6190 const Class& cls = Class::Handle(Object::dynamic_class()); |
| 6188 core_lib.AddObject(cls, String::Handle(cls.Name())); | 6191 core_lib.AddObject(cls, String::Handle(cls.Name())); |
| 6189 } | 6192 } |
| 6190 | 6193 |
| 6191 | 6194 |
| (...skipping 4942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11134 } | 11137 } |
| 11135 return result.raw(); | 11138 return result.raw(); |
| 11136 } | 11139 } |
| 11137 | 11140 |
| 11138 | 11141 |
| 11139 const char* WeakProperty::ToCString() const { | 11142 const char* WeakProperty::ToCString() const { |
| 11140 return "WeakProperty"; | 11143 return "WeakProperty"; |
| 11141 } | 11144 } |
| 11142 | 11145 |
| 11143 } // namespace dart | 11146 } // namespace dart |
| OLD | NEW |