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

Unified Diff: runtime/lib/string_patch.dart

Issue 2220883004: Use metadata annotation @patch for patch classes (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
Index: runtime/lib/string_patch.dart
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 435224516636f1bc51b04bcda0824ede8c8b8b2f..e8b3642842f13030712f5b6c0f7bb200a15d03c4 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -7,16 +7,16 @@ const int _maxLatin1 = 0xff;
const int _maxUtf16 = 0xffff;
const int _maxUnicode = 0x10ffff;
-patch class String {
- /* patch */ factory String.fromCharCodes(Iterable<int> charCodes,
- [int start = 0, int end]) {
+@patch class String {
+ /* @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 @@ patch class String {
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";
}

Powered by Google App Engine
This is Rietveld 408576698