| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 __ shr(rdi, Immediate(String::kHashShift)); | 626 __ shr(rdi, Immediate(String::kHashShift)); |
| 627 __ xor_(rcx, rdi); | 627 __ xor_(rcx, rdi); |
| 628 __ and_(rcx, Immediate(KeyedLookupCache::kCapacityMask)); | 628 __ and_(rcx, Immediate(KeyedLookupCache::kCapacityMask)); |
| 629 | 629 |
| 630 // Load the key (consisting of map and symbol) from the cache and | 630 // Load the key (consisting of map and symbol) from the cache and |
| 631 // check for match. | 631 // check for match. |
| 632 ExternalReference cache_keys | 632 ExternalReference cache_keys |
| 633 = ExternalReference::keyed_lookup_cache_keys(masm->isolate()); | 633 = ExternalReference::keyed_lookup_cache_keys(masm->isolate()); |
| 634 __ movq(rdi, rcx); | 634 __ movq(rdi, rcx); |
| 635 __ shl(rdi, Immediate(kPointerSizeLog2 + 1)); | 635 __ shl(rdi, Immediate(kPointerSizeLog2 + 1)); |
| 636 __ movq(kScratchRegister, cache_keys); | 636 __ LoadAddress(kScratchRegister, cache_keys); |
| 637 __ cmpq(rbx, Operand(kScratchRegister, rdi, times_1, 0)); | 637 __ cmpq(rbx, Operand(kScratchRegister, rdi, times_1, 0)); |
| 638 __ j(not_equal, &slow); | 638 __ j(not_equal, &slow); |
| 639 __ cmpq(rax, Operand(kScratchRegister, rdi, times_1, kPointerSize)); | 639 __ cmpq(rax, Operand(kScratchRegister, rdi, times_1, kPointerSize)); |
| 640 __ j(not_equal, &slow); | 640 __ j(not_equal, &slow); |
| 641 | 641 |
| 642 // Get field offset, which is a 32-bit integer. | 642 // Get field offset, which is a 32-bit integer. |
| 643 ExternalReference cache_field_offsets | 643 ExternalReference cache_field_offsets |
| 644 = ExternalReference::keyed_lookup_cache_field_offsets(masm->isolate()); | 644 = ExternalReference::keyed_lookup_cache_field_offsets(masm->isolate()); |
| 645 __ movq(kScratchRegister, cache_field_offsets); | 645 __ LoadAddress(kScratchRegister, cache_field_offsets); |
| 646 __ movl(rdi, Operand(kScratchRegister, rcx, times_4, 0)); | 646 __ movl(rdi, Operand(kScratchRegister, rcx, times_4, 0)); |
| 647 __ movzxbq(rcx, FieldOperand(rbx, Map::kInObjectPropertiesOffset)); | 647 __ movzxbq(rcx, FieldOperand(rbx, Map::kInObjectPropertiesOffset)); |
| 648 __ subq(rdi, rcx); | 648 __ subq(rdi, rcx); |
| 649 __ j(above_equal, &property_array_property); | 649 __ j(above_equal, &property_array_property); |
| 650 | 650 |
| 651 // Load in-object property. | 651 // Load in-object property. |
| 652 __ movzxbq(rcx, FieldOperand(rbx, Map::kInstanceSizeOffset)); | 652 __ movzxbq(rcx, FieldOperand(rbx, Map::kInstanceSizeOffset)); |
| 653 __ addq(rcx, rdi); | 653 __ addq(rcx, rdi); |
| 654 __ movq(rax, FieldOperand(rdx, rcx, times_pointer_size, 0)); | 654 __ movq(rax, FieldOperand(rdx, rcx, times_pointer_size, 0)); |
| 655 __ IncrementCounter(COUNTERS->keyed_load_generic_lookup_cache(), 1); | 655 __ IncrementCounter(COUNTERS->keyed_load_generic_lookup_cache(), 1); |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 // Enter an internal frame. | 1002 // Enter an internal frame. |
| 1003 __ EnterInternalFrame(); | 1003 __ EnterInternalFrame(); |
| 1004 | 1004 |
| 1005 // Push the receiver and the name of the function. | 1005 // Push the receiver and the name of the function. |
| 1006 __ push(rdx); | 1006 __ push(rdx); |
| 1007 __ push(rcx); | 1007 __ push(rcx); |
| 1008 | 1008 |
| 1009 // Call the entry. | 1009 // Call the entry. |
| 1010 CEntryStub stub(1); | 1010 CEntryStub stub(1); |
| 1011 __ movq(rax, Immediate(2)); | 1011 __ movq(rax, Immediate(2)); |
| 1012 __ movq(rbx, ExternalReference(IC_Utility(id), masm->isolate())); | 1012 __ LoadAddress(rbx, ExternalReference(IC_Utility(id), masm->isolate())); |
| 1013 __ CallStub(&stub); | 1013 __ CallStub(&stub); |
| 1014 | 1014 |
| 1015 // Move result to rdi and exit the internal frame. | 1015 // Move result to rdi and exit the internal frame. |
| 1016 __ movq(rdi, rax); | 1016 __ movq(rdi, rax); |
| 1017 __ LeaveInternalFrame(); | 1017 __ LeaveInternalFrame(); |
| 1018 | 1018 |
| 1019 // Check if the receiver is a global object of some sort. | 1019 // Check if the receiver is a global object of some sort. |
| 1020 // This can happen only for regular CallIC but not KeyedCallIC. | 1020 // This can happen only for regular CallIC but not KeyedCallIC. |
| 1021 if (id == IC::kCallIC_Miss) { | 1021 if (id == IC::kCallIC_Miss) { |
| 1022 Label invoke, global; | 1022 Label invoke, global; |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1737 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1737 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1738 ? not_zero | 1738 ? not_zero |
| 1739 : zero; | 1739 : zero; |
| 1740 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1740 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 | 1743 |
| 1744 } } // namespace v8::internal | 1744 } } // namespace v8::internal |
| 1745 | 1745 |
| 1746 #endif // V8_TARGET_ARCH_X64 | 1746 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |