Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart2js.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 | 7 |
| 8 class OldEmitter implements Emitter { | 8 class OldEmitter implements Emitter { |
| 9 final Compiler compiler; | 9 final Compiler compiler; |
| 10 final CodeEmitterTask task; | 10 final CodeEmitterTask task; |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 928 output.add(N); | 928 output.add(N); |
| 929 } | 929 } |
| 930 | 930 |
| 931 void emitFunctionThatReturnsNull(CodeOutput output) { | 931 void emitFunctionThatReturnsNull(CodeOutput output) { |
| 932 output.addBuffer( | 932 output.addBuffer( |
| 933 jsAst.prettyPrint( | 933 jsAst.prettyPrint( |
| 934 js.statement('#.# = function() {}', | 934 js.statement('#.# = function() {}', |
| 935 [backend.namer.isolateName, | 935 [backend.namer.isolateName, |
| 936 backend.rti.getFunctionThatReturnsNullName]), | 936 backend.rti.getFunctionThatReturnsNullName]), |
| 937 compiler, monitor: compiler.dumpInfoTask)); | 937 compiler, monitor: compiler.dumpInfoTask)); |
| 938 output.add(N); | |
|
sigurdm
2015/01/20 10:36:16
I guess you could chose to only output this in min
| |
| 938 } | 939 } |
| 939 | 940 |
| 940 jsAst.Expression generateFunctionThatReturnsNull() { | 941 jsAst.Expression generateFunctionThatReturnsNull() { |
| 941 return js("#.#", [backend.namer.isolateName, | 942 return js("#.#", [backend.namer.isolateName, |
| 942 backend.rti.getFunctionThatReturnsNullName]); | 943 backend.rti.getFunctionThatReturnsNullName]); |
| 943 } | 944 } |
| 944 | 945 |
| 945 /// Returns the code equivalent to: | 946 /// Returns the code equivalent to: |
| 946 /// `function(args) { $.startRootIsolate(X.main$closure(), args); }` | 947 /// `function(args) { $.startRootIsolate(X.main$closure(), args); }` |
| 947 jsAst.Expression buildIsolateSetupClosure(Element appMain, | 948 jsAst.Expression buildIsolateSetupClosure(Element appMain, |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2094 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2095 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2095 if (element.isInstanceMember) { | 2096 if (element.isInstanceMember) { |
| 2096 cachedClassBuilders.remove(element.enclosingClass); | 2097 cachedClassBuilders.remove(element.enclosingClass); |
| 2097 | 2098 |
| 2098 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2099 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2099 | 2100 |
| 2100 } | 2101 } |
| 2101 } | 2102 } |
| 2102 } | 2103 } |
| 2103 } | 2104 } |
| OLD | NEW |