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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.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
Index: pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
index 573dc3411f4ea78b38de721741dbe01cdd215af8..51f06f8ae796b5a00c38eb4b611b5ab14fa3fed1 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/interceptor_emitter.dart
@@ -5,18 +5,17 @@
part of dart2js.js_emitter.full_emitter;
class InterceptorEmitter extends CodeEmitterHelper {
- final Set<jsAst.Name> interceptorInvocationNames =
- new Set<jsAst.Name>();
+ final Set<jsAst.Name> interceptorInvocationNames = new Set<jsAst.Name>();
- void recordMangledNameOfMemberMethod(FunctionElement member,
- jsAst.Name name) {
+ void recordMangledNameOfMemberMethod(
+ FunctionElement member, jsAst.Name name) {
if (backend.isInterceptedMethod(member)) {
interceptorInvocationNames.add(name);
}
}
- jsAst.Expression buildGetInterceptorMethod(jsAst.Name key,
- Set<ClassElement> classes) {
+ jsAst.Expression buildGetInterceptorMethod(
+ jsAst.Name key, Set<ClassElement> classes) {
InterceptorStubGenerator stubGenerator =
new InterceptorStubGenerator(compiler, namer, backend);
jsAst.Expression function =
@@ -35,15 +34,14 @@ class InterceptorEmitter extends CodeEmitterHelper {
Map<jsAst.Name, Set<ClassElement>> specializedGetInterceptors =
backend.specializedGetInterceptors;
- List<jsAst.Name> names = specializedGetInterceptors.keys.toList()
- ..sort();
+ List<jsAst.Name> names = specializedGetInterceptors.keys.toList()..sort();
for (jsAst.Name name in names) {
Set<ClassElement> classes = specializedGetInterceptors[name];
- parts.add(
- js.statement('#.# = #',
- [namer.globalObjectFor(backend.helpers.interceptorsLibrary),
- name,
- buildGetInterceptorMethod(name, classes)]));
+ parts.add(js.statement('#.# = #', [
+ namer.globalObjectFor(backend.helpers.interceptorsLibrary),
+ name,
+ buildGetInterceptorMethod(name, classes)
+ ]));
}
return new jsAst.Block(parts);
@@ -52,7 +50,7 @@ class InterceptorEmitter extends CodeEmitterHelper {
jsAst.Statement buildOneShotInterceptors() {
List<jsAst.Statement> parts = <jsAst.Statement>[];
Iterable<jsAst.Name> names = backend.oneShotInterceptors.keys.toList()
- ..sort();
+ ..sort();
InterceptorStubGenerator stubGenerator =
new InterceptorStubGenerator(compiler, namer, backend);
@@ -81,7 +79,8 @@ class InterceptorEmitter extends CodeEmitterHelper {
if (!compiler.enabledInvokeOn) return null;
Iterable<jsAst.Name> invocationNames = interceptorInvocationNames.toList()
- ..sort();;
+ ..sort();
+ ;
List<jsAst.Property> properties = invocationNames.map((jsAst.Name name) {
return new jsAst.Property(js.quoteName(name), js.number(1));
}).toList();

Powered by Google App Engine
This is Rietveld 408576698