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

Side by Side Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10559044: Remove old code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 interface HVisitor<R> { 5 interface HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBitAnd(HBitAnd node); 7 R visitBitAnd(HBitAnd node);
8 R visitBitNot(HBitNot node); 8 R visitBitNot(HBitNot node);
9 R visitBitOr(HBitOr node); 9 R visitBitOr(HBitOr node);
10 R visitBitXor(HBitXor node); 10 R visitBitXor(HBitXor node);
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1255 }
1256 1256
1257 class HFieldGet extends HFieldAccess { 1257 class HFieldGet extends HFieldAccess {
1258 final bool isFinalOrConst; 1258 final bool isFinalOrConst;
1259 1259
1260 HFieldGet(Element element, HInstruction receiver, 1260 HFieldGet(Element element, HInstruction receiver,
1261 [this.isFinalOrConst = false]) 1261 [this.isFinalOrConst = false])
1262 : super(element, <HInstruction>[receiver]); 1262 : super(element, <HInstruction>[receiver]);
1263 HFieldGet.fromActivation(receiver) : this(null, receiver); 1263 HFieldGet.fromActivation(receiver) : this(null, receiver);
1264 1264
1265 HInstruction get receiver() => inputs.length == 1 ? inputs[0] : null; 1265 HInstruction get receiver() => inputs[0];
1266 1266
1267 accept(HVisitor visitor) => visitor.visitFieldGet(this); 1267 accept(HVisitor visitor) => visitor.visitFieldGet(this);
1268 1268
1269 void prepareGvn() { 1269 void prepareGvn() {
1270 setUseGvn(); 1270 setUseGvn();
1271 if (!isFinalOrConst) setDependsOnSomething(); 1271 if (!isFinalOrConst) setDependsOnSomething();
1272 } 1272 }
1273 1273
1274 int typeCode() => 27; 1274 int typeCode() => 27;
1275 bool typeEquals(other) => other is HFieldGet; 1275 bool typeEquals(other) => other is HFieldGet;
1276 bool dataEquals(HFieldGet other) => element == other.element; 1276 bool dataEquals(HFieldGet other) => element == other.element;
1277 } 1277 }
1278 1278
1279 class HFieldSet extends HFieldAccess { 1279 class HFieldSet extends HFieldAccess {
1280 HFieldSet(Element element, HInstruction receiver, HInstruction value) 1280 HFieldSet(Element element, HInstruction receiver, HInstruction value)
1281 : super(element, <HInstruction>[receiver, value]); 1281 : super(element, <HInstruction>[receiver, value]);
1282 HFieldSet.fromActivation(receiver, value) 1282 HFieldSet.fromActivation(receiver, value)
1283 : this(null, receiver, value); 1283 : this(null, receiver, value);
1284 1284
1285 HInstruction get receiver() => inputs.length == 2 ? inputs[0] : null; 1285 HInstruction get receiver() => inputs[0];
1286 HInstruction get value() => inputs.length == 2 ? inputs[1] : inputs[0]; 1286 HInstruction get value() => inputs[1];
1287 accept(HVisitor visitor) => visitor.visitFieldSet(this); 1287 accept(HVisitor visitor) => visitor.visitFieldSet(this);
1288 1288
1289 void prepareGvn() { 1289 void prepareGvn() {
1290 // TODO(ngeoffray): implement more fine grain side effects. 1290 // TODO(ngeoffray): implement more fine grain side effects.
1291 setAllSideEffects(); 1291 setAllSideEffects();
1292 } 1292 }
1293 1293
1294 bool isStatement() => true; 1294 bool isStatement() => true;
1295 } 1295 }
1296 1296
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 HBasicBlock get start() => expression.start; 2582 HBasicBlock get start() => expression.start;
2583 HBasicBlock get end() { 2583 HBasicBlock get end() {
2584 // We don't create a switch block if there are no cases. 2584 // We don't create a switch block if there are no cases.
2585 assert(!statements.isEmpty()); 2585 assert(!statements.isEmpty());
2586 return statements.last().end; 2586 return statements.last().end;
2587 } 2587 }
2588 2588
2589 bool accept(HStatementInformationVisitor visitor) => 2589 bool accept(HStatementInformationVisitor visitor) =>
2590 visitor.visitSwitchInfo(this); 2590 visitor.visitSwitchInfo(this);
2591 } 2591 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698