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

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

Issue 2965633002: Fix handling of inline JS types in DDC. (Closed)
Patch Set: Created 3 years, 6 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/classes.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
index 63c95c4272f16297b2e622c1bb93a5278e981f17..779eb3979ab16f886583d18c2754f8a37b17e626 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -376,18 +376,18 @@ setSignature(f, signature) => JS(
$_setStaticTypes($f, names);
})()''');
-_hasSigEntry(type, sigF, name) => JS(
- '',
+bool _hasSigEntry(type, sigF, name) => JS(
+ 'bool',
'''(() => {
let sigObj = $type[$sigF];
if (sigObj === void 0) return false;
return $name in sigObj;
})()''');
-hasMethod(type, name) => _hasSigEntry(type, _methodSig, name);
-hasGetter(type, name) => _hasSigEntry(type, _getterSig, name);
-hasSetter(type, name) => _hasSigEntry(type, _setterSig, name);
-hasField(type, name) => _hasSigEntry(type, _fieldSig, name);
+bool hasMethod(type, name) => _hasSigEntry(type, _methodSig, name);
+bool hasGetter(type, name) => _hasSigEntry(type, _getterSig, name);
+bool hasSetter(type, name) => _hasSigEntry(type, _setterSig, name);
+bool hasField(type, name) => _hasSigEntry(type, _fieldSig, name);
final _extensionType = JS('', 'Symbol("extensionType")');

Powered by Google App Engine
This is Rietveld 408576698