| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   414   // cache. Otherwise probe the dictionary leaving result in rcx. |   414   // cache. Otherwise probe the dictionary leaving result in rcx. | 
|   415   __ movp(rbx, FieldOperand(rdx, JSObject::kPropertiesOffset)); |   415   __ movp(rbx, FieldOperand(rdx, JSObject::kPropertiesOffset)); | 
|   416   __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset), |   416   __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset), | 
|   417                  Heap::kHashTableMapRootIndex); |   417                  Heap::kHashTableMapRootIndex); | 
|   418   __ j(equal, &probe_dictionary); |   418   __ j(equal, &probe_dictionary); | 
|   419  |   419  | 
|   420   // Load the map of the receiver, compute the keyed lookup cache hash |   420   // Load the map of the receiver, compute the keyed lookup cache hash | 
|   421   // based on 32 bits of the map pointer and the string hash. |   421   // based on 32 bits of the map pointer and the string hash. | 
|   422   __ movp(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); |   422   __ movp(rbx, FieldOperand(rdx, HeapObject::kMapOffset)); | 
|   423   __ movl(rcx, rbx); |   423   __ movl(rcx, rbx); | 
|   424   __ shr(rcx, Immediate(KeyedLookupCache::kMapHashShift)); |   424   __ shrl(rcx, Immediate(KeyedLookupCache::kMapHashShift)); | 
|   425   __ movl(rdi, FieldOperand(rax, String::kHashFieldOffset)); |   425   __ movl(rdi, FieldOperand(rax, String::kHashFieldOffset)); | 
|   426   __ shr(rdi, Immediate(String::kHashShift)); |   426   __ shrl(rdi, Immediate(String::kHashShift)); | 
|   427   __ xorp(rcx, rdi); |   427   __ xorp(rcx, rdi); | 
|   428   int mask = (KeyedLookupCache::kCapacityMask & KeyedLookupCache::kHashMask); |   428   int mask = (KeyedLookupCache::kCapacityMask & KeyedLookupCache::kHashMask); | 
|   429   __ andp(rcx, Immediate(mask)); |   429   __ andp(rcx, Immediate(mask)); | 
|   430  |   430  | 
|   431   // Load the key (consisting of map and internalized string) from the cache and |   431   // Load the key (consisting of map and internalized string) from the cache and | 
|   432   // check for match. |   432   // check for match. | 
|   433   Label load_in_object_property; |   433   Label load_in_object_property; | 
|   434   static const int kEntriesPerBucket = KeyedLookupCache::kEntriesPerBucket; |   434   static const int kEntriesPerBucket = KeyedLookupCache::kEntriesPerBucket; | 
|   435   Label hit_on_nth_entry[kEntriesPerBucket]; |   435   Label hit_on_nth_entry[kEntriesPerBucket]; | 
|   436   ExternalReference cache_keys |   436   ExternalReference cache_keys | 
|   437       = ExternalReference::keyed_lookup_cache_keys(masm->isolate()); |   437       = ExternalReference::keyed_lookup_cache_keys(masm->isolate()); | 
|   438  |   438  | 
|   439   for (int i = 0; i < kEntriesPerBucket - 1; i++) { |   439   for (int i = 0; i < kEntriesPerBucket - 1; i++) { | 
|   440     Label try_next_entry; |   440     Label try_next_entry; | 
|   441     __ movp(rdi, rcx); |   441     __ movp(rdi, rcx); | 
|   442     __ shl(rdi, Immediate(kPointerSizeLog2 + 1)); |   442     __ shlp(rdi, Immediate(kPointerSizeLog2 + 1)); | 
|   443     __ LoadAddress(kScratchRegister, cache_keys); |   443     __ LoadAddress(kScratchRegister, cache_keys); | 
|   444     int off = kPointerSize * i * 2; |   444     int off = kPointerSize * i * 2; | 
|   445     __ cmpp(rbx, Operand(kScratchRegister, rdi, times_1, off)); |   445     __ cmpp(rbx, Operand(kScratchRegister, rdi, times_1, off)); | 
|   446     __ j(not_equal, &try_next_entry); |   446     __ j(not_equal, &try_next_entry); | 
|   447     __ cmpp(rax, Operand(kScratchRegister, rdi, times_1, off + kPointerSize)); |   447     __ cmpp(rax, Operand(kScratchRegister, rdi, times_1, off + kPointerSize)); | 
|   448     __ j(equal, &hit_on_nth_entry[i]); |   448     __ j(equal, &hit_on_nth_entry[i]); | 
|   449     __ bind(&try_next_entry); |   449     __ bind(&try_next_entry); | 
|   450   } |   450   } | 
|   451  |   451  | 
|   452   int off = kPointerSize * (kEntriesPerBucket - 1) * 2; |   452   int off = kPointerSize * (kEntriesPerBucket - 1) * 2; | 
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1321   Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |  1321   Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 
|  1322       ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |  1322       ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 
|  1323       : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |  1323       : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 
|  1324   *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |  1324   *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 
|  1325 } |  1325 } | 
|  1326  |  1326  | 
|  1327  |  1327  | 
|  1328 } }  // namespace v8::internal |  1328 } }  // namespace v8::internal | 
|  1329  |  1329  | 
|  1330 #endif  // V8_TARGET_ARCH_X64 |  1330 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |