| Index: sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
|
| index 1b26dc04087466e5ee5d4ed71e3d354aa4decb78..db58f56287c49c0a8183091c35929c5eaf9a45ba 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
|
| @@ -537,7 +537,7 @@ class RuntimeTypes {
|
| return type.toString();
|
| }).toList();
|
| }
|
| - return js('function(#) { return # }', [parameters, encoding]);
|
| + return js.fun(parameters, js.return_(encoding));
|
| }
|
| }
|
|
|
| @@ -548,9 +548,12 @@ class RuntimeTypes {
|
| if (contextClass != null) {
|
| JavaScriptBackend backend = compiler.backend;
|
| String contextName = backend.namer.getNameOfClass(contextClass);
|
| - return js('function () { return #(#, #, #); }',
|
| - [ backend.namer.elementAccess(backend.getComputeSignature()),
|
| - encoding, this_, js.string(contextName) ]);
|
| + List<jsAst.Expression> arguments =
|
| + <jsAst.Expression>[encoding, this_, js.string(contextName)];
|
| + return js.fun([], js.return_(
|
| + new jsAst.Call(
|
| + backend.namer.elementAccess(backend.getComputeSignature()),
|
| + arguments)));
|
| } else {
|
| return encoding;
|
| }
|
| @@ -635,7 +638,7 @@ class TypeRepresentationGenerator extends DartTypeVisitor {
|
| }
|
|
|
| jsAst.Expression getJavaScriptClassName(Element element) {
|
| - return namer.elementAccess(backend.getImplementationClass(element));
|
| + return js(namer.isolateAccess(backend.getImplementationClass(element)));
|
| }
|
|
|
| visit(DartType type) {
|
| @@ -870,10 +873,10 @@ class Substitution {
|
| jsAst.Expression value =
|
| rti.getSubstitutionRepresentation(arguments, use);
|
| if (isFunction) {
|
| - Iterable<jsAst.Expression> formals = parameters.toList().map(declaration);
|
| - return js('function(#) { return # }', [formals, value]);
|
| + List<String> formals = parameters.toList().map(declaration).toList();
|
| + return js.fun(formals, js.return_(value));
|
| } else if (ensureIsFunction) {
|
| - return js('function() { return # }', value);
|
| + return js.fun([], js.return_(value));
|
| } else {
|
| return value;
|
| }
|
|
|