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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 Context::SECURITY_TOKEN_INDEX * kPointerSize; | 473 Context::SECURITY_TOKEN_INDEX * kPointerSize; |
474 | 474 |
475 lw(scratch, FieldMemOperand(scratch, token_offset)); | 475 lw(scratch, FieldMemOperand(scratch, token_offset)); |
476 lw(at, FieldMemOperand(at, token_offset)); | 476 lw(at, FieldMemOperand(at, token_offset)); |
477 Branch(miss, ne, scratch, Operand(at)); | 477 Branch(miss, ne, scratch, Operand(at)); |
478 | 478 |
479 bind(&same_contexts); | 479 bind(&same_contexts); |
480 } | 480 } |
481 | 481 |
482 | 482 |
| 483 // Compute the hash code from the untagged key. This must be kept in sync with |
| 484 // ComputeIntegerHash in utils.h and KeyedLoadGenericStub in |
| 485 // code-stub-hydrogen.cc |
483 void MacroAssembler::GetNumberHash(Register reg0, Register scratch) { | 486 void MacroAssembler::GetNumberHash(Register reg0, Register scratch) { |
484 // First of all we assign the hash seed to scratch. | 487 // First of all we assign the hash seed to scratch. |
485 LoadRoot(scratch, Heap::kHashSeedRootIndex); | 488 LoadRoot(scratch, Heap::kHashSeedRootIndex); |
486 SmiUntag(scratch); | 489 SmiUntag(scratch); |
487 | 490 |
488 // Xor original key with a seed. | 491 // Xor original key with a seed. |
489 xor_(reg0, reg0, scratch); | 492 xor_(reg0, reg0, scratch); |
490 | 493 |
491 // Compute the hash code from the untagged key. This must be kept in sync | 494 // Compute the hash code from the untagged key. This must be kept in sync |
492 // with ComputeIntegerHash in utils.h. | 495 // with ComputeIntegerHash in utils.h. |
(...skipping 5262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5755 } | 5758 } |
5756 if (ms.shift() > 0) sra(result, result, ms.shift()); | 5759 if (ms.shift() > 0) sra(result, result, ms.shift()); |
5757 srl(at, dividend, 31); | 5760 srl(at, dividend, 31); |
5758 Addu(result, result, Operand(at)); | 5761 Addu(result, result, Operand(at)); |
5759 } | 5762 } |
5760 | 5763 |
5761 | 5764 |
5762 } } // namespace v8::internal | 5765 } } // namespace v8::internal |
5763 | 5766 |
5764 #endif // V8_TARGET_ARCH_MIPS | 5767 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |