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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2752203003: Expand ignore whitelist to include FutureOr (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// This library defines runtime operations on objects used by the code 5 /// This library defines runtime operations on objects used by the code
6 /// generator. 6 /// generator.
7 part of dart._runtime; 7 part of dart._runtime;
8 8
9 class InvocationImpl extends Invocation { 9 class InvocationImpl extends Invocation {
10 final Symbol memberName; 10 final Symbol memberName;
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 })()'''); 464 })()''');
465 465
466 final _ignoreTypeFailure = JS( 466 final _ignoreTypeFailure = JS(
467 '', 467 '',
468 '''(() => { 468 '''(() => {
469 return $_ignoreMemo((actual, type) => { 469 return $_ignoreMemo((actual, type) => {
470 // TODO(vsm): Remove this hack ... 470 // TODO(vsm): Remove this hack ...
471 // This is primarily due to the lack of generic methods, 471 // This is primarily due to the lack of generic methods,
472 // but we need to triage all the types. 472 // but we need to triage all the types.
473 if (!!$isSubtype(type, $Iterable) && !!$isSubtype(actual, $Iterable) || 473 if (!!$isSubtype(type, $Iterable) && !!$isSubtype(actual, $Iterable) ||
474 !!$isSubtype(type, $Future) && !!$isSubtype(actual, $Future) || 474 !!$isSubtype(type, $FutureOr) && !!$isSubtype(actual, $Future) ||
475 !!$isSubtype(type, $Map) && !!$isSubtype(actual, $Map) || 475 !!$isSubtype(type, $Map) && !!$isSubtype(actual, $Map) ||
476 $isFunctionType(type) && $isFunctionType(actual) || 476 $isFunctionType(type) && $isFunctionType(actual) ||
477 !!$isSubtype(type, $Stream) && !!$isSubtype(actual, $Stream) || 477 !!$isSubtype(type, $Stream) && !!$isSubtype(actual, $Stream) ||
478 !!$isSubtype(type, $StreamSubscription) && 478 !!$isSubtype(type, $StreamSubscription) &&
479 !!$isSubtype(actual, $StreamSubscription)) { 479 !!$isSubtype(actual, $StreamSubscription)) {
480 console.warn('Ignoring cast fail from ' + $typeName(actual) + 480 console.warn('Ignoring cast fail from ' + $typeName(actual) +
481 ' to ' + $typeName(type)); 481 ' to ' + $typeName(type));
482 return true; 482 return true;
483 } 483 }
484 return false; 484 return false;
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 name = '+' + name; 975 name = '+' + name;
976 } 976 }
977 return name; 977 return name;
978 } 978 }
979 979
980 /// Emulates the implicit "loadLibrary" function provided by a deferred library. 980 /// Emulates the implicit "loadLibrary" function provided by a deferred library.
981 /// 981 ///
982 /// Libraries are not actually deferred in DDC, so this just returns a future 982 /// Libraries are not actually deferred in DDC, so this just returns a future
983 /// that completes immediately. 983 /// that completes immediately.
984 Future loadLibrary() => new Future.value(); 984 Future loadLibrary() => new Future.value();
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698