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

Unified Diff: runtime/vm/object.cc

Issue 11085003: Convert String to a class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 10dd2f9a2ead46fc61600a1cc1976e752bbb4601..6c91c0ec5d89f1ce01c2eea9bd53e28dc6d08e6a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -848,10 +848,12 @@ RawError* Object::Init(Isolate* isolate) {
type = Type::NewNonParameterizedType(cls);
object_store->set_double_type(type);
- cls = CreateAndRegisterInterface("String", script, core_lib);
+ name = Symbols::New("String");
+ cls = Class::New<Instance>(name, script, Scanner::kDummyTokenIndex);
+ RegisterClass(cls, name, core_lib);
pending_classes.Add(cls, Heap::kOld);
type = Type::NewNonParameterizedType(cls);
- object_store->set_string_interface(type);
+ object_store->set_string_type(type);
cls = CreateAndRegisterInterface("List", script, core_lib);
pending_classes.Add(cls, Heap::kOld);
@@ -8366,9 +8368,9 @@ bool AbstractType::IsNumberType() const {
}
-bool AbstractType::IsStringInterface() const {
+bool AbstractType::IsStringType() const {
return HasResolvedTypeClass() &&
- (type_class() == Type::Handle(Type::StringInterface()).type_class());
+ (type_class() == Type::Handle(Type::StringType()).type_class());
}
@@ -8505,8 +8507,8 @@ RawType* Type::Number() {
}
-RawType* Type::StringInterface() {
- return Isolate::Current()->object_store()->string_interface();
+RawType* Type::StringType() {
+ return Isolate::Current()->object_store()->string_type();
}
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698