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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart

Issue 2996573002: fix #28988, remove throw on Dart1 incompatible is-checks for dartdevc (Closed)
Patch Set: fix changelog Created 3 years, 4 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 | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart ('k') | pkg/dev_compiler/tool/run.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
index e4bf82920d6d3803e46583f94579de4be3cb10da..0f34d0e5a975a9b7ff6980d3946c2eb80b60f4a3 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
@@ -1027,37 +1027,3 @@ isClassSubType(t1, t2, isCovariant) => JS(
// can return false.
return false;
})()''');
-
-// TODO(jmesserly): this isn't currently used, but it could be if we want
-// `obj is NonGroundType<T,S>` to be rejected at runtime instead of compile
-// time.
-isGroundType(type) => JS(
- '',
- '''(() => {
- // TODO(vsm): Cache this if we start using it at runtime.
-
- // TODO(jmesserly): implement for generic function types if we start using?
- if ($type instanceof $Typedef) $type = $type.functionType;
-
- if ($type instanceof $FunctionType) {
- if (!$_isTop($type.returnType)) return false;
- for (let i = 0; i < $type.args.length; ++i) {
- if (!$_isBottom($type.args[i])) return false;
- }
- for (let i = 0; i < $type.optionals.length; ++i) {
- if (!$_isBottom($type.optionals[i])) return false;
- }
- let names = $getOwnPropertyNames($type.named);
- for (let i = 0; i < names.length; ++i) {
- if (!$_isBottom($type.named[names[i]])) return false;
- }
- return true;
- }
-
- let typeArgs = $getGenericArgs($type);
- if (!typeArgs) return true;
- for (let t of typeArgs) {
- if (t != $Object && t != $dynamic) return false;
- }
- return true;
-})()''');
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart ('k') | pkg/dev_compiler/tool/run.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698