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

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

Issue 10575030: Add a typeannotation and a missing argument to remove warnings. (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 | lib/compiler/implementation/unparse_validator.dart » ('j') | 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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 class HShiftLeft extends HBinaryBitOp { 1569 class HShiftLeft extends HBinaryBitOp {
1570 HShiftLeft(HStatic target, HInstruction left, HInstruction right) 1570 HShiftLeft(HStatic target, HInstruction left, HInstruction right)
1571 : super(target, left, right); 1571 : super(target, left, right);
1572 accept(HVisitor visitor) => visitor.visitShiftLeft(this); 1572 accept(HVisitor visitor) => visitor.visitShiftLeft(this);
1573 1573
1574 // Shift left cannot be mapped to the native operator unless the 1574 // Shift left cannot be mapped to the native operator unless the
1575 // shift count is guaranteed to be an integer in the [0,31] range. 1575 // shift count is guaranteed to be an integer in the [0,31] range.
1576 bool get builtin() { 1576 bool get builtin() {
1577 if (!left.isInteger() || !right.isConstantInteger()) return false; 1577 if (!left.isInteger() || !right.isConstantInteger()) return false;
1578 HConstant rightConstant = right; 1578 HConstant rightConstant = right;
1579 int count = rightConstant.constant.value; 1579 IntConstant intConstant = rightConstant.constant;
1580 int count = intConstant.value;
1580 return count >= 0 && count <= 31; 1581 return count >= 0 && count <= 31;
1581 } 1582 }
1582 1583
1583 ShiftLeftOperation get operation() => const ShiftLeftOperation(); 1584 ShiftLeftOperation get operation() => const ShiftLeftOperation();
1584 int typeCode() => 11; 1585 int typeCode() => 11;
1585 bool typeEquals(other) => other is HShiftLeft; 1586 bool typeEquals(other) => other is HShiftLeft;
1586 bool dataEquals(HInstruction other) => true; 1587 bool dataEquals(HInstruction other) => true;
1587 } 1588 }
1588 1589
1589 class HShiftRight extends HBinaryBitOp { 1590 class HShiftRight extends HBinaryBitOp {
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 HBasicBlock get start() => expression.start; 2631 HBasicBlock get start() => expression.start;
2631 HBasicBlock get end() { 2632 HBasicBlock get end() {
2632 // We don't create a switch block if there are no cases. 2633 // We don't create a switch block if there are no cases.
2633 assert(!statements.isEmpty()); 2634 assert(!statements.isEmpty());
2634 return statements.last().end; 2635 return statements.last().end;
2635 } 2636 }
2636 2637
2637 bool accept(HStatementInformationVisitor visitor) => 2638 bool accept(HStatementInformationVisitor visitor) =>
2638 visitor.visitSwitchInfo(this); 2639 visitor.visitSwitchInfo(this);
2639 } 2640 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/unparse_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698