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

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

Issue 24975002: - Implement a first cut for const String.env in the VM to allow (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/lib/string.cc ('k') | runtime/vm/bootstrap_natives.h » ('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 patch class String { 5 patch class String {
6 /* patch */ factory String.fromCharCodes(Iterable<int> charCodes) { 6 /* patch */ factory String.fromCharCodes(Iterable<int> charCodes) {
7 return _StringBase.createFromCharCodes(charCodes); 7 return _StringBase.createFromCharCodes(charCodes);
8 } 8 }
9
10 /* patch */ const factory String.fromEnvironment(String name,
11 {String defaultValue: ''})
12 native "String_fromEnvironment";
9 } 13 }
10 14
11 15
12 /** 16 /**
13 * [_StringBase] contains common methods used by concrete String 17 * [_StringBase] contains common methods used by concrete String
14 * implementations, e.g., _OneByteString. 18 * implementations, e.g., _OneByteString.
15 */ 19 */
16 class _StringBase { 20 class _StringBase {
17 21
18 factory _StringBase._uninstantiable() { 22 factory _StringBase._uninstantiable() {
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 class _CodeUnits extends Object with ListMixin<int>, 644 class _CodeUnits extends Object with ListMixin<int>,
641 UnmodifiableListMixin<int> { 645 UnmodifiableListMixin<int> {
642 /** The string that this is the code units of. */ 646 /** The string that this is the code units of. */
643 String _string; 647 String _string;
644 648
645 _CodeUnits(this._string); 649 _CodeUnits(this._string);
646 650
647 int get length => _string.length; 651 int get length => _string.length;
648 int operator[](int i) => _string.codeUnitAt(i); 652 int operator[](int i) => _string.codeUnitAt(i);
649 } 653 }
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698