Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart |
index d819a28717bf22bf9970aa24674e5de2db219557..3e7b649676770d60300c45f1c7aa0a9de03c6eff 100644 |
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart |
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart |
@@ -194,15 +194,19 @@ class NativeEmitter { |
if (nonleafStr != '') { |
sb..write(';')..write(nonleafStr); |
} |
- if (extensions != null) { |
- sb..write(';') |
- ..writeAll(extensions.map((Class cls) => cls.name), '|'); |
- } |
+ |
String encoding = sb.toString(); |
- if (cls.isNative || encoding != '') { |
+ if (cls.isNative || encoding != '' || extensions != null) { |
+ List<jsAst.Literal> parts = <jsAst.Literal>[js.stringPart(encoding)]; |
+ if (extensions != null) { |
+ parts..add(js.stringPart(';')) |
+ ..addAll( |
+ js.joinLiterals(extensions.map((Class cls) => cls.name), |
+ js.stringPart('|'))); |
+ } |
assert(cls.nativeInfo == null); |
- cls.nativeInfo = encoding; |
+ cls.nativeInfo = js.concatenateStrings(parts, addQuotes: true); |
} |
} |
generateClassInfo(jsInterceptorClass); |
@@ -301,7 +305,7 @@ class NativeEmitter { |
List<jsAst.Statement> generateParameterStubStatements( |
FunctionElement member, |
bool isInterceptedMethod, |
- String invocationName, |
+ jsAst.Name invocationName, |
List<jsAst.Parameter> stubParameters, |
List<jsAst.Expression> argumentsBuffer, |
int indexOfLastOptionalArgumentInParameters) { |