Chromium Code Reviews| Index: pkg/compiler/lib/src/js_emitter/program_builder.dart |
| diff --git a/pkg/compiler/lib/src/js_emitter/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder.dart |
| index 7036bb73a526943aa7b76c7b6428ec600e21bedc..3c606d6130aa25f32795a6a07c4448153b6be910 100644 |
| --- a/pkg/compiler/lib/src/js_emitter/program_builder.dart |
| +++ b/pkg/compiler/lib/src/js_emitter/program_builder.dart |
| @@ -353,6 +353,14 @@ class ProgramBuilder { |
| }); |
| } |
| + if (element == backend.closureClass) { |
| + // We add a special getter here to allow for tearing off a closure from |
| + // itself. |
| + String name = namer.getterNameFromAccessorName( |
| + namer.getMappedInstanceName(Compiler.CALL_OPERATOR_NAME)); |
| + js.Fun function = js.js('function() { return this; }'); |
| + callStubs.add(_buildStubMethod(name, function)); |
| + } |
| ClassElement implementation = element.implementation; |
|
floitsch
2015/02/13 12:38:28
New line before.
zarah
2015/02/13 12:52:18
Done.
|
| // MixinApplications run through the members of their mixin. Here, we are |