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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 1409113006: - Some cleanup of dynamic_type usage. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | runtime/vm/scopes.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "lib/mirrors.h" 5 #include "lib/mirrors.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 1221
1222 const Array& result = Array::Handle(Array::New(num_params)); 1222 const Array& result = Array::Handle(Array::New(num_params));
1223 AbstractType& arg_type = AbstractType::Handle(); 1223 AbstractType& arg_type = AbstractType::Handle();
1224 Instance& type_mirror = Instance::Handle(); 1224 Instance& type_mirror = Instance::Handle();
1225 const TypeArguments& args = TypeArguments::Handle(type.arguments()); 1225 const TypeArguments& args = TypeArguments::Handle(type.arguments());
1226 1226
1227 // Handle argument lists that have been optimized away, because either no 1227 // Handle argument lists that have been optimized away, because either no
1228 // arguments have been provided, or all arguments are dynamic. Return a list 1228 // arguments have been provided, or all arguments are dynamic. Return a list
1229 // of typemirrors on dynamic in this case. 1229 // of typemirrors on dynamic in this case.
1230 if (args.IsNull()) { 1230 if (args.IsNull()) {
1231 arg_type ^= Object::dynamic_type(); 1231 arg_type ^= Object::dynamic_type().raw();
1232 type_mirror ^= CreateTypeMirror(arg_type); 1232 type_mirror ^= CreateTypeMirror(arg_type);
1233 for (intptr_t i = 0; i < num_params; i++) { 1233 for (intptr_t i = 0; i < num_params; i++) {
1234 result.SetAt(i, type_mirror); 1234 result.SetAt(i, type_mirror);
1235 } 1235 }
1236 return result.raw(); 1236 return result.raw();
1237 } 1237 }
1238 1238
1239 ASSERT(args.Length() >= num_params); 1239 ASSERT(args.Length() >= num_params);
1240 const intptr_t num_inherited_args = args.Length() - num_params; 1240 const intptr_t num_inherited_args = args.Length() - num_params;
1241 for (intptr_t i = 0; i < num_params; i++) { 1241 for (intptr_t i = 0; i < num_params; i++) {
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 } 2106 }
2107 2107
2108 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2108 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2109 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2109 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2111 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); 2111 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw();
2112 } 2112 }
2113 2113
2114 2114
2115 } // namespace dart 2115 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | runtime/vm/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698