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

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

Issue 11931042: Move many iterable classes to collection_dev. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 6082 matching lines...) Expand 10 before | Expand all | Expand 10 after
6093 void Library::InitCoreLibrary(Isolate* isolate) { 6093 void Library::InitCoreLibrary(Isolate* isolate) {
6094 const String& core_lib_url = String::Handle(Symbols::New("dart:core")); 6094 const String& core_lib_url = String::Handle(Symbols::New("dart:core"));
6095 const Library& core_lib = 6095 const Library& core_lib =
6096 Library::Handle(Library::NewLibraryHelper(core_lib_url, false)); 6096 Library::Handle(Library::NewLibraryHelper(core_lib_url, false));
6097 core_lib.Register(); 6097 core_lib.Register();
6098 isolate->object_store()->set_core_library(core_lib); 6098 isolate->object_store()->set_core_library(core_lib);
6099 Library::InitMathLibrary(isolate); 6099 Library::InitMathLibrary(isolate);
6100 const Library& math_lib = Library::Handle(Library::MathLibrary()); 6100 const Library& math_lib = Library::Handle(Library::MathLibrary());
6101 const Namespace& math_ns = Namespace::Handle( 6101 const Namespace& math_ns = Namespace::Handle(
6102 Namespace::New(math_lib, Array::Handle(), Array::Handle())); 6102 Namespace::New(math_lib, Array::Handle(), Array::Handle()));
6103 Library::InitCollectionDevLibrary(isolate);
6104 const Library& collection_dev_lib =
6105 Library::Handle(Library::CollectionDevLibrary());
6106 const Namespace& collection_dev_ns = Namespace::Handle(
6107 Namespace::New(collection_dev_lib, Array::Handle(), Array::Handle()));
6103 Library::InitCollectionLibrary(isolate); 6108 Library::InitCollectionLibrary(isolate);
6104 const Library& collection_lib = 6109 const Library& collection_lib =
6105 Library::Handle(Library::CollectionLibrary()); 6110 Library::Handle(Library::CollectionLibrary());
6106 const Namespace& collection_ns = Namespace::Handle( 6111 const Namespace& collection_ns = Namespace::Handle(
6107 Namespace::New(collection_lib, Array::Handle(), Array::Handle())); 6112 Namespace::New(collection_lib, Array::Handle(), Array::Handle()));
6108 Library::InitCollectionDevLibrary(isolate);
6109 const Library& collection_dev_lib =
6110 Library::Handle(Library::CollectionDevLibrary());
6111 const Namespace& collection_dev_ns = Namespace::Handle(
6112 Namespace::New(collection_dev_lib, Array::Handle(), Array::Handle()));
6113 core_lib.AddImport(math_ns); 6113 core_lib.AddImport(math_ns);
6114 core_lib.AddImport(collection_ns); 6114 core_lib.AddImport(collection_ns);
6115 core_lib.AddImport(collection_dev_ns); 6115 core_lib.AddImport(collection_dev_ns);
6116 isolate->object_store()->set_root_library(Library::Handle()); 6116 isolate->object_store()->set_root_library(Library::Handle());
6117 6117
6118 // Hook up predefined classes without setting their library pointers. These 6118 // Hook up predefined classes without setting their library pointers. These
6119 // classes are coming from the VM isolate, and are shared between multiple 6119 // classes are coming from the VM isolate, and are shared between multiple
6120 // isolates so setting their library pointers would be wrong. 6120 // isolates so setting their library pointers would be wrong.
6121 const Class& cls = Class::Handle(Object::dynamic_class()); 6121 const Class& cls = Class::Handle(Object::dynamic_class());
6122 core_lib.AddObject(cls, String::Handle(cls.Name())); 6122 core_lib.AddObject(cls, String::Handle(cls.Name()));
6123 } 6123 }
6124 6124
6125 6125
6126 void Library::InitCollectionLibrary(Isolate* isolate) { 6126 void Library::InitCollectionLibrary(Isolate* isolate) {
6127 const String& url = String::Handle(Symbols::New("dart:collection")); 6127 const String& url = String::Handle(Symbols::New("dart:collection"));
6128 const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true)); 6128 const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true));
6129 lib.Register(); 6129 lib.Register();
6130 const Library& math_lib = Library::Handle(Library::MathLibrary()); 6130 const Library& math_lib = Library::Handle(Library::MathLibrary());
6131 const Namespace& math_ns = Namespace::Handle( 6131 const Namespace& math_ns = Namespace::Handle(
6132 Namespace::New(math_lib, Array::Handle(), Array::Handle())); 6132 Namespace::New(math_lib, Array::Handle(), Array::Handle()));
6133 const Library& collection_dev_lib =
6134 Library::Handle(Library::CollectionDevLibrary());
6135 const Namespace& collection_dev_ns = Namespace::Handle(
6136 Namespace::New(collection_dev_lib, Array::Handle(), Array::Handle()));
6133 lib.AddImport(math_ns); 6137 lib.AddImport(math_ns);
6138 lib.AddImport(collection_dev_ns);
6134 isolate->object_store()->set_collection_library(lib); 6139 isolate->object_store()->set_collection_library(lib);
6135 } 6140 }
6136 6141
6137 6142
6138 void Library::InitCollectionDevLibrary(Isolate* isolate) { 6143 void Library::InitCollectionDevLibrary(Isolate* isolate) {
6139 const String& url = String::Handle(Symbols::New("dart:collection-dev")); 6144 const String& url = String::Handle(Symbols::New("dart:collection-dev"));
6140 const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true)); 6145 const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true));
6141 lib.Register(); 6146 lib.Register();
6142 isolate->object_store()->set_collection_dev_library(lib); 6147 isolate->object_store()->set_collection_dev_library(lib);
6143 } 6148 }
(...skipping 6479 matching lines...) Expand 10 before | Expand all | Expand 10 after
12623 } 12628 }
12624 return result.raw(); 12629 return result.raw();
12625 } 12630 }
12626 12631
12627 12632
12628 const char* WeakProperty::ToCString() const { 12633 const char* WeakProperty::ToCString() const {
12629 return "_WeakProperty"; 12634 return "_WeakProperty";
12630 } 12635 }
12631 12636
12632 } // namespace dart 12637 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/js_helper.dart » ('j') | sdk/lib/collection_dev/iterable.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698