Chromium Code Reviews| 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 db58f56287c49c0a8183091c35929c5eaf9a45ba..93e483d859be7371a8c013f982249627e7742142 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.fun(parameters, js.return_(encoding)); |
| + return js('function(#) { return # }', [parameters, encoding]); |
| } |
| } |
| @@ -548,12 +548,9 @@ class RuntimeTypes { |
| if (contextClass != null) { |
| JavaScriptBackend backend = compiler.backend; |
| String contextName = backend.namer.getNameOfClass(contextClass); |
| - 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))); |
| + return js('function () { return #(#, #, #); }', |
| + [ backend.namer.elementAccess(backend.getComputeSignature()), |
| + encoding, this_, js.string(contextName) ]); |
| } else { |
| return encoding; |
| } |
| @@ -638,7 +635,8 @@ class TypeRepresentationGenerator extends DartTypeVisitor { |
| } |
| jsAst.Expression getJavaScriptClassName(Element element) { |
| - return js(namer.isolateAccess(backend.getImplementationClass(element))); |
| + return namer.elementAccess(backend.getImplementationClass(element)); |
| + //return js(namer.isolateAccess(backend.getImplementationClass(element))); |
|
floitsch
2014/04/22 16:11:18
dead code.
sra1
2014/04/23 02:33:50
Done.
|
| } |
| visit(DartType type) { |
| @@ -873,10 +871,11 @@ class Substitution { |
| jsAst.Expression value = |
| rti.getSubstitutionRepresentation(arguments, use); |
| if (isFunction) { |
| - List<String> formals = parameters.toList().map(declaration).toList(); |
| - return js.fun(formals, js.return_(value)); |
| + List<jsAst.Expression> formals = |
| + parameters.toList().map(declaration).toList(); |
|
floitsch
2014/04/22 16:11:18
toList is necessary?
sra1
2014/04/23 02:33:50
Done.
|
| + return js('function(#) { return # }', [formals, value]); |
| } else if (ensureIsFunction) { |
| - return js.fun([], js.return_(value)); |
| + return js('function() { return # }', value); |
| } else { |
| return value; |
| } |