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/object_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/object_patch.dart
diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart
index 719e59220b6e268e084a99d43476689434167ba9..7de335bbc27beb5af30f941a3e8fe412e2e9f78a 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-patch class Object {
+@patch class Object {
// The VM has its own implementation of equals.
bool operator ==(other) native "Object_equals";
@@ -29,10 +29,10 @@ patch class Object {
return result;
}
- /* patch */ int get hashCode => _objectHashCode(this);
+ /* @patch */ int get hashCode => _objectHashCode(this);
int get _identityHashCode => _objectHashCode(this);
- /* patch */ String toString() native "Object_toString";
+ /* @patch */ String toString() native "Object_toString";
// A statically dispatched version of Object.toString.
static String _toString(obj) native "Object_toString";
@@ -43,7 +43,7 @@ patch class Object {
Map<String, dynamic> namedArguments)
native "Object_noSuchMethod";
- /* patch */ noSuchMethod(Invocation invocation) {
+ /* @patch */ noSuchMethod(Invocation invocation) {
return _noSuchMethod(invocation.isMethod,
internal.Symbol.getName(invocation.memberName),
invocation._type,
@@ -51,7 +51,7 @@ patch class Object {
_symbolMapToStringMap(invocation.namedArguments));
}
- /* patch */ Type get runtimeType native "Object_runtimeType";
+ /* @patch */ Type get runtimeType native "Object_runtimeType";
// Call this function instead of inlining instanceof, thus collecting
// type feedback and reducing code size of unoptimized code.
@@ -62,7 +62,7 @@ patch class Object {
bool _simpleInstanceOf(type) native "Object_simpleInstanceOf";
bool _simpleInstanceOfTrue(type) => true;
bool _simpleInstanceOfFalse(type) => false;
-
+
bool _instanceOfDouble(bool negate) native "Object_instanceOfDouble";
bool _instanceOfNum(bool negate) native "Object_instanceOfNum";
bool _instanceOfInt(bool negate) native "Object_instanceOfInt";

Powered by Google App Engine
This is Rietveld 408576698