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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 2427673004: [intrinsics] Nuke %HasCachedArrayIndex and %GetCachedArrayIndex. (Closed)
Patch Set: Created 4 years, 2 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/x64/macro-assembler-x64.h ('k') | src/x87/macro-assembler-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 void MacroAssembler::StubReturn(int argc) { 669 void MacroAssembler::StubReturn(int argc) {
670 DCHECK(argc >= 1 && generating_stub()); 670 DCHECK(argc >= 1 && generating_stub());
671 ret((argc - 1) * kPointerSize); 671 ret((argc - 1) * kPointerSize);
672 } 672 }
673 673
674 674
675 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 675 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
676 return has_frame_ || !stub->SometimesSetsUpAFrame(); 676 return has_frame_ || !stub->SometimesSetsUpAFrame();
677 } 677 }
678 678
679
680 void MacroAssembler::IndexFromHash(Register hash, Register index) {
681 // The assert checks that the constants for the maximum number of digits
682 // for an array index cached in the hash field and the number of bits
683 // reserved for it does not conflict.
684 DCHECK(TenToThe(String::kMaxCachedArrayIndexLength) <
685 (1 << String::kArrayIndexValueBits));
686 if (!hash.is(index)) {
687 movl(index, hash);
688 }
689 DecodeFieldToSmi<String::ArrayIndexValueBits>(index);
690 }
691
692
693 void MacroAssembler::CallRuntime(const Runtime::Function* f, 679 void MacroAssembler::CallRuntime(const Runtime::Function* f,
694 int num_arguments, 680 int num_arguments,
695 SaveFPRegsMode save_doubles) { 681 SaveFPRegsMode save_doubles) {
696 // If the expected number of arguments of the runtime function is 682 // If the expected number of arguments of the runtime function is
697 // constant, we check that the actual number of arguments match the 683 // constant, we check that the actual number of arguments match the
698 // expectation. 684 // expectation.
699 CHECK(f->nargs < 0 || f->nargs == num_arguments); 685 CHECK(f->nargs < 0 || f->nargs == num_arguments);
700 686
701 // TODO(1236192): Most runtime routines don't need the number of 687 // TODO(1236192): Most runtime routines don't need the number of
702 // arguments passed in because it is constant. At some point we 688 // arguments passed in because it is constant. At some point we
(...skipping 5024 matching lines...) Expand 10 before | Expand all | Expand 10 after
5727 movl(rax, dividend); 5713 movl(rax, dividend);
5728 shrl(rax, Immediate(31)); 5714 shrl(rax, Immediate(31));
5729 addl(rdx, rax); 5715 addl(rdx, rax);
5730 } 5716 }
5731 5717
5732 5718
5733 } // namespace internal 5719 } // namespace internal
5734 } // namespace v8 5720 } // namespace v8
5735 5721
5736 #endif // V8_TARGET_ARCH_X64 5722 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698