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

Unified Diff: test/codegen/expect/collection/src/canonicalized_map.js

Issue 1847163002: Regen against latest analyzer (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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: test/codegen/expect/collection/src/canonicalized_map.js
diff --git a/test/codegen/expect/collection/src/canonicalized_map.js b/test/codegen/expect/collection/src/canonicalized_map.js
index 7524a24b4ecba174e9ca9220898b696fba801077..23bcee2fd4ffe358096e61fd2112b26fe9d3a6f4 100644
--- a/test/codegen/expect/collection/src/canonicalized_map.js
+++ b/test/codegen/expect/collection/src/canonicalized_map.js
@@ -7,6 +7,12 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
], function(exports, dart, core, utils, collection) {
'use strict';
let dartx = dart.dartx;
+ const _Canonicalize$ = dart.generic(function(C, K) {
+ const _Canonicalize = dart.typedef('_Canonicalize', () => dart.functionType(C, [K]));
+ return _Canonicalize;
+ });
+ let _Canonicalize = _Canonicalize$();
+ const _IsValidKey = dart.typedef('_IsValidKey', () => dart.functionType(core.bool, [core.Object]));
const _base = Symbol('_base');
const _canonicalize = Symbol('_canonicalize');
const _isValidKeyFn = Symbol('_isValidKeyFn');
@@ -28,7 +34,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
}
get(key) {
if (!dart.notNull(this[_isValidKey](key))) return null;
- let pair = this[_base][dartx.get](dart.dcall(this[_canonicalize], key));
+ let pair = this[_base][dartx.get](this[_canonicalize](dart.as(key, K)));
return pair == null ? null : pair.last;
}
set(key, value) {
@@ -36,7 +42,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
dart.as(key, K);
dart.as(value, V);
if (!dart.notNull(this[_isValidKey](key))) return;
- this[_base][dartx.set](dart.as(dart.dcall(this[_canonicalize], key), C), new (utils.Pair$(K, V))(key, value));
+ this[_base][dartx.set](this[_canonicalize](key), new (utils.Pair$(K, V))(key, value));
})();
return value;
}
@@ -53,7 +59,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
}
containsKey(key) {
if (!dart.notNull(this[_isValidKey](key))) return false;
- return this[_base][dartx.containsKey](dart.dcall(this[_canonicalize], key));
+ return this[_base][dartx.containsKey](this[_canonicalize](dart.as(key, K)));
}
containsValue(value) {
return this[_base][dartx.values][dartx.any](dart.fn(pair => {
@@ -87,11 +93,11 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
putIfAbsent(key, ifAbsent) {
dart.as(key, K);
dart.as(ifAbsent, dart.functionType(V, []));
- return this[_base][dartx.putIfAbsent](dart.as(dart.dcall(this[_canonicalize], key), C), dart.fn(() => new (utils.Pair$(K, V))(key, ifAbsent()), utils.Pair$(K, V), [])).last;
+ return this[_base][dartx.putIfAbsent](this[_canonicalize](key), dart.fn(() => new (utils.Pair$(K, V))(key, ifAbsent()), utils.Pair$(K, V), [])).last;
}
remove(key) {
if (!dart.notNull(this[_isValidKey](key))) return null;
- let pair = this[_base][dartx.remove](dart.dcall(this[_canonicalize], key));
+ let pair = this[_base][dartx.remove](this[_canonicalize](dart.as(key, K)));
return pair == null ? null : pair.last;
}
get values() {
@@ -104,7 +110,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
return collection.Maps.mapToString(this);
}
[_isValidKey](key) {
- return (key == null || dart.is(key, K)) && (this[_isValidKeyFn] == null || dart.notNull(dart.as(dart.dcall(this[_isValidKeyFn], key), core.bool)));
+ return (key == null || dart.is(key, K)) && (this[_isValidKeyFn] == null || dart.notNull(this[_isValidKeyFn](key)));
}
}
CanonicalizedMap[dart.implements] = () => [core.Map$(K, V)];
« no previous file with comments | « test/codegen/expect/collection/src/algorithms.txt ('k') | test/codegen/expect/collection/src/canonicalized_map.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698