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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 // cache. Otherwise probe the dictionary. | 476 // cache. Otherwise probe the dictionary. |
477 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset)); | 477 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset)); |
478 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), | 478 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
479 Immediate(isolate->factory()->hash_table_map())); | 479 Immediate(isolate->factory()->hash_table_map())); |
480 __ j(equal, &probe_dictionary); | 480 __ j(equal, &probe_dictionary); |
481 | 481 |
482 // The receiver's map is still in eax, compute the keyed lookup cache hash | 482 // The receiver's map is still in eax, compute the keyed lookup cache hash |
483 // based on 32 bits of the map pointer and the string hash. | 483 // based on 32 bits of the map pointer and the string hash. |
484 if (FLAG_debug_code) { | 484 if (FLAG_debug_code) { |
485 __ cmp(eax, FieldOperand(edx, HeapObject::kMapOffset)); | 485 __ cmp(eax, FieldOperand(edx, HeapObject::kMapOffset)); |
486 __ Check(equal, kMapIsNoLongerInEax); | 486 __ Check(equal, "Map is no longer in eax."); |
487 } | 487 } |
488 __ mov(ebx, eax); // Keep the map around for later. | 488 __ mov(ebx, eax); // Keep the map around for later. |
489 __ shr(eax, KeyedLookupCache::kMapHashShift); | 489 __ shr(eax, KeyedLookupCache::kMapHashShift); |
490 __ mov(edi, FieldOperand(ecx, String::kHashFieldOffset)); | 490 __ mov(edi, FieldOperand(ecx, String::kHashFieldOffset)); |
491 __ shr(edi, String::kHashShift); | 491 __ shr(edi, String::kHashShift); |
492 __ xor_(eax, edi); | 492 __ xor_(eax, edi); |
493 __ and_(eax, KeyedLookupCache::kCapacityMask & KeyedLookupCache::kHashMask); | 493 __ and_(eax, KeyedLookupCache::kCapacityMask & KeyedLookupCache::kHashMask); |
494 | 494 |
495 // Load the key (consisting of map and internalized string) from the cache and | 495 // Load the key (consisting of map and internalized string) from the cache and |
496 // check for match. | 496 // check for match. |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1658 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1659 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1659 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1660 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1660 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1661 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1661 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1662 } | 1662 } |
1663 | 1663 |
1664 | 1664 |
1665 } } // namespace v8::internal | 1665 } } // namespace v8::internal |
1666 | 1666 |
1667 #endif // V8_TARGET_ARCH_IA32 | 1667 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |