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

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

Issue 1969093002: Miscellaneous runtime fixes. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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: tool/input_sdk/private/ddc_runtime/types.dart
diff --git a/tool/input_sdk/private/ddc_runtime/types.dart b/tool/input_sdk/private/ddc_runtime/types.dart
index 9db41dd7904ed4a5a3fe073bc5944618db6d8d76..14e00ec7f7b7ca805d68817ebc089eccc18ba158 100644
--- a/tool/input_sdk/private/ddc_runtime/types.dart
+++ b/tool/input_sdk/private/ddc_runtime/types.dart
@@ -178,8 +178,10 @@ final FunctionType = JS('', '''
return (a == $dynamic) ? $bottom : a;
}
- static _canonicalizeArray(definite, arr, map) {
- if (!definite) arr = arr.map(FunctionType._normalizeParameter);
+ static _canonicalizeArray(definite, array, map) {
+ let arr = (definite)
+ ? array
+ : array.map(FunctionType._normalizeParameter);
return FunctionType._memoizeArray(map, arr, () => arr);
}
@@ -210,9 +212,10 @@ final FunctionType = JS('', '''
// TODO(leafp): This handles some low hanging fruit, but
// really we should make all of this faster, and also
// handle more cases here.
- static _createSmall(count, definite, returnType, args) {
+ static _createSmall(count, definite, returnType, required) {
let map = $_fnTypeSmallMap[count];
- if (!definite) args = args.map(FunctionType._normalizeParameter);
+ let args = (definite) ? required
+ : required.map(FunctionType._normalizeParameter);
for (var i = 0; i < count; ++i) {
map = FunctionType._lookupNonTerminal(map, args[i]);
}

Powered by Google App Engine
This is Rietveld 408576698