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

Unified Diff: sdk/lib/_internal/js_runtime/lib/core_patch.dart

Issue 2563633002: Make the VM's dart:core and dart:async library patches clean. (Closed)
Patch Set: Make moveNextFn private. Created 4 years 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: sdk/lib/_internal/js_runtime/lib/core_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index c6aa41e5cd9c76249d1a6ec302789925e6563000..37156797e54b321ed084a5f07e9cea94a80f6847 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -47,6 +47,9 @@ int identityHashCode(Object object) => objectHashCode(object);
@patch
class Object {
@patch
+ bool operator==(other) => identical(this, other);
+
+ @patch
int get hashCode => Primitives.objectHashCode(this);
@@ -66,6 +69,12 @@ class Object {
Type get runtimeType => getRuntimeType(this);
}
+@patch
+class Null {
+ @patch
+ int get hashCode => super.hashCode;
+}
+
// Patch for Function implementation.
@patch
class Function {
@@ -207,6 +216,18 @@ class Error {
StackTrace get stackTrace => Primitives.extractStackTrace(this);
}
+@patch
+class FallThroughError {
+ @patch
+ String toString() => super.toString();
+}
+
+@patch
+class AbstractClassInstantiationError {
+ @patch
+ String toString() => "Cannot instantiate abstract class: '$_className'";
+}
+
// Patch for DateTime implementation.
@patch
class DateTime {
@@ -461,6 +482,9 @@ class bool {
throw new UnsupportedError(
'bool.fromEnvironment can only be used as a const constructor');
}
+
+ @patch
+ int get hashCode => super.hashCode;
}
@patch
@@ -548,6 +572,18 @@ class StringBuffer {
@patch
class NoSuchMethodError {
@patch
+ NoSuchMethodError(Object receiver,
+ Symbol memberName,
+ List positionalArguments,
+ Map<Symbol, dynamic> namedArguments,
+ [List existingArgumentNames = null])
+ : _receiver = receiver,
+ _memberName = memberName,
+ _arguments = positionalArguments,
+ _namedArguments = namedArguments,
+ _existingArgumentNames = existingArgumentNames;
+
+ @patch
String toString() {
StringBuffer sb = new StringBuffer('');
String comma = '';
« no previous file with comments | « runtime/vm/symbols.h ('k') | sdk/lib/core/bool.dart » ('j') | sdk/lib/internal/internal.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698