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

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

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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
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
11 factory _StringBase._uninstantiable() { 11 factory _StringBase._uninstantiable() {
12 throw const UnsupportedOperationException( 12 throw const UnsupportedOperationException(
13 "_StringBase can't be instaniated"); 13 "_StringBase can't be instaniated");
14 } 14 }
15 15
16 int hashCode() native "String_hashCode"; 16 int get hashCode native "String_getHashCode";
17 17
18 /** 18 /**
19 * Create the most efficient string representation for specified 19 * Create the most efficient string representation for specified
20 * [codePoints]. 20 * [codePoints].
21 */ 21 */
22 static String createFromCharCodes(List<int> charCodes) { 22 static String createFromCharCodes(List<int> charCodes) {
23 _ObjectArray objectArray; 23 _ObjectArray objectArray;
24 if (charCodes is _ObjectArray) { 24 if (charCodes is _ObjectArray) {
25 objectArray = charCodes; 25 objectArray = charCodes;
26 } else { 26 } else {
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 for (int g in groups) { 479 for (int g in groups) {
480 result.add(group(g)); 480 result.add(group(g));
481 } 481 }
482 return result; 482 return result;
483 } 483 }
484 484
485 final int _start; 485 final int _start;
486 final String str; 486 final String str;
487 final String pattern; 487 final String pattern;
488 } 488 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698