| 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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1452 ..add(']$N'); | 1452 ..add(']$N'); |
| 1453 if (compiler.useContentSecurityPolicy) { | 1453 if (compiler.useContentSecurityPolicy) { |
| 1454 jsAst.Statement precompiledFunctionAst = | 1454 jsAst.Statement precompiledFunctionAst = |
| 1455 buildCspPrecompiledFunctionFor(mainOutputUnit); | 1455 buildCspPrecompiledFunctionFor(mainOutputUnit); |
| 1456 mainOutput.addBuffer( | 1456 mainOutput.addBuffer( |
| 1457 jsAst.prettyPrint( | 1457 jsAst.prettyPrint( |
| 1458 precompiledFunctionAst, | 1458 precompiledFunctionAst, |
| 1459 compiler, | 1459 compiler, |
| 1460 monitor: compiler.dumpInfoTask, | 1460 monitor: compiler.dumpInfoTask, |
| 1461 allowVariableMinification: false)); | 1461 allowVariableMinification: false)); |
| 1462 mainOutput.add(N); |
| 1462 } | 1463 } |
| 1463 | 1464 |
| 1464 mainOutput.add('$parseReflectionDataName(dart)$N'); | 1465 mainOutput.add('$parseReflectionDataName(dart)$N'); |
| 1465 | 1466 |
| 1466 interceptorEmitter.emitGetInterceptorMethods(mainOutput); | 1467 interceptorEmitter.emitGetInterceptorMethods(mainOutput); |
| 1467 interceptorEmitter.emitOneShotInterceptors(mainOutput); | 1468 interceptorEmitter.emitOneShotInterceptors(mainOutput); |
| 1468 | 1469 |
| 1469 if (task.outputContainsConstantList) { | 1470 if (task.outputContainsConstantList) { |
| 1470 emitMakeConstantList(mainOutput); | 1471 emitMakeConstantList(mainOutput); |
| 1471 } | 1472 } |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 | 1911 |
| 1911 if (compiler.useContentSecurityPolicy) { | 1912 if (compiler.useContentSecurityPolicy) { |
| 1912 jsAst.Statement precompiledFunctionAst = | 1913 jsAst.Statement precompiledFunctionAst = |
| 1913 buildCspPrecompiledFunctionFor(outputUnit); | 1914 buildCspPrecompiledFunctionFor(outputUnit); |
| 1914 | 1915 |
| 1915 output.addBuffer( | 1916 output.addBuffer( |
| 1916 jsAst.prettyPrint( | 1917 jsAst.prettyPrint( |
| 1917 precompiledFunctionAst, compiler, | 1918 precompiledFunctionAst, compiler, |
| 1918 monitor: compiler.dumpInfoTask, | 1919 monitor: compiler.dumpInfoTask, |
| 1919 allowVariableMinification: false)); | 1920 allowVariableMinification: false)); |
| 1921 output.add(N); |
| 1920 } | 1922 } |
| 1921 output.add('$parseReflectionDataName(dart)$N'); | 1923 output.add('$parseReflectionDataName(dart)$N'); |
| 1922 } | 1924 } |
| 1923 | 1925 |
| 1924 // Set the currentIsolate variable to the current isolate (which is | 1926 // Set the currentIsolate variable to the current isolate (which is |
| 1925 // provided as second argument). | 1927 // provided as second argument). |
| 1926 // We need to do this, because we use the same variable for setting up | 1928 // We need to do this, because we use the same variable for setting up |
| 1927 // the isolate-properties and for storing the current isolate. During | 1929 // the isolate-properties and for storing the current isolate. During |
| 1928 // the setup (the code above this lines) we must set the variable to | 1930 // the setup (the code above this lines) we must set the variable to |
| 1929 // the isolate-properties. | 1931 // the isolate-properties. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2023 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2022 if (element.isInstanceMember) { | 2024 if (element.isInstanceMember) { |
| 2023 cachedClassBuilders.remove(element.enclosingClass); | 2025 cachedClassBuilders.remove(element.enclosingClass); |
| 2024 | 2026 |
| 2025 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2027 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2026 | 2028 |
| 2027 } | 2029 } |
| 2028 } | 2030 } |
| 2029 } | 2031 } |
| 2030 } | 2032 } |
| OLD | NEW |