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

Unified Diff: pkg/compiler/lib/src/info/trusted_types_analysis_result.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/info/send_info.dart ('k') | pkg/compiler/lib/src/io/code_output.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
diff --git a/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart b/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
index 8de59ae9f5daa801b591150f5fdaba058e19920b..5653f2ee425d015c16e530a55b826a7713b0dc2c 100644
--- a/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
+++ b/pkg/compiler/lib/src/info/trusted_types_analysis_result.dart
@@ -21,11 +21,11 @@ class TrustTypesAnalysisResult implements AnalysisResult {
TrustTypesAnalysisResult(this.elements, this.world);
- ReceiverInfo infoForReceiver(Node receiver) =>
- new TrustTypesReceiverInfo(receiver, elements.typesCache[receiver], world);
+ ReceiverInfo infoForReceiver(Node receiver) => new TrustTypesReceiverInfo(
+ receiver, elements.typesCache[receiver], world);
SelectorInfo infoForSelector(Node receiver, Selector selector) =>
- new TrustTypesSelectorInfo(
- receiver, elements.typesCache[receiver], selector, world);
+ new TrustTypesSelectorInfo(
+ receiver, elements.typesCache[receiver], selector, world);
}
class _SelectorLookupResult {
@@ -37,7 +37,8 @@ class _SelectorLookupResult {
_SelectorLookupResult(this.exists, this.possibleTargets);
const _SelectorLookupResult.dontKnow()
- : exists = Boolish.maybe, possibleTargets = -1;
+ : exists = Boolish.maybe,
+ possibleTargets = -1;
}
_SelectorLookupResult _lookupSelector(
@@ -48,17 +49,19 @@ _SelectorLookupResult _lookupSelector(
var uniqueTargets = new Set();
for (var cls in world.subtypesOf(type.element)) {
var member = cls.lookupMember(selectorName);
- if (member != null && !member.isAbstract
+ if (member != null &&
+ !member.isAbstract
// Don't match nsm in Object
- && (!isNsm || !member.enclosingClass.isObject)) {
+ &&
+ (!isNsm || !member.enclosingClass.isObject)) {
uniqueTargets.add(member);
} else {
notFound = true;
}
}
Boolish exists = uniqueTargets.length > 0
- ? (notFound ? Boolish.maybe : Boolish.yes)
- : Boolish.no;
+ ? (notFound ? Boolish.maybe : Boolish.yes)
+ : Boolish.no;
return new _SelectorLookupResult(exists, uniqueTargets.length);
}
@@ -72,12 +75,12 @@ class TrustTypesReceiverInfo implements ReceiverInfo {
Node receiver, InterfaceType type, ClassWorld world) {
// TODO(sigmund): refactor, maybe just store nsm as a SelectorInfo
var res = _lookupSelector('noSuchMethod', type, world);
- return new TrustTypesReceiverInfo._(receiver,
- res.exists, res.possibleTargets);
+ return new TrustTypesReceiverInfo._(
+ receiver, res.exists, res.possibleTargets);
}
- TrustTypesReceiverInfo._(this.receiver, this.hasNoSuchMethod,
- this.possibleNsmTargets);
+ TrustTypesReceiverInfo._(
+ this.receiver, this.hasNoSuchMethod, this.possibleNsmTargets);
}
class TrustTypesSelectorInfo implements SelectorInfo {
@@ -89,16 +92,13 @@ class TrustTypesSelectorInfo implements SelectorInfo {
final int possibleTargets;
final bool isAccurate;
- factory TrustTypesSelectorInfo(Node receiver, InterfaceType type,
- Selector selector, ClassWorld world) {
- var res = _lookupSelector(
- selector != null ? selector.name : null, type, world);
+ factory TrustTypesSelectorInfo(
+ Node receiver, InterfaceType type, Selector selector, ClassWorld world) {
+ var res =
+ _lookupSelector(selector != null ? selector.name : null, type, world);
return new TrustTypesSelectorInfo._(receiver, selector, res.exists,
- res.usesInterceptor, res.possibleTargets,
- res.exists != Boolish.maybe);
+ res.usesInterceptor, res.possibleTargets, res.exists != Boolish.maybe);
}
- TrustTypesSelectorInfo._(
- this.receiver, this.selector, this.exists, this.usesInterceptor,
- this.possibleTargets, this.isAccurate);
+ TrustTypesSelectorInfo._(this.receiver, this.selector, this.exists,
+ this.usesInterceptor, this.possibleTargets, this.isAccurate);
}
-
« no previous file with comments | « pkg/compiler/lib/src/info/send_info.dart ('k') | pkg/compiler/lib/src/io/code_output.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698