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

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

Issue 297233007: MIPS: Convert String array index/length hash to BitField. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 7 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/mips/macro-assembler-mips.h ('k') | no next file » | 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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 3981 matching lines...) Expand 10 before | Expand all | Expand 10 after
3992 mov(v0, s0); 3992 mov(v0, s0);
3993 jmp(&leave_exit_frame); 3993 jmp(&leave_exit_frame);
3994 } 3994 }
3995 3995
3996 3996
3997 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 3997 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
3998 return has_frame_ || !stub->SometimesSetsUpAFrame(); 3998 return has_frame_ || !stub->SometimesSetsUpAFrame();
3999 } 3999 }
4000 4000
4001 4001
4002 void MacroAssembler::IndexFromHash(Register hash, 4002 void MacroAssembler::IndexFromHash(Register hash, Register index) {
4003 Register index) {
4004 // If the hash field contains an array index pick it out. The assert checks 4003 // If the hash field contains an array index pick it out. The assert checks
4005 // that the constants for the maximum number of digits for an array index 4004 // that the constants for the maximum number of digits for an array index
4006 // cached in the hash field and the number of bits reserved for it does not 4005 // cached in the hash field and the number of bits reserved for it does not
4007 // conflict. 4006 // conflict.
4008 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) < 4007 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) <
4009 (1 << String::kArrayIndexValueBits)); 4008 (1 << String::kArrayIndexValueBits));
4010 // We want the smi-tagged index in key. kArrayIndexValueMask has zeros in 4009 DecodeFieldToSmi<String::ArrayIndexValueBits>(index, hash);
4011 // the low kHashShift bits.
4012 STATIC_ASSERT(kSmiTag == 0);
4013 Ext(hash, hash, String::kHashShift, String::kArrayIndexValueBits);
4014 sll(index, hash, kSmiTagSize);
4015 } 4010 }
4016 4011
4017 4012
4018 void MacroAssembler::ObjectToDoubleFPURegister(Register object, 4013 void MacroAssembler::ObjectToDoubleFPURegister(Register object,
4019 FPURegister result, 4014 FPURegister result,
4020 Register scratch1, 4015 Register scratch1,
4021 Register scratch2, 4016 Register scratch2,
4022 Register heap_number_map, 4017 Register heap_number_map,
4023 Label* not_number, 4018 Label* not_number,
4024 ObjectToDoubleFlags flags) { 4019 ObjectToDoubleFlags flags) {
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
5726 } 5721 }
5727 if (ms.shift() > 0) sra(result, result, ms.shift()); 5722 if (ms.shift() > 0) sra(result, result, ms.shift());
5728 srl(at, dividend, 31); 5723 srl(at, dividend, 31);
5729 Addu(result, result, Operand(at)); 5724 Addu(result, result, Operand(at));
5730 } 5725 }
5731 5726
5732 5727
5733 } } // namespace v8::internal 5728 } } // namespace v8::internal
5734 5729
5735 #endif // V8_TARGET_ARCH_MIPS 5730 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698