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

Unified Diff: pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart

Issue 2698353003: unfork DDC's copy of most SDK libraries (Closed)
Patch Set: revert core_patch Created 3 years, 10 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: pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
index 910858fd7bd8f345404b8166749768ff6726fc10..71a568bf472f89f10f8c47bc0f985c8a24385e66 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
@@ -29,8 +29,10 @@ int identityHashCode(Object object) => objectHashCode(object);
@patch
class Object {
@patch
- int get hashCode => Primitives.objectHashCode(this);
+ bool operator==(other) => identical(this, other);
+ @patch
+ int get hashCode => Primitives.objectHashCode(this);
@patch
String toString() => Primitives.objectToString(this);
@@ -49,6 +51,12 @@ class Object {
JS('Type', 'dart.wrapType(dart.getReifiedType(#))', this);
}
+@patch
+class Null {
+ @patch
+ int get hashCode => super.hashCode;
+}
+
// Patch for Function implementation.
@patch
class Function {
@@ -156,6 +164,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'";
+}
+
/// An interface type for all Strong-mode errors.
class StrongModeError extends Error {}
@@ -427,6 +447,9 @@ class bool {
throw new UnsupportedError(
'bool.fromEnvironment can only be used as a const constructor');
}
+
+ @patch
+ int get hashCode => super.hashCode;
}
@patch
@@ -513,6 +536,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();
int i = 0;
@@ -561,15 +596,17 @@ class NoSuchMethodError {
@patch
class Uri {
@patch
- static bool get _isWindows => false;
-
- @patch
static Uri get base {
String uri = Primitives.currentUri();
if (uri != null) return Uri.parse(uri);
throw new UnsupportedError("'Uri.base' is not supported");
}
+}
+@patch
+class _Uri {
+ @patch
+ static bool get _isWindows => false;
// Matches a String that _uriEncodes to itself regardless of the kind of
// component. This corresponds to [_unreservedTable], i.e. characters that
@@ -592,7 +629,7 @@ class Uri {
// Encode the string into bytes then generate an ASCII only string
// by percent encoding selected bytes.
- StringBuffer result = new StringBuffer();
+ StringBuffer result = new StringBuffer('');
var bytes = encoding.encode(text);
for (int i = 0; i < bytes.length; i++) {
int byte = bytes[i];

Powered by Google App Engine
This is Rietveld 408576698