| 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 4037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4048 stack.add(graph.addConstantDouble(node.value, compiler)); | 4048 stack.add(graph.addConstantDouble(node.value, compiler)); |
| 4049 } | 4049 } |
| 4050 | 4050 |
| 4051 void visitLiteralBool(LiteralBool node) { | 4051 void visitLiteralBool(LiteralBool node) { |
| 4052 stack.add(graph.addConstantBool(node.value, compiler)); | 4052 stack.add(graph.addConstantBool(node.value, compiler)); |
| 4053 } | 4053 } |
| 4054 | 4054 |
| 4055 void visitLiteralString(LiteralString node) { | 4055 void visitLiteralString(LiteralString node) { |
| 4056 stack.add(graph.addConstantString(node.dartString, node, compiler)); | 4056 stack.add(graph.addConstantString(node.dartString, node, compiler)); |
| 4057 } | 4057 } |
| 4058 |
| 4059 void visitSymbolLiteral(SymbolLiteral node) { |
| 4060 ConstantHandler handler = compiler.constantHandler; |
| 4061 ConstructedConstant constant = |
| 4062 handler.compileNodeWithDefinitions(node, elements); |
| 4063 stack.add(graph.addConstant(constant, compiler)); |
| 4064 compiler.enqueuer.codegen.registerConstSymbol(node.nameString, elements); |
| 4065 } |
| 4058 | 4066 |
| 4059 void visitStringJuxtaposition(StringJuxtaposition node) { | 4067 void visitStringJuxtaposition(StringJuxtaposition node) { |
| 4060 if (!node.isInterpolation) { | 4068 if (!node.isInterpolation) { |
| 4061 // This is a simple string with no interpolations. | 4069 // This is a simple string with no interpolations. |
| 4062 stack.add(graph.addConstantString(node.dartString, node, compiler)); | 4070 stack.add(graph.addConstantString(node.dartString, node, compiler)); |
| 4063 return; | 4071 return; |
| 4064 } | 4072 } |
| 4065 StringBuilderVisitor stringBuilder = new StringBuilderVisitor(this, node); | 4073 StringBuilderVisitor stringBuilder = new StringBuilderVisitor(this, node); |
| 4066 stringBuilder.visit(node); | 4074 stringBuilder.visit(node); |
| 4067 stack.add(stringBuilder.result); | 4075 stack.add(stringBuilder.result); |
| (...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5452 new HSubGraphBlockInformation(elseBranch.graph)); | 5460 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5453 | 5461 |
| 5454 HBasicBlock conditionStartBlock = conditionBranch.block; | 5462 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5455 conditionStartBlock.setBlockFlow(info, joinBlock); | 5463 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5456 SubGraph conditionGraph = conditionBranch.graph; | 5464 SubGraph conditionGraph = conditionBranch.graph; |
| 5457 HIf branch = conditionGraph.end.last; | 5465 HIf branch = conditionGraph.end.last; |
| 5458 assert(branch is HIf); | 5466 assert(branch is HIf); |
| 5459 branch.blockInformation = conditionStartBlock.blockFlow; | 5467 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5460 } | 5468 } |
| 5461 } | 5469 } |
| OLD | NEW |