Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index fce2db3f0afe8697421673e7ce99db2f9389fb4e..c85189f9071a166c221a56a297fa6b89b941c197 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -1609,6 +1609,15 @@ RawError* Object::Init(Isolate* isolate, kernel::Program* kernel_program) { |
object_store->set_int_type(type); |
cls = Class::New<Instance>(kIllegalCid); |
+ RegisterPrivateClass(cls, Symbols::Int64(), core_lib); |
+ cls.set_num_type_arguments(0); |
+ cls.set_num_own_type_arguments(0); |
+ cls.set_is_prefinalized(); |
+ pending_classes.Add(cls); |
+ type = Type::NewNonParameterizedType(cls); |
+ object_store->set_int64_type(type); |
+ |
+ cls = Class::New<Instance>(kIllegalCid); |
RegisterClass(cls, Symbols::Double(), core_lib); |
cls.set_num_type_arguments(0); |
cls.set_num_own_type_arguments(0); |
@@ -16443,6 +16452,12 @@ bool AbstractType::IsIntType() const { |
} |
+bool AbstractType::IsInt64Type() const { |
+ return !IsFunctionType() && HasResolvedTypeClass() && |
+ (type_class() == Type::Handle(Type::Int64Type()).type_class()); |
+} |
+ |
+ |
bool AbstractType::IsDoubleType() const { |
return !IsFunctionType() && HasResolvedTypeClass() && |
(type_class() == Type::Handle(Type::Double()).type_class()); |
@@ -16688,6 +16703,11 @@ RawType* Type::IntType() { |
} |
+RawType* Type::Int64Type() { |
+ return Isolate::Current()->object_store()->int64_type(); |
+} |
+ |
+ |
RawType* Type::SmiType() { |
return Isolate::Current()->object_store()->smi_type(); |
} |