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

Unified Diff: frog/leg/ssa/nodes.dart

Issue 9427012: Allow binary operators on compile-time-constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file.wq Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/tree/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/nodes.dart
diff --git a/frog/leg/ssa/nodes.dart b/frog/leg/ssa/nodes.dart
index ad40379b4c3650da4727258c62b93b768c8d6a3e..8ced3b501c5f13b21a9ba949b881fddf59a0e285 100644
--- a/frog/leg/ssa/nodes.dart
+++ b/frog/leg/ssa/nodes.dart
@@ -1426,60 +1426,6 @@ class HTruncatingDivide extends HBinaryArithmetic {
}
-class ConsDartStringIterator implements Iterator<int> {
- Iterator<int> current;
- DartString right;
- bool hasNextLookAhead;
- ConsDartStringIterator(ConsDartString cons)
- : current = cons.left.iterator(),
- right = cons.right {
- hasNextLookAhead = current.hasNext();
- if (!hasNextLookAhead) {
- nextPart();
- }
- }
- bool hasNext() {
- return hasNextLookAhead;
- }
- int next() {
- assert(hasNextLookAhead);
- int result = current.next();
- hasNextLookAhead = current.hasNext();
- if (!hasNextLookAhead) {
- nextPart();
- }
- return result;
- }
- void nextPart() {
- if (right !== null) {
- current = right.iterator();
- right = null;
- hasNextLookAhead = current.hasNext();
- }
- }
-}
-
-class ConsDartString extends DartString {
- final DartString left;
- final DartString right;
- final int length;
- int hashCache = null;
- String toStringCache;
- ConsDartString(DartString left, DartString right)
- : this.left = left,
- this.right = right,
- length = left.length + right.length;
-
- Iterator<int> iterator() => new ConsDartStringIterator(this);
-
- String toString() {
- if (toStringCache !== null) return toStringCache;
- toStringCache = left.toString().concat(right.toString());
- return toStringCache;
- }
-}
-
-
// TODO(floitsch): Should HBinaryArithmetic really be the super class of
// HBinaryBitOp?
class HBinaryBitOp extends HBinaryArithmetic {
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698