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

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

Issue 10174040: Better constant fold identity checks. (100 bytes saved on swarm, yeah! :)) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 inputUsedBy.removeLast(); 867 inputUsedBy.removeLast();
868 break; 868 break;
869 } 869 }
870 } 870 }
871 } 871 }
872 this.block = null; 872 this.block = null;
873 assert(isValid()); 873 assert(isValid());
874 } 874 }
875 875
876 bool isConstant() => false; 876 bool isConstant() => false;
877 bool isConstantBoolean() => false;
Lasse Reichstein Nielsen 2012/04/26 07:24:02 How did we live without that?!?
877 bool isConstantNull() => false; 878 bool isConstantNull() => false;
878 bool isConstantNumber() => false; 879 bool isConstantNumber() => false;
879 bool isConstantString() => false; 880 bool isConstantString() => false;
880 bool isConstantList() => false; 881 bool isConstantList() => false;
881 bool isConstantMap() => false; 882 bool isConstantMap() => false;
882 883
883 bool isValid() { 884 bool isValid() {
884 HValidator validator = new HValidator(); 885 HValidator validator = new HValidator();
885 validator.currentBlock = block; 886 validator.currentBlock = block;
886 validator.visitInstruction(this); 887 validator.visitInstruction(this);
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 final bool isAnd; 2233 final bool isAnd;
2233 final SubExpression left; 2234 final SubExpression left;
2234 final SubExpression right; 2235 final SubExpression right;
2235 final HBasicBlock joinBlock; 2236 final HBasicBlock joinBlock;
2236 HAndOrBlockInformation(this.isAnd, 2237 HAndOrBlockInformation(this.isAnd,
2237 this.left, 2238 this.left,
2238 this.right, 2239 this.right,
2239 this.joinBlock); 2240 this.joinBlock);
2240 bool accept(HBlockInformationVisitor visitor) => visitor.visitAndOrInfo(this); 2241 bool accept(HBlockInformationVisitor visitor) => visitor.visitAndOrInfo(this);
2241 } 2242 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/optimize.dart » ('j') | lib/compiler/implementation/ssa/optimize.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698