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

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

Issue 1290433002: dart2js: Inline Primitives.identicalImplementation into identical patch. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 971b37f96e36270c2b6726a7f0ba5f2b83033563..6db46cad476764515da19610049d188077021343 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -19,6 +19,8 @@ import 'dart:_js_helper' show patch,
objectHashCode,
Closure;
+import 'dart:_foreign_helper' show JS;
+
import 'dart:_native_typed_data' show NativeUint8List;
String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
@@ -400,7 +402,7 @@ class RegExp {
// Patch for 'identical' function.
@patch
bool identical(Object a, Object b) {
- return Primitives.identicalImplementation(a, b);
+ return JS('bool', '(# == null ? # == null : # === #)', a, b, a, b);
}
@patch
« no previous file with comments | « no previous file | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698