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

Side by Side Diff: test/dart_codegen/expect/core/string.dart

Issue 967933005: rename ddc -> dev_compiler, fixes #84 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « test/dart_codegen/expect/core/stopwatch.dart ('k') | test/dart_codegen/expect/core/uri.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 part of dart.core; 1 part of dart.core;
2 abstract class String implements Comparable<String>, Pattern {external factory String.fromCharCodes(Iterable<int> charCodes, [int start = 0, int end]); 2 abstract class String implements Comparable<String>, Pattern {external factory String.fromCharCodes(Iterable<int> charCodes, [int start = 0, int end]);
3 external factory String.fromCharCode(int charCode); 3 external factory String.fromCharCode(int charCode);
4 external const factory String.fromEnvironment(String name, { 4 external const factory String.fromEnvironment(String name, {
5 String defaultValue} 5 String defaultValue}
6 ); 6 );
7 String operator [](int index); 7 String operator [](int index);
8 int codeUnitAt(int index); 8 int codeUnitAt(int index);
9 int get length; 9 int get length;
10 int get hashCode; 10 int get hashCode;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 RuneIterator(String string) : this.string = string, _position = 0, _nextPositio n = 0; 66 RuneIterator(String string) : this.string = string, _position = 0, _nextPositio n = 0;
67 RuneIterator.at(String string, int index) : string = string, _position = index, _nextPosition = index { 67 RuneIterator.at(String string, int index) : string = string, _position = index, _nextPosition = index {
68 RangeError.checkValueInInterval(index, 0, string.length); 68 RangeError.checkValueInInterval(index, 0, string.length);
69 _checkSplitSurrogate(index); 69 _checkSplitSurrogate(index);
70 } 70 }
71 void _checkSplitSurrogate(int index) { 71 void _checkSplitSurrogate(int index) {
72 if (index > 0 && index < string.length && _isLeadSurrogate(string.codeUnitAt(ind ex - 1)) && _isTrailSurrogate(string.codeUnitAt(index))) { 72 if (index > 0 && index < string.length && _isLeadSurrogate(string.codeUnitAt(ind ex - 1)) && _isTrailSurrogate(string.codeUnitAt(index))) {
73 throw new ArgumentError('Index inside surrogate pair: $index'); 73 throw new ArgumentError('Index inside surrogate pair: $index');
74 } 74 }
75 } 75 }
76 int get rawIndex => ((__x12) => DDC$RT.cast(__x12, dynamic, int, "CastGeneral", """line 665, column 24 of dart:core/string.dart: """, __x12 is int, true))((_po sition != _nextPosition) ? _position : null); 76 int get rawIndex => ((__x12) => DEVC$RT.cast(__x12, dynamic, int, "CastGeneral" , """line 665, column 24 of dart:core/string.dart: """, __x12 is int, true))((_p osition != _nextPosition) ? _position : null);
77 void set rawIndex(int rawIndex) { 77 void set rawIndex(int rawIndex) {
78 RangeError.checkValidIndex(rawIndex, string, "rawIndex"); 78 RangeError.checkValidIndex(rawIndex, string, "rawIndex");
79 reset(rawIndex); 79 reset(rawIndex);
80 moveNext(); 80 moveNext();
81 } 81 }
82 void reset([int rawIndex = 0]) { 82 void reset([int rawIndex = 0]) {
83 RangeError.checkValueInInterval(rawIndex, 0, string.length, "rawIndex"); 83 RangeError.checkValueInInterval(rawIndex, 0, string.length, "rawIndex");
84 _checkSplitSurrogate(rawIndex); 84 _checkSplitSurrogate(rawIndex);
85 _position = _nextPosition = rawIndex; 85 _position = _nextPosition = rawIndex;
86 _currentCodePoint = null; 86 _currentCodePoint = null;
87 } 87 }
88 int get current => DDC$RT.cast(_currentCodePoint, num, int, "CastGeneral", """l ine 702, column 23 of dart:core/string.dart: """, _currentCodePoint is int, true ); 88 int get current => DEVC$RT.cast(_currentCodePoint, num, int, "CastGeneral", """ line 702, column 23 of dart:core/string.dart: """, _currentCodePoint is int, tru e);
89 int get currentSize => _nextPosition - _position; 89 int get currentSize => _nextPosition - _position;
90 String get currentAsString { 90 String get currentAsString {
91 if (_position == _nextPosition) return null; 91 if (_position == _nextPosition) return null;
92 if (_position + 1 == _nextPosition) return string[_position]; 92 if (_position + 1 == _nextPosition) return string[_position];
93 return string.substring(_position, _nextPosition); 93 return string.substring(_position, _nextPosition);
94 } 94 }
95 bool moveNext() { 95 bool moveNext() {
96 _position = _nextPosition; 96 _position = _nextPosition;
97 if (_position == string.length) { 97 if (_position == string.length) {
98 _currentCodePoint = null; 98 _currentCodePoint = null;
(...skipping 27 matching lines...) Expand all
126 _position = position - 1; 126 _position = position - 1;
127 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit); 127 _currentCodePoint = _combineSurrogatePair(prevCodeUnit, codeUnit);
128 return true; 128 return true;
129 } 129 }
130 } 130 }
131 _position = position; 131 _position = position;
132 _currentCodePoint = codeUnit; 132 _currentCodePoint = codeUnit;
133 return true; 133 return true;
134 } 134 }
135 } 135 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/core/stopwatch.dart ('k') | test/dart_codegen/expect/core/uri.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698