OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 lw(scratch, FieldMemOperand(scratch, token_offset)); | 404 lw(scratch, FieldMemOperand(scratch, token_offset)); |
405 lw(at, FieldMemOperand(at, token_offset)); | 405 lw(at, FieldMemOperand(at, token_offset)); |
406 Branch(miss, ne, scratch, Operand(at)); | 406 Branch(miss, ne, scratch, Operand(at)); |
407 | 407 |
408 bind(&same_contexts); | 408 bind(&same_contexts); |
409 } | 409 } |
410 | 410 |
411 | 411 |
412 void MacroAssembler::GetNumberHash(Register reg0, Register scratch) { | 412 void MacroAssembler::GetNumberHash(Register reg0, Register scratch) { |
413 // First of all we assign the hash seed to scratch. | 413 // First of all we assign the hash seed to scratch. |
414 LoadRoot(scratch, Heap::kStringHashSeedRootIndex); | 414 LoadRoot(scratch, Heap::kHashSeedRootIndex); |
415 SmiUntag(scratch); | 415 SmiUntag(scratch); |
416 | 416 |
417 // Xor original key with a seed. | 417 // Xor original key with a seed. |
418 xor_(reg0, reg0, scratch); | 418 xor_(reg0, reg0, scratch); |
419 | 419 |
420 // Compute the hash code from the untagged key. This must be kept in sync | 420 // Compute the hash code from the untagged key. This must be kept in sync |
421 // with ComputeIntegerHash in utils.h. | 421 // with ComputeIntegerHash in utils.h. |
422 // | 422 // |
423 // hash = ~hash + (hash << 15); | 423 // hash = ~hash + (hash << 15); |
424 nor(scratch, reg0, zero_reg); | 424 nor(scratch, reg0, zero_reg); |
(...skipping 4614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5039 opcode == BGTZL); | 5039 opcode == BGTZL); |
5040 opcode = (cond == eq) ? BEQ : BNE; | 5040 opcode = (cond == eq) ? BEQ : BNE; |
5041 instr = (instr & ~kOpcodeMask) | opcode; | 5041 instr = (instr & ~kOpcodeMask) | opcode; |
5042 masm_.emit(instr); | 5042 masm_.emit(instr); |
5043 } | 5043 } |
5044 | 5044 |
5045 | 5045 |
5046 } } // namespace v8::internal | 5046 } } // namespace v8::internal |
5047 | 5047 |
5048 #endif // V8_TARGET_ARCH_MIPS | 5048 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |