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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 1337993005: [runtime] Replace the EQUALS builtin with proper Object::Equals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's nit. Created 5 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
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 98dbb9cd1cdf612b1fa8ffee8be73a0e7d820e73..cc198b8cf3b7d7e212999c40b0adaeb437166de4 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -652,26 +652,22 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
- if (cond == eq && strict()) {
- __ TailCallRuntime(Runtime::kStrictEquals, 2, 1);
+ if (cond == eq) {
+ __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
+ 1);
} else {
- int context_index;
- if (cond == eq) {
- context_index = Context::EQUALS_BUILTIN_INDEX;
+ int context_index = is_strong(strength())
+ ? Context::COMPARE_STRONG_BUILTIN_INDEX
+ : Context::COMPARE_BUILTIN_INDEX;
+ int ncr; // NaN compare result
+ if ((cond == lt) || (cond == le)) {
+ ncr = GREATER;
} else {
- context_index = is_strong(strength())
- ? Context::COMPARE_STRONG_BUILTIN_INDEX
- : Context::COMPARE_BUILTIN_INDEX;
- int ncr; // NaN compare result
- if ((cond == lt) || (cond == le)) {
- ncr = GREATER;
- } else {
- DCHECK((cond == gt) || (cond == ge)); // remaining cases
- ncr = LESS;
- }
- __ Mov(x10, Smi::FromInt(ncr));
- __ Push(x10);
+ DCHECK((cond == gt) || (cond == ge)); // remaining cases
+ ncr = LESS;
}
+ __ Mov(x10, Smi::FromInt(ncr));
+ __ Push(x10);
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698