OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 js_backend; | 5 part of js_backend; |
6 | 6 |
7 /// Enables debugging of fast/slow objects using V8-specific primitives. | 7 /// Enables debugging of fast/slow objects using V8-specific primitives. |
8 const DEBUG_FAST_OBJECTS = false; | 8 const DEBUG_FAST_OBJECTS = false; |
9 | 9 |
10 /** | 10 /** |
(...skipping 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4147 emitInitFunction(mainBuffer); | 4147 emitInitFunction(mainBuffer); |
4148 if (!areAnyElementsDeferred) { | 4148 if (!areAnyElementsDeferred) { |
4149 mainBuffer.add('})()\n'); | 4149 mainBuffer.add('})()\n'); |
4150 } else { | 4150 } else { |
4151 mainBuffer.add('\n'); | 4151 mainBuffer.add('\n'); |
4152 } | 4152 } |
4153 compiler.assembledCode = mainBuffer.getText(); | 4153 compiler.assembledCode = mainBuffer.getText(); |
4154 outputSourceMap(compiler.assembledCode, ''); | 4154 outputSourceMap(compiler.assembledCode, ''); |
4155 | 4155 |
4156 mainBuffer.write( | 4156 mainBuffer.write( |
4157 jsAst.prettyPrint(precompiledFunctionAst, compiler).getText()); | 4157 jsAst.prettyPrint( |
| 4158 precompiledFunctionAst, compiler, |
| 4159 allowVariableMinification: false).getText()); |
4158 | 4160 |
4159 compiler.outputProvider('', 'precompiled.js') | 4161 compiler.outputProvider('', 'precompiled.js') |
4160 ..add(mainBuffer.getText()) | 4162 ..add(mainBuffer.getText()) |
4161 ..close(); | 4163 ..close(); |
4162 | 4164 |
4163 emitDeferredCode(); | 4165 emitDeferredCode(); |
4164 | 4166 |
4165 }); | 4167 }); |
4166 return compiler.assembledCode; | 4168 return compiler.assembledCode; |
4167 } | 4169 } |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4423 | 4425 |
4424 const String HOOKS_API_USAGE = """ | 4426 const String HOOKS_API_USAGE = """ |
4425 // The code supports the following hooks: | 4427 // The code supports the following hooks: |
4426 // dartPrint(message) - if this function is defined it is called | 4428 // dartPrint(message) - if this function is defined it is called |
4427 // instead of the Dart [print] method. | 4429 // instead of the Dart [print] method. |
4428 // dartMainRunner(main) - if this function is defined, the Dart [main] | 4430 // dartMainRunner(main) - if this function is defined, the Dart [main] |
4429 // method will not be invoked directly. | 4431 // method will not be invoked directly. |
4430 // Instead, a closure that will invoke [main] is | 4432 // Instead, a closure that will invoke [main] is |
4431 // passed to [dartMainRunner]. | 4433 // passed to [dartMainRunner]. |
4432 """; | 4434 """; |
OLD | NEW |