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

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

Issue 9126001: Fix Leg test failures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove accidental edit. Created 8 years, 11 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 | frog/leg/ssa/optimize.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) 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 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 bool get hasRightQuote() => (flags & HAS_RIGHT_QUOTE) != 0; 1532 bool get hasRightQuote() => (flags & HAS_RIGHT_QUOTE) != 0;
1533 bool get isMultiLine() => (flags & MULTI_LINE) != 0; 1533 bool get isMultiLine() => (flags & MULTI_LINE) != 0;
1534 bool get isRaw() => (flags & RAW) != 0; 1534 bool get isRaw() => (flags & RAW) != 0;
1535 String get quoteChar() => ((flags & SINGLE_QUOTED) != 0) ? "'" : '"'; 1535 String get quoteChar() => ((flags & SINGLE_QUOTED) != 0) ? "'" : '"';
1536 1536
1537 int get contentStart() => 1537 int get contentStart() =>
1538 hasLeftQuote ? (isRaw ? 1 : 0) + (isMultiLine ? 3 : 1) : 0; 1538 hasLeftQuote ? (isRaw ? 1 : 0) + (isMultiLine ? 3 : 1) : 0;
1539 int get contentEnd() => 1539 int get contentEnd() =>
1540 wrappedString.length - (hasRightQuote ? (isMultiLine ? 3 : 1) : 0); 1540 wrappedString.length - (hasRightQuote ? (isMultiLine ? 3 : 1) : 0);
1541 1541
1542 /**
1543 * Does a conservative test for equality between two quoted strings.
1544 * Returns true if the two definitly have the same string.
1545 * Returns false if the strings are different, or if it's not possible
1546 * to (quickly) determine whether they are equal.
1547 */
1548 bool definitlyEquals(QuotedString other) {
1549 return flags == other.flags && wrappedString == other.wrappedString;
1550 }
1551
1542 void printOn(StringBuffer buffer) { 1552 void printOn(StringBuffer buffer) {
1543 int start = contentStart; 1553 int start = contentStart;
1544 int end = contentEnd; 1554 int end = contentEnd;
1545 int length = wrappedString.length; 1555 int length = wrappedString.length;
1546 if (start == 1 && end == length - 1) { 1556 if (start == 1 && end == length - 1) {
1547 wrappedString.printOn(buffer); 1557 wrappedString.printOn(buffer);
1548 } else { 1558 } else {
1549 String quote = quoteChar; 1559 String quote = quoteChar;
1550 buffer.add(quote); 1560 buffer.add(quote);
1551 buffer.add(wrappedString.stringValue.substring(start, end)); 1561 buffer.add(wrappedString.stringValue.substring(start, end));
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 HInstruction first, 1966 HInstruction first,
1957 HInstruction second) 1967 HInstruction second)
1958 : super(<HInstruction>[first, second]); 1968 : super(<HInstruction>[first, second]);
1959 toString() => operation; 1969 toString() => operation;
1960 accept(HVisitor visitor) => visitor.visitLogicalOperator(this); 1970 accept(HVisitor visitor) => visitor.visitLogicalOperator(this);
1961 HInstruction get left() => inputs[0]; 1971 HInstruction get left() => inputs[0];
1962 HInstruction get right() => inputs[1]; 1972 HInstruction get right() => inputs[1];
1963 HType computeType() => HType.BOOLEAN; 1973 HType computeType() => HType.BOOLEAN;
1964 bool hasExpectedType() => true; 1974 bool hasExpectedType() => true;
1965 } 1975 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698