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

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, 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 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.env(String name, String defaultValue)
floitsch 2013/09/27 13:52:31 [String defaultValue = ""]
Ivan Posva 2013/09/27 21:05:06 ditto.
11 native "String_env";
9 } 12 }
10 13
11 14
12 /** 15 /**
13 * [_StringBase] contains common methods used by concrete String 16 * [_StringBase] contains common methods used by concrete String
14 * implementations, e.g., _OneByteString. 17 * implementations, e.g., _OneByteString.
15 */ 18 */
16 class _StringBase { 19 class _StringBase {
17 20
18 factory _StringBase._uninstantiable() { 21 factory _StringBase._uninstantiable() {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 class _CodeUnits extends Object with ListMixin<int>, 637 class _CodeUnits extends Object with ListMixin<int>,
635 UnmodifiableListMixin<int> { 638 UnmodifiableListMixin<int> {
636 /** The string that this is the code units of. */ 639 /** The string that this is the code units of. */
637 String _string; 640 String _string;
638 641
639 _CodeUnits(this._string); 642 _CodeUnits(this._string);
640 643
641 int get length => _string.length; 644 int get length => _string.length;
642 int operator[](int i) => _string.codeUnitAt(i); 645 int operator[](int i) => _string.codeUnitAt(i);
643 } 646 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698