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

Side by Side Diff: runtime/vm/object.cc

Issue 12260008: Reapply r18377 it was reverted due to the unrelated bug it surfaced. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 } 2178 }
2179 // Check for reflexivity. 2179 // Check for reflexivity.
2180 if (raw() == other.raw()) { 2180 if (raw() == other.raw()) {
2181 const intptr_t len = NumTypeArguments(); 2181 const intptr_t len = NumTypeArguments();
2182 if (len == 0) { 2182 if (len == 0) {
2183 return true; 2183 return true;
2184 } 2184 }
2185 // Since we do not truncate the type argument vector of a subclass (see 2185 // Since we do not truncate the type argument vector of a subclass (see
2186 // below), we only check a prefix of the proper length. 2186 // below), we only check a prefix of the proper length.
2187 // Check for covariance. 2187 // Check for covariance.
2188 if (other_type_arguments.IsNull() || 2188 if (other_type_arguments.IsNull() || other_type_arguments.IsRaw(len)) {
2189 other_type_arguments.IsRawInstantiatedRaw(len)) {
2190 return true; 2189 return true;
2191 } 2190 }
2192 if (type_arguments.IsNull() || 2191 if (type_arguments.IsNull() || type_arguments.IsRaw(len)) {
2193 type_arguments.IsRawInstantiatedRaw(len)) { 2192 // Other type can't be more specific than this one because for that
2193 // it would have to have all dynamic type arguments which is checked
2194 // above.
2194 return test_kind == kIsSubtypeOf; 2195 return test_kind == kIsSubtypeOf;
2195 } 2196 }
2196 return type_arguments.TypeTest(test_kind, 2197 return type_arguments.TypeTest(test_kind,
2197 other_type_arguments, 2198 other_type_arguments,
2198 len, 2199 len,
2199 malformed_error); 2200 malformed_error);
2200 } 2201 }
2201 const bool other_is_function_class = other.IsFunctionClass(); 2202 const bool other_is_function_class = other.IsFunctionClass();
2202 if (other.IsSignatureClass() || other_is_function_class) { 2203 if (other.IsSignatureClass() || other_is_function_class) {
2203 const Function& other_fun = Function::Handle(other.signature_function()); 2204 const Function& other_fun = Function::Handle(other.signature_function());
(...skipping 10589 matching lines...) Expand 10 before | Expand all | Expand 10 after
12793 } 12794 }
12794 return result.raw(); 12795 return result.raw();
12795 } 12796 }
12796 12797
12797 12798
12798 const char* WeakProperty::ToCString() const { 12799 const char* WeakProperty::ToCString() const {
12799 return "_WeakProperty"; 12800 return "_WeakProperty";
12800 } 12801 }
12801 12802
12802 } // namespace dart 12803 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698