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

Unified Diff: runtime/vm/object.cc

Issue 10784020: Revert fix for type checking of void type, because some top level tests fail. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/heap_test.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 9672)
+++ runtime/vm/object.cc (working copy)
@@ -1782,7 +1782,6 @@
const Class& other,
const AbstractTypeArguments& other_type_arguments,
Error* malformed_error) const {
- ASSERT(!IsVoidClass());
// Check for DynamicType.
// Each occurrence of DynamicType in type T is interpreted as the Dynamic
// type, a supertype of all types.
@@ -2353,10 +2352,6 @@
}
-// TODO(regis): Investigate if we can safely map internal integer types (Smi,
-// Mint, and Bigint) to 'int' and internal String types (OneByteString, etc...)
-// to 'String' here. It may be too early. Also consider the upcoming type()
-// method.
RawString* AbstractType::Name() const {
// If the type is still being finalized, we may be reporting an error about
// an illformed type, so proceed with caution.
@@ -7664,14 +7659,9 @@
Error* malformed_error) const {
ASSERT(other.IsFinalized());
ASSERT(!other.IsDynamicType());
+ ASSERT(!other.IsVoidType());
ASSERT(!other.IsMalformed());
if (IsNull()) {
- // The null instance can be returned from a void function.
- if (other.IsVoidType()) {
- return true;
- }
- // Otherwise, null is only an instance of Object and of Dynamic.
- // It is not necessary to fully instantiate the other type for this test.
Class& other_class = Class::Handle();
if (other.IsTypeParameter()) {
if (other_instantiator.IsNull()) {
@@ -7687,9 +7677,6 @@
}
return other_class.IsObjectClass() || other_class.IsDynamicClass();
}
- if (other.IsVoidType()) {
- return false;
- }
const Class& cls = Class::Handle(clazz());
// We must not encounter Object::sentinel() or Object::transition_sentinel(),
// both instances of class NullClass, but not instance Object::null().
« no previous file with comments | « runtime/vm/heap_test.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698