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

Unified Diff: pkg/compiler/lib/src/js_emitter/native_generator.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/native_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/native_generator.dart b/pkg/compiler/lib/src/js_emitter/native_generator.dart
index fd15d8a0a21cbbfdbd3258e1561257da55692b70..4dfa36c540edaffd0befab509ad9046199160fe9 100644
--- a/pkg/compiler/lib/src/js_emitter/native_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_generator.dart
@@ -5,7 +5,6 @@
part of dart2js.js_emitter;
class NativeGenerator {
-
static bool needsIsolateAffinityTagInitialization(JavaScriptBackend backend) {
return backend.needToInitializeIsolateAffinityTag;
}
@@ -27,7 +26,8 @@ class NativeGenerator {
jsAst.Expression dispatchPropertyNameAccess =
generateEmbeddedGlobalAccess(embeddedNames.DISPATCH_PROPERTY_NAME);
- return js.statement('''
+ return js.statement(
+ '''
!function() {
var intern = #internStringFunction;
@@ -56,11 +56,14 @@ class NativeGenerator {
}
}();
''',
- {'initializeDispatchProperty': backend.needToInitializeDispatchProperty,
- 'internStringFunction': internStringFunction,
- 'getIsolateTag': getIsolateTagAccess,
- 'isolateTag': isolateTagAccess,
- 'dispatchPropertyName': dispatchPropertyNameAccess});
+ {
+ 'initializeDispatchProperty':
+ backend.needToInitializeDispatchProperty,
+ 'internStringFunction': internStringFunction,
+ 'getIsolateTag': getIsolateTagAccess,
+ 'isolateTag': isolateTagAccess,
+ 'dispatchPropertyName': dispatchPropertyNameAccess
+ });
}
static String generateIsolateTagRoot() {
@@ -83,8 +86,7 @@ class NativeGenerator {
String formatTags(Iterable<String> tags) {
if (tags == null) return '';
- return (tags.toList()
- ..sort()).join('|');
+ return (tags.toList()..sort()).join('|');
}
String leafStr = formatTags(leafTags);
@@ -92,9 +94,7 @@ class NativeGenerator {
StringBuffer sb = new StringBuffer(leafStr);
if (nonLeafStr != '') {
- sb
- ..write(';')
- ..write(nonLeafStr);
+ sb..write(';')..write(nonLeafStr);
}
String encoding = sb.toString();
@@ -104,9 +104,8 @@ class NativeGenerator {
if (extensions != null) {
parts
..add(js.stringPart(';'))
- ..addAll(
- js.joinLiterals(extensions.map((Class cls) => cls.name),
- js.stringPart('|')));
+ ..addAll(js.joinLiterals(
+ extensions.map((Class cls) => cls.name), js.stringPart('|')));
}
return jsAst.concatenateStrings(parts, addQuotes: true);
}
@@ -148,7 +147,8 @@ class NativeGenerator {
jsAst.Expression leafTagsAccess) {
jsAst.Expression subclassRead =
subclassReadGenerator(js('subclasses[i]', []));
- return js.statement('''
+ return js.statement(
+ '''
// The native info looks like this:
//
// HtmlElement: {
@@ -196,12 +196,15 @@ class NativeGenerator {
}
}
}
- ''', {'info': infoAccess,
+ ''',
+ {
+ 'info': infoAccess,
'constructor': constructorAccess,
'subclassRead': subclassRead,
'interceptorsByTagAccess': interceptorsByTagAccess,
'leafTagsAccess': leafTagsAccess,
'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME,
- 'allowNativesSubclassing': true});
+ 'allowNativesSubclassing': true
+ });
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/native_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698