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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 __ GetObjectType(key, map, hash); | 319 __ GetObjectType(key, map, hash); |
320 __ Branch(not_unique, hi, hash, Operand(LAST_UNIQUE_NAME_TYPE)); | 320 __ Branch(not_unique, hi, hash, Operand(LAST_UNIQUE_NAME_TYPE)); |
321 STATIC_ASSERT(LAST_UNIQUE_NAME_TYPE == FIRST_NONSTRING_TYPE); | 321 STATIC_ASSERT(LAST_UNIQUE_NAME_TYPE == FIRST_NONSTRING_TYPE); |
322 __ Branch(&unique, eq, hash, Operand(LAST_UNIQUE_NAME_TYPE)); | 322 __ Branch(&unique, eq, hash, Operand(LAST_UNIQUE_NAME_TYPE)); |
323 | 323 |
324 // Is the string an array index, with cached numeric value? | 324 // Is the string an array index, with cached numeric value? |
325 __ lw(hash, FieldMemOperand(key, Name::kHashFieldOffset)); | 325 __ lw(hash, FieldMemOperand(key, Name::kHashFieldOffset)); |
326 __ And(at, hash, Operand(Name::kContainsCachedArrayIndexMask)); | 326 __ And(at, hash, Operand(Name::kContainsCachedArrayIndexMask)); |
327 __ Branch(index_string, eq, at, Operand(zero_reg)); | 327 __ Branch(index_string, eq, at, Operand(zero_reg)); |
328 | 328 |
329 // Is the string internalized? | 329 // Is the string internalized? We know it's a string, so a single |
| 330 // bit test is enough. |
330 // map: key map | 331 // map: key map |
331 __ lbu(hash, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 332 __ lbu(hash, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
332 STATIC_ASSERT(kInternalizedTag != 0); | 333 STATIC_ASSERT(kInternalizedTag != 0); |
333 __ And(at, hash, Operand(kIsInternalizedMask)); | 334 __ And(at, hash, Operand(kIsInternalizedMask)); |
334 __ Branch(not_unique, eq, at, Operand(zero_reg)); | 335 __ Branch(not_unique, eq, at, Operand(zero_reg)); |
335 | 336 |
336 __ bind(&unique); | 337 __ bind(&unique); |
337 } | 338 } |
338 | 339 |
339 | 340 |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 } else { | 1704 } else { |
1704 ASSERT(Assembler::IsBne(branch_instr)); | 1705 ASSERT(Assembler::IsBne(branch_instr)); |
1705 patcher.ChangeBranchCondition(eq); | 1706 patcher.ChangeBranchCondition(eq); |
1706 } | 1707 } |
1707 } | 1708 } |
1708 | 1709 |
1709 | 1710 |
1710 } } // namespace v8::internal | 1711 } } // namespace v8::internal |
1711 | 1712 |
1712 #endif // V8_TARGET_ARCH_MIPS | 1713 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |