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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.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/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 f3c907e8ee937792a8265dc45fae038e7024b957..6308359f9e1654c5f92a86cc00c1a68227182be6 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
@@ -335,7 +335,7 @@ class FunctionType extends AbstractFunctionType {
// identical function types that don't canonicalize
// to the same object since we won't fall into this
// fast path.
- if (JS('bool', '# === void 0', extra) && JS('', '#.length < 3', args)) {
+ if (JS('bool', '# === void 0', extra) && JS('bool', '#.length < 3', args)) {
return _createSmall(JS('', '#.length', args), definite, returnType, args);
}
args = _canonicalizeArray(definite, args, _fnTypeArrayArgMap);
@@ -405,7 +405,7 @@ class FunctionType extends AbstractFunctionType {
buffer += '{';
var names = getOwnPropertyNames(named);
JS('', '#.sort()', names);
- for (var i = 0; JS('', '# < #.length', i, names); ++i) {
+ for (var i = 0; JS('bool', '# < #.length', i, names); ++i) {
if (i > 0) {
buffer += ', ';
}

Powered by Google App Engine
This is Rietveld 408576698