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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A special element for the extra parameter taken by intercepted | 8 * A special element for the extra parameter taken by intercepted |
| 9 * methods. We need to override [Element.computeType] because our | 9 * methods. We need to override [Element.computeType] because our |
| 10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
| (...skipping 4056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4067 } | 4067 } |
| 4068 | 4068 |
| 4069 void visitLiteralBool(LiteralBool node) { | 4069 void visitLiteralBool(LiteralBool node) { |
| 4070 stack.add(graph.addConstantBool(node.value, compiler)); | 4070 stack.add(graph.addConstantBool(node.value, compiler)); |
| 4071 } | 4071 } |
| 4072 | 4072 |
| 4073 void visitLiteralString(LiteralString node) { | 4073 void visitLiteralString(LiteralString node) { |
| 4074 stack.add(graph.addConstantString(node.dartString, node, compiler)); | 4074 stack.add(graph.addConstantString(node.dartString, node, compiler)); |
| 4075 } | 4075 } |
| 4076 | 4076 |
| 4077 void visitLiteralSymbol(LiteralSymbol node) { | |
| 4078 ConstantHandler handler = compiler.constantHandler; | |
| 4079 ConstructedConstant constant = | |
| 4080 handler.compileNodeWithDefinitions(node, elements); | |
| 4081 stack.add(graph.addConstant(constant, compiler)); | |
| 4082 compiler.enqueuer.codegen.registerConstSymbol(node.slowNameString, elements) ; | |
|
ngeoffray
2013/09/04 07:14:17
Line too long.
ngeoffray
2013/09/04 07:14:17
Please do the enqueing at codegen.
| |
| 4083 } | |
| 4084 | |
| 4077 void visitStringJuxtaposition(StringJuxtaposition node) { | 4085 void visitStringJuxtaposition(StringJuxtaposition node) { |
| 4078 if (!node.isInterpolation) { | 4086 if (!node.isInterpolation) { |
| 4079 // This is a simple string with no interpolations. | 4087 // This is a simple string with no interpolations. |
| 4080 stack.add(graph.addConstantString(node.dartString, node, compiler)); | 4088 stack.add(graph.addConstantString(node.dartString, node, compiler)); |
| 4081 return; | 4089 return; |
| 4082 } | 4090 } |
| 4083 StringBuilderVisitor stringBuilder = new StringBuilderVisitor(this, node); | 4091 StringBuilderVisitor stringBuilder = new StringBuilderVisitor(this, node); |
| 4084 stringBuilder.visit(node); | 4092 stringBuilder.visit(node); |
| 4085 stack.add(stringBuilder.result); | 4093 stack.add(stringBuilder.result); |
| 4086 } | 4094 } |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5469 new HSubGraphBlockInformation(elseBranch.graph)); | 5477 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5470 | 5478 |
| 5471 HBasicBlock conditionStartBlock = conditionBranch.block; | 5479 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5472 conditionStartBlock.setBlockFlow(info, joinBlock); | 5480 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5473 SubGraph conditionGraph = conditionBranch.graph; | 5481 SubGraph conditionGraph = conditionBranch.graph; |
| 5474 HIf branch = conditionGraph.end.last; | 5482 HIf branch = conditionGraph.end.last; |
| 5475 assert(branch is HIf); | 5483 assert(branch is HIf); |
| 5476 branch.blockInformation = conditionStartBlock.blockFlow; | 5484 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5477 } | 5485 } |
| 5478 } | 5486 } |
| OLD | NEW |