Chromium Code Reviews| 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 class SsaCodeGeneratorTask extends CompilerTask { | 5 class SsaCodeGeneratorTask extends CompilerTask { |
| 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); | 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); |
| 7 String get name() => 'SSA code generator'; | 7 String get name() => 'SSA code generator'; |
| 8 | 8 |
| 9 | 9 |
| 10 String buildJavaScriptFunction(FunctionElement element, | 10 String buildJavaScriptFunction(FunctionElement element, |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2184 } | 2184 } |
| 2185 Element helperElement = compiler.findHelper(helper); | 2185 Element helperElement = compiler.findHelper(helper); |
| 2186 compiler.registerStaticUse(helperElement); | 2186 compiler.registerStaticUse(helperElement); |
| 2187 buffer.add(compiler.namer.isolateAccess(helperElement)); | 2187 buffer.add(compiler.namer.isolateAccess(helperElement)); |
| 2188 buffer.add('('); | 2188 buffer.add('('); |
| 2189 use(node.checkedInput, JSPrecedence.EXPRESSION_PRECEDENCE); | 2189 use(node.checkedInput, JSPrecedence.EXPRESSION_PRECEDENCE); |
| 2190 if (additionalArgument !== null) buffer.add(", '$additionalArgument'"); | 2190 if (additionalArgument !== null) buffer.add(", '$additionalArgument'"); |
| 2191 buffer.add(')'); | 2191 buffer.add(')'); |
| 2192 endExpression(JSPrecedence.CALL_PRECEDENCE); | 2192 endExpression(JSPrecedence.CALL_PRECEDENCE); |
| 2193 } else { | 2193 } else { |
| 2194 visit(node.checkedInput, expectedPrecedence); | 2194 use(node.checkedInput, expectedPrecedence); |
|
Lasse Reichstein Nielsen
2012/05/10 08:16:55
I think we are getting to the point where "visit"
ngeoffray
2012/05/10 08:19:38
Agree.
| |
| 2195 } | 2195 } |
| 2196 } | 2196 } |
| 2197 } | 2197 } |
| 2198 | 2198 |
| 2199 class SsaOptimizedCodeGenerator extends SsaCodeGenerator { | 2199 class SsaOptimizedCodeGenerator extends SsaCodeGenerator { |
| 2200 SsaOptimizedCodeGenerator(compiler, work, parameters, parameterNames) | 2200 SsaOptimizedCodeGenerator(compiler, work, parameters, parameterNames) |
| 2201 : super(compiler, work, parameters, parameterNames); | 2201 : super(compiler, work, parameters, parameterNames); |
| 2202 | 2202 |
| 2203 void beginGraph(HGraph graph) {} | 2203 void beginGraph(HGraph graph) {} |
| 2204 void endGraph(HGraph graph) {} | 2204 void endGraph(HGraph graph) {} |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2593 startBailoutSwitch(); | 2593 startBailoutSwitch(); |
| 2594 } | 2594 } |
| 2595 } | 2595 } |
| 2596 | 2596 |
| 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2598 if (labeledBlockInfo.body.start.hasGuards()) { | 2598 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2599 endBailoutSwitch(); | 2599 endBailoutSwitch(); |
| 2600 } | 2600 } |
| 2601 } | 2601 } |
| 2602 } | 2602 } |
| OLD | NEW |