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

Side by Side Diff: runtime/vm/object.cc

Issue 10829459: Deprecate Math object in corelib in favor of dart:math library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 error = Bootstrap::Compile(core_impl_lib, impl_script); 851 error = Bootstrap::Compile(core_impl_lib, impl_script);
852 if (!error.IsNull()) { 852 if (!error.IsNull()) {
853 return error.raw(); 853 return error.raw();
854 } 854 }
855 patch_script = Bootstrap::LoadCoreImplScript(true); 855 patch_script = Bootstrap::LoadCoreImplScript(true);
856 error = core_impl_lib.Patch(patch_script); 856 error = core_impl_lib.Patch(patch_script);
857 if (!error.IsNull()) { 857 if (!error.IsNull()) {
858 return error.raw(); 858 return error.raw();
859 } 859 }
860 const Script& math_script = Script::Handle(Bootstrap::LoadMathScript(false)); 860 const Script& math_script = Script::Handle(Bootstrap::LoadMathScript(false));
861 Library::InitMathLibrary(isolate);
862 const Library& math_lib = Library::Handle(Library::MathLibrary()); 861 const Library& math_lib = Library::Handle(Library::MathLibrary());
863 ASSERT(!math_lib.IsNull()); 862 ASSERT(!math_lib.IsNull());
864 error = Bootstrap::Compile(math_lib, math_script); 863 error = Bootstrap::Compile(math_lib, math_script);
865 if (!error.IsNull()) { 864 if (!error.IsNull()) {
866 return error.raw(); 865 return error.raw();
867 } 866 }
868 patch_script = Bootstrap::LoadMathScript(true); 867 patch_script = Bootstrap::LoadMathScript(true);
869 error = math_lib.Patch(patch_script); 868 error = math_lib.Patch(patch_script);
870 if (!error.IsNull()) { 869 if (!error.IsNull()) {
871 return error.raw(); 870 return error.raw();
(...skipping 5307 matching lines...) Expand 10 before | Expand all | Expand 10 after
6179 core_lib.Register(); 6178 core_lib.Register();
6180 isolate->object_store()->set_core_library(core_lib); 6179 isolate->object_store()->set_core_library(core_lib);
6181 const String& core_impl_lib_url = 6180 const String& core_impl_lib_url =
6182 String::Handle(Symbols::New("dart:coreimpl")); 6181 String::Handle(Symbols::New("dart:coreimpl"));
6183 const Library& core_impl_lib = 6182 const Library& core_impl_lib =
6184 Library::Handle(Library::NewLibraryHelper(core_impl_lib_url, false)); 6183 Library::Handle(Library::NewLibraryHelper(core_impl_lib_url, false));
6185 isolate->object_store()->set_core_impl_library(core_impl_lib); 6184 isolate->object_store()->set_core_impl_library(core_impl_lib);
6186 core_impl_lib.Register(); 6185 core_impl_lib.Register();
6187 core_lib.AddImport(core_impl_lib); 6186 core_lib.AddImport(core_impl_lib);
6188 core_impl_lib.AddImport(core_lib); 6187 core_impl_lib.AddImport(core_lib);
6188 Library::InitMathLibrary(isolate);
6189 const Library& math_lib = Library::Handle(Library::MathLibrary());
6190 core_lib.AddImport(math_lib);
6191 core_impl_lib.AddImport(math_lib);
6189 isolate->object_store()->set_root_library(Library::Handle()); 6192 isolate->object_store()->set_root_library(Library::Handle());
6190 6193
6191 // Hook up predefined classes without setting their library pointers. These 6194 // Hook up predefined classes without setting their library pointers. These
6192 // classes are coming from the VM isolate, and are shared between multiple 6195 // classes are coming from the VM isolate, and are shared between multiple
6193 // isolates so setting their library pointers would be wrong. 6196 // isolates so setting their library pointers would be wrong.
6194 const Class& cls = Class::Handle(Object::dynamic_class()); 6197 const Class& cls = Class::Handle(Object::dynamic_class());
6195 core_lib.AddObject(cls, String::Handle(cls.Name())); 6198 core_lib.AddObject(cls, String::Handle(cls.Name()));
6196 } 6199 }
6197 6200
6198 6201
(...skipping 4942 matching lines...) Expand 10 before | Expand all | Expand 10 after
11141 } 11144 }
11142 return result.raw(); 11145 return result.raw();
11143 } 11146 }
11144 11147
11145 11148
11146 const char* WeakProperty::ToCString() const { 11149 const char* WeakProperty::ToCString() const {
11147 return "WeakProperty"; 11150 return "WeakProperty";
11148 } 11151 }
11149 11152
11150 } // namespace dart 11153 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698