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

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: Merged to tip of bleeding_edge. Updated test expecteation Created 8 years, 1 month 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 1e1407a67771ffb9b80c47197b8f0161cff54d5f..e63f5b79785cf3b48982aa5b070b3dd64cb77a7c 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -835,10 +835,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);
@@ -8474,9 +8476,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());
}
@@ -8613,8 +8615,8 @@ RawType* Type::Number() {
}
-RawType* Type::StringInterface() {
- return Isolate::Current()->object_store()->string_interface();
+RawType* Type::StringType() {
+ return Isolate::Current()->object_store()->string_type();
}
« no previous file with comments | « 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