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

Unified Diff: runtime/vm/object.cc

Issue 10933039: Make int an abstract class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make extending int an error too. Created 8 years, 3 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
« 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 394ed41496ae25c17dd237edc440d58beefbd32f..4a991dd14994abdcf05b32a365e5b09a7d6d362e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -809,10 +809,12 @@ RawError* Object::Init(Isolate* isolate) {
type = Type::NewNonParameterizedType(cls);
object_store->set_number_type(type);
- cls = CreateAndRegisterInterface("int", script, core_lib);
+ name = Symbols::New("int");
+ 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_int_interface(type);
+ object_store->set_int_type(type);
name = Symbols::New("double");
cls = Class::New<Instance>(name, script, Scanner::kDummyTokenIndex);
@@ -2598,9 +2600,9 @@ bool AbstractType::IsBoolType() const {
}
-bool AbstractType::IsIntInterface() const {
+bool AbstractType::IsIntType() const {
return HasResolvedTypeClass() &&
- (type_class() == Type::Handle(Type::IntInterface()).type_class());
+ (type_class() == Type::Handle(Type::IntType()).type_class());
}
@@ -2730,8 +2732,8 @@ RawType* Type::BoolType() {
}
-RawType* Type::IntInterface() {
- return Isolate::Current()->object_store()->int_interface();
+RawType* Type::IntType() {
Lasse Reichstein Nielsen 2012/09/12 11:03:24 Why is it Type::BoolType but Type::Double? Should
+ return Isolate::Current()->object_store()->int_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