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

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

Issue 2703263002: Custom formatter cleanup Fix case where displaying a class constructor generated unreadable huge ou… (Closed)
Patch Set: Custom formatter cleanup Fix case where displaying a class constructor generated unreadable huge ou… Created 3 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 side-by-side diff with in-line comments
Download patch
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 e64daf7484bd035645af85ecc71bb9ccf3341383..d1000c78c7d59ff1e25a7e2848fb2cd4300a1dbf 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
@@ -513,6 +513,12 @@ functionType(returnType, args, extra) =>
definiteFunctionType(returnType, args, extra) =>
_functionType(true, returnType, args, extra);
+bool isType(obj) => JS(
+ '',
+ '''(() => {
+ return $_getRuntimeType($obj) === $Type;
+ })()''');
+
String typeName(type) => JS(
'',
'''(() => {
@@ -698,8 +704,8 @@ _isTop(type) {
if (JS('bool', '# === #', getGenericClass(type), getGenericClass(FutureOr))) {
return _isTop(JS('', '#[0]', getGenericArgs(type)));
}
- return JS('bool', '# == # || # == # || # == #',
- type, Object, type, dynamic, type, _void);
+ return JS('bool', '# == # || # == # || # == #', type, Object, type, dynamic,
+ type, _void);
}
_isSubtype(t1, t2, isCovariant) => JS(
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart ('k') | pkg/dev_compiler/tool/input_sdk/private/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698