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

Side by Side Diff: runtime/lib/string_base.dart

Issue 11369168: Fix result type checking of factory constructors of generic classes in VM. (Closed) Base URL: http://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
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('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 /** 5 /**
6 * [_StringBase] contains common methods used by concrete String 6 * [_StringBase] contains common methods used by concrete String
7 * implementations, e.g., _OneByteString. 7 * implementations, e.g., _OneByteString.
8 */ 8 */
9 class _StringBase { 9 class _StringBase {
10 10
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // whitespaces for one byte strings. 417 // whitespaces for one byte strings.
418 bool _isWhitespace(int codePoint) { 418 bool _isWhitespace(int codePoint) {
419 return 419 return
420 (codePoint === 32) || // Space. 420 (codePoint === 32) || // Space.
421 ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc. 421 ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
422 } 422 }
423 } 423 }
424 424
425 425
426 class _ExternalTwoByteString extends _StringBase implements String { 426 class _ExternalTwoByteString extends _StringBase implements String {
427 factory ExternalTwoByteString._uninstantiable() { 427 factory _ExternalTwoByteString._uninstantiable() {
428 throw new UnsupportedError( 428 throw new UnsupportedError(
429 "_ExternalTwoByteString can only be allocated by the VM"); 429 "_ExternalTwoByteString can only be allocated by the VM");
430 } 430 }
431 431
432 // Checks for one-byte whitespaces only. 432 // Checks for one-byte whitespaces only.
433 // TODO(srdjan): Investigate if 0x85 (NEL) and 0xA0 (NBSP) are valid 433 // TODO(srdjan): Investigate if 0x85 (NEL) and 0xA0 (NBSP) are valid
434 // whitespaces. Add checking for multi-byte whitespace codepoints. 434 // whitespaces. Add checking for multi-byte whitespace codepoints.
435 bool _isWhitespace(int codePoint) { 435 bool _isWhitespace(int codePoint) {
436 return 436 return
437 (codePoint === 32) || // Space. 437 (codePoint === 32) || // Space.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 for (int g in groups) { 478 for (int g in groups) {
479 result.add(group(g)); 479 result.add(group(g));
480 } 480 }
481 return result; 481 return result;
482 } 482 }
483 483
484 final int start; 484 final int start;
485 final String str; 485 final String str;
486 final String pattern; 486 final String pattern;
487 } 487 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698