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

Unified Diff: runtime/lib/string_patch.dart

Issue 2230383003: Implement @patch annotation for patch class members (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/string_buffer_patch.dart ('k') | runtime/lib/symbol_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_patch.dart
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index e8b3642842f13030712f5b6c0f7bb200a15d03c4..17962df167c814bd418c430b322a6e600fa37320 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -8,15 +8,15 @@ const int _maxUtf16 = 0xffff;
const int _maxUnicode = 0x10ffff;
@patch class String {
- /* @patch */ factory String.fromCharCodes(Iterable<int> charCodes,
- [int start = 0, int end]) {
+ @patch factory String.fromCharCodes(Iterable<int> charCodes,
+ [int start = 0, int end]) {
if (charCodes is! Iterable) throw new ArgumentError.value(charCodes, "charCodes");
if (start is! int) throw new ArgumentError.value(start, "start");
if (end != null && end is! int) throw new ArgumentError.value(end, "end");
return _StringBase.createFromCharCodes(charCodes, start, end, null);
}
- /* @patch */ factory String.fromCharCode(int charCode) {
+ @patch factory String.fromCharCode(int charCode) {
if (charCode >= 0) {
if (charCode <= 0xff) {
return _OneByteString._allocate(1).._setAt(0, charCode);
@@ -37,8 +37,8 @@ const int _maxUnicode = 0x10ffff;
throw new RangeError.range(charCode, 0, 0x10ffff);
}
- /* @patch */ const factory String.fromEnvironment(String name,
- {String defaultValue})
+ @patch const factory String.fromEnvironment(String name,
+ {String defaultValue})
native "String_fromEnvironment";
}
« no previous file with comments | « runtime/lib/string_buffer_patch.dart ('k') | runtime/lib/symbol_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698