OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3414 movq(scratch, FieldOperand(scratch, token_offset)); | 3414 movq(scratch, FieldOperand(scratch, token_offset)); |
3415 cmpq(scratch, FieldOperand(kScratchRegister, token_offset)); | 3415 cmpq(scratch, FieldOperand(kScratchRegister, token_offset)); |
3416 j(not_equal, miss); | 3416 j(not_equal, miss); |
3417 | 3417 |
3418 bind(&same_contexts); | 3418 bind(&same_contexts); |
3419 } | 3419 } |
3420 | 3420 |
3421 | 3421 |
3422 void MacroAssembler::GetNumberHash(Register r0, Register scratch) { | 3422 void MacroAssembler::GetNumberHash(Register r0, Register scratch) { |
3423 // First of all we assign the hash seed to scratch. | 3423 // First of all we assign the hash seed to scratch. |
3424 LoadRoot(scratch, Heap::kStringHashSeedRootIndex); | 3424 LoadRoot(scratch, Heap::kHashSeedRootIndex); |
3425 SmiToInteger32(scratch, scratch); | 3425 SmiToInteger32(scratch, scratch); |
3426 | 3426 |
3427 // Xor original key with a seed. | 3427 // Xor original key with a seed. |
3428 xorl(r0, scratch); | 3428 xorl(r0, scratch); |
3429 | 3429 |
3430 // Compute the hash code from the untagged key. This must be kept in sync | 3430 // Compute the hash code from the untagged key. This must be kept in sync |
3431 // with ComputeIntegerHash in utils.h. | 3431 // with ComputeIntegerHash in utils.h. |
3432 // | 3432 // |
3433 // hash = ~hash + (hash << 15); | 3433 // hash = ~hash + (hash << 15); |
3434 movl(scratch, r0); | 3434 movl(scratch, r0); |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4325 | 4325 |
4326 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); | 4326 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); |
4327 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); | 4327 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); |
4328 | 4328 |
4329 bind(&done); | 4329 bind(&done); |
4330 } | 4330 } |
4331 | 4331 |
4332 } } // namespace v8::internal | 4332 } } // namespace v8::internal |
4333 | 4333 |
4334 #endif // V8_TARGET_ARCH_X64 | 4334 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |