Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: frog/leg/ssa/nodes.dart

Issue 9642001: Make string juxtaposition combine properly with string interpolations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 interface HVisitor<R> { 5 interface HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBailoutTarget(HBailoutTarget node); 7 R visitBailoutTarget(HBailoutTarget node);
8 R visitBitAnd(HBitAnd node); 8 R visitBitAnd(HBitAnd node);
9 R visitBitNot(HBitNot node); 9 R visitBitNot(HBitNot node);
10 R visitBitOr(HBitOr node); 10 R visitBitOr(HBitOr node);
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 DartString leftString = op1.constant.value; 1399 DartString leftString = op1.constant.value;
1400 DartString otherString = null; 1400 DartString otherString = null;
1401 if (right.isConstantString()) { 1401 if (right.isConstantString()) {
1402 otherString = op2.constant.value; 1402 otherString = op2.constant.value;
1403 } else { 1403 } else {
1404 assert(op2.isConstantNumber() || 1404 assert(op2.isConstantNumber() ||
1405 op2.isConstantBoolean() || 1405 op2.isConstantBoolean() ||
1406 op2.isConstantNull()); 1406 op2.isConstantNull());
1407 otherString = new DartString.literal(op2.constant.value.toString()); 1407 otherString = new DartString.literal(op2.constant.value.toString());
1408 } 1408 }
1409 DartString cons = new ConsDartString(leftString, otherString); 1409 DartString cons = new DartString.cons(leftString, otherString);
1410 return graph.addConstantString(cons); 1410 return graph.addConstantString(cons);
1411 } 1411 }
1412 return super.fold(graph); 1412 return super.fold(graph);
1413 } 1413 }
1414 1414
1415 String operationAsString() => "+"; 1415 String operationAsString() => "+";
1416 int typeCode() => 5; 1416 int typeCode() => 5;
1417 bool typeEquals(other) => other is HAdd; 1417 bool typeEquals(other) => other is HAdd;
1418 bool dataEquals(HInstruction other) => true; 1418 bool dataEquals(HInstruction other) => true;
1419 } 1419 }
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 class HIfBlockInformation { 2164 class HIfBlockInformation {
2165 final HIf branch; 2165 final HIf branch;
2166 final SubGraph thenGraph; 2166 final SubGraph thenGraph;
2167 final SubGraph elseGraph; 2167 final SubGraph elseGraph;
2168 final HBasicBlock joinBlock; 2168 final HBasicBlock joinBlock;
2169 HIfBlockInformation(this.branch, 2169 HIfBlockInformation(this.branch,
2170 this.thenGraph, 2170 this.thenGraph,
2171 this.elseGraph, 2171 this.elseGraph,
2172 this.joinBlock); 2172 this.joinBlock);
2173 } 2173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698