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

Unified Diff: runtime/lib/identical.cc

Issue 23464073: Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/identical.cc
diff --git a/runtime/lib/identical.cc b/runtime/lib/identical.cc
index 7508f03ac85b89431dcdab9ae78ea8384becb4b5..efbb4911a2e6c5a047e23aa7b74884bdd0a82fc1 100644
--- a/runtime/lib/identical.cc
+++ b/runtime/lib/identical.cc
@@ -8,9 +8,7 @@
namespace dart {
-DEFINE_NATIVE_ENTRY(Identical_comparison, 2) {
- GET_NATIVE_ARGUMENT(Instance, a, arguments->NativeArgAt(0));
- GET_NATIVE_ARGUMENT(Instance, b, arguments->NativeArgAt(1));
+RawBool* Identical(const Instance& a, const Instance& b) {
if (a.raw() == b.raw()) return Bool::True().raw();
if (a.IsInteger() && b.IsInteger()) {
return Bool::Get(a.Equals(b)).raw();
@@ -27,5 +25,11 @@ DEFINE_NATIVE_ENTRY(Identical_comparison, 2) {
return Bool::False().raw();
}
siva 2013/09/17 00:06:24 This method should be moved into 'class Instance'
+DEFINE_NATIVE_ENTRY(Identical_comparison, 2) {
+ GET_NATIVE_ARGUMENT(Instance, a, arguments->NativeArgAt(0));
+ GET_NATIVE_ARGUMENT(Instance, b, arguments->NativeArgAt(1));
+ return Identical(a, b);
siva 2013/09/17 00:06:24 return a.IsIdentical(b) ? Bool::True().raw() : Boo
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698