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 |
+ }); |
} |
} |