| OLD | NEW |
| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 4229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4240 Context::kHeaderSize + Context::SECURITY_TOKEN_INDEX * kPointerSize; | 4240 Context::kHeaderSize + Context::SECURITY_TOKEN_INDEX * kPointerSize; |
| 4241 movp(scratch, FieldOperand(scratch, token_offset)); | 4241 movp(scratch, FieldOperand(scratch, token_offset)); |
| 4242 cmpp(scratch, FieldOperand(kScratchRegister, token_offset)); | 4242 cmpp(scratch, FieldOperand(kScratchRegister, token_offset)); |
| 4243 j(not_equal, miss); | 4243 j(not_equal, miss); |
| 4244 | 4244 |
| 4245 bind(&same_contexts); | 4245 bind(&same_contexts); |
| 4246 } | 4246 } |
| 4247 | 4247 |
| 4248 | 4248 |
| 4249 // Compute the hash code from the untagged key. This must be kept in sync with | 4249 // Compute the hash code from the untagged key. This must be kept in sync with |
| 4250 // ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in | 4250 // ComputeIntegerHash in utils.h and KeyedLoadGenericStub in |
| 4251 // code-stub-hydrogen.cc | 4251 // code-stub-hydrogen.cc |
| 4252 void MacroAssembler::GetNumberHash(Register r0, Register scratch) { | 4252 void MacroAssembler::GetNumberHash(Register r0, Register scratch) { |
| 4253 // First of all we assign the hash seed to scratch. | 4253 // First of all we assign the hash seed to scratch. |
| 4254 LoadRoot(scratch, Heap::kHashSeedRootIndex); | 4254 LoadRoot(scratch, Heap::kHashSeedRootIndex); |
| 4255 SmiToInteger32(scratch, scratch); | 4255 SmiToInteger32(scratch, scratch); |
| 4256 | 4256 |
| 4257 // Xor original key with a seed. | 4257 // Xor original key with a seed. |
| 4258 xorl(r0, scratch); | 4258 xorl(r0, scratch); |
| 4259 | 4259 |
| 4260 // Compute the hash code from the untagged key. This must be kept in sync | 4260 // Compute the hash code from the untagged key. This must be kept in sync |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5376 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); | 5376 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); |
| 5377 movl(rax, dividend); | 5377 movl(rax, dividend); |
| 5378 shrl(rax, Immediate(31)); | 5378 shrl(rax, Immediate(31)); |
| 5379 addl(rdx, rax); | 5379 addl(rdx, rax); |
| 5380 } | 5380 } |
| 5381 | 5381 |
| 5382 | 5382 |
| 5383 } } // namespace v8::internal | 5383 } } // namespace v8::internal |
| 5384 | 5384 |
| 5385 #endif // V8_TARGET_ARCH_X64 | 5385 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |