Chromium Code Reviews| Index: dart/frog/leg/emitter.dart |
| diff --git a/dart/frog/leg/emitter.dart b/dart/frog/leg/emitter.dart |
| index 20e7c48af9a7443df787544afa2dc7a8f8d0bd42..fe10ba1dc6a289e3e416055e80bf50d2157070c5 100644 |
| --- a/dart/frog/leg/emitter.dart |
| +++ b/dart/frog/leg/emitter.dart |
| @@ -331,7 +331,14 @@ function(child, parent) { |
| CompilationUnitElement compilationUnit = member.getCompilationUnit(); |
| ClassElement closureClassElement = new ClassElement(name, compilationUnit); |
| String isolateAccess = namer.isolatePropertyAccess(closureClassElement); |
| - buffer.add("$isolateAccess = function(self) { this.self = self; };\n"); |
| + buffer.add("$isolateAccess = function $name(self) "); |
| + buffer.add("{ this.self = self; };\n"); |
| + addInheritFunctionIfNecessary(buffer); |
|
kasperl
2012/02/21 07:16:43
Maybe add a comment here that explains that you're
ahe
2012/02/21 23:03:25
Done.
|
| + ClassElement objectClass = |
| + compiler.coreLibrary.find(const SourceString('Object')); |
| + String superName = namer.isolatePropertyAccess(objectClass); |
| + buffer.add('${inheritsName}($isolateAccess, $superName);\n'); |
|
kasperl
2012/02/21 07:16:43
Less indentation.
ahe
2012/02/21 23:03:25
Done.
|
| + |
| String prototype = "$isolateAccess.prototype"; |
| // Now add the methods on the closure class. The instance method does not |