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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/lib/string_helper.dart

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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) 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 class StringMatch implements Match { 5 class StringMatch implements Match {
6 const StringMatch(int this.start, 6 const StringMatch(int this.start,
7 String this.str, 7 String this.str,
8 String this.pattern); 8 String this.pattern);
9 9
10 int get end => start + pattern.length; 10 int get end => start + pattern.length;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return stringReplaceJS(receiver, re, to); 117 return stringReplaceJS(receiver, re, to);
118 } else { 118 } else {
119 checkNull(from); 119 checkNull(from);
120 // TODO(floitsch): implement generic String.replace (with patterns). 120 // TODO(floitsch): implement generic String.replace (with patterns).
121 throw "String.replace(Pattern) UNIMPLEMENTED"; 121 throw "String.replace(Pattern) UNIMPLEMENTED";
122 } 122 }
123 } 123 }
124 124
125 stringSplitUnchecked(receiver, pattern) { 125 stringSplitUnchecked(receiver, pattern) {
126 if (pattern is String) { 126 if (pattern is String) {
127 return JS('List', r'#.split(#)', receiver, pattern); 127 return JS('=List', r'#.split(#)', receiver, pattern);
128 } else if (pattern is JSSyntaxRegExp) { 128 } else if (pattern is JSSyntaxRegExp) {
129 var re = regExpGetNative(pattern); 129 var re = regExpGetNative(pattern);
130 return JS('List', r'#.split(#)', receiver, re); 130 return JS('=List', r'#.split(#)', receiver, re);
131 } else { 131 } else {
132 throw "String.split(Pattern) UNIMPLEMENTED"; 132 throw "String.split(Pattern) UNIMPLEMENTED";
133 } 133 }
134 } 134 }
135 135
136 stringJoinUnchecked(array, separator) { 136 stringJoinUnchecked(array, separator) {
137 return JS('String', r'#.join(#)', array, separator); 137 return JS('String', r'#.join(#)', array, separator);
138 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698