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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 645
646 // Never fall through to here. 646 // Never fall through to here.
647 if (FLAG_debug_code) { 647 if (FLAG_debug_code) {
648 __ Unreachable(); 648 __ Unreachable();
649 } 649 }
650 650
651 __ Bind(&slow); 651 __ Bind(&slow);
652 652
653 __ Push(lhs, rhs); 653 __ Push(lhs, rhs);
654 // Figure out which native to call and setup the arguments. 654 // Figure out which native to call and setup the arguments.
655 if (cond == eq && strict()) { 655 if (cond == eq) {
656 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); 656 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
657 1);
657 } else { 658 } else {
658 int context_index; 659 int context_index = is_strong(strength())
659 if (cond == eq) { 660 ? Context::COMPARE_STRONG_BUILTIN_INDEX
660 context_index = Context::EQUALS_BUILTIN_INDEX; 661 : Context::COMPARE_BUILTIN_INDEX;
662 int ncr; // NaN compare result
663 if ((cond == lt) || (cond == le)) {
664 ncr = GREATER;
661 } else { 665 } else {
662 context_index = is_strong(strength()) 666 DCHECK((cond == gt) || (cond == ge)); // remaining cases
663 ? Context::COMPARE_STRONG_BUILTIN_INDEX 667 ncr = LESS;
664 : Context::COMPARE_BUILTIN_INDEX;
665 int ncr; // NaN compare result
666 if ((cond == lt) || (cond == le)) {
667 ncr = GREATER;
668 } else {
669 DCHECK((cond == gt) || (cond == ge)); // remaining cases
670 ncr = LESS;
671 }
672 __ Mov(x10, Smi::FromInt(ncr));
673 __ Push(x10);
674 } 668 }
669 __ Mov(x10, Smi::FromInt(ncr));
670 __ Push(x10);
675 671
676 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 672 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
677 // tagged as a small integer. 673 // tagged as a small integer.
678 __ InvokeBuiltin(context_index, JUMP_FUNCTION); 674 __ InvokeBuiltin(context_index, JUMP_FUNCTION);
679 } 675 }
680 676
681 __ Bind(&miss); 677 __ Bind(&miss);
682 GenerateMiss(masm); 678 GenerateMiss(masm);
683 } 679 }
684 680
(...skipping 5317 matching lines...) Expand 10 before | Expand all | Expand 10 after
6002 MemOperand(fp, 6 * kPointerSize), NULL); 5998 MemOperand(fp, 6 * kPointerSize), NULL);
6003 } 5999 }
6004 6000
6005 6001
6006 #undef __ 6002 #undef __
6007 6003
6008 } // namespace internal 6004 } // namespace internal
6009 } // namespace v8 6005 } // namespace v8
6010 6006
6011 #endif // V8_TARGET_ARCH_ARM64 6007 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« 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