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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 GenerateKeyedLoadReceiverCheck( | 469 GenerateKeyedLoadReceiverCheck( |
470 masm, edx, eax, Map::kHasNamedInterceptor, &slow); | 470 masm, edx, eax, Map::kHasNamedInterceptor, &slow); |
471 | 471 |
472 // If the receiver is a fast-case object, check the keyed lookup | 472 // If the receiver is a fast-case object, check the keyed lookup |
473 // cache. Otherwise probe the dictionary. | 473 // cache. Otherwise probe the dictionary. |
474 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset)); | 474 __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset)); |
475 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), | 475 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
476 Immediate(isolate->factory()->hash_table_map())); | 476 Immediate(isolate->factory()->hash_table_map())); |
477 __ j(equal, &probe_dictionary); | 477 __ j(equal, &probe_dictionary); |
478 | 478 |
479 __ jmp(&slow); | |
danno
2013/05/07 15:25:29
You should remove this.
| |
479 // The receiver's map is still in eax, compute the keyed lookup cache hash | 480 // The receiver's map is still in eax, compute the keyed lookup cache hash |
480 // based on 32 bits of the map pointer and the string hash. | 481 // based on 32 bits of the map pointer and the string hash. |
481 if (FLAG_debug_code) { | 482 if (FLAG_debug_code) { |
482 __ cmp(eax, FieldOperand(edx, HeapObject::kMapOffset)); | 483 __ cmp(eax, FieldOperand(edx, HeapObject::kMapOffset)); |
483 __ Check(equal, "Map is no longer in eax."); | 484 __ Check(equal, "Map is no longer in eax."); |
484 } | 485 } |
485 __ mov(ebx, eax); // Keep the map around for later. | 486 __ mov(ebx, eax); // Keep the map around for later. |
486 __ shr(eax, KeyedLookupCache::kMapHashShift); | 487 __ shr(eax, KeyedLookupCache::kMapHashShift); |
487 __ mov(edi, FieldOperand(ecx, String::kHashFieldOffset)); | 488 __ mov(edi, FieldOperand(ecx, String::kHashFieldOffset)); |
488 __ shr(edi, String::kHashShift); | 489 __ shr(edi, String::kHashShift); |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1523 | 1524 |
1524 // Do tail-call to runtime routine. | 1525 // Do tail-call to runtime routine. |
1525 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC | 1526 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC |
1526 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), | 1527 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), |
1527 masm->isolate()) | 1528 masm->isolate()) |
1528 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); | 1529 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
1529 __ TailCallExternalReference(ref, 3, 1); | 1530 __ TailCallExternalReference(ref, 3, 1); |
1530 } | 1531 } |
1531 | 1532 |
1532 | 1533 |
1534 void StoreIC::GenerateSlow(MacroAssembler* masm) { | |
1535 // ----------- S t a t e ------------- | |
1536 // -- eax : value | |
1537 // -- ecx : key | |
1538 // -- edx : receiver | |
1539 // -- esp[0] : return address | |
1540 // ----------------------------------- | |
1541 | |
1542 __ pop(ebx); | |
1543 __ push(edx); | |
1544 __ push(ecx); | |
1545 __ push(eax); | |
1546 __ push(ebx); // return address | |
1547 | |
1548 // Do tail-call to runtime routine. | |
1549 ExternalReference ref(IC_Utility(kStoreIC_Slow), masm->isolate()); | |
1550 __ TailCallExternalReference(ref, 3, 1); | |
1551 } | |
1552 | |
1553 | |
1533 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { | 1554 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { |
1534 // ----------- S t a t e ------------- | 1555 // ----------- S t a t e ------------- |
1535 // -- eax : value | 1556 // -- eax : value |
1536 // -- ecx : key | 1557 // -- ecx : key |
1537 // -- edx : receiver | 1558 // -- edx : receiver |
1538 // -- esp[0] : return address | 1559 // -- esp[0] : return address |
1539 // ----------------------------------- | 1560 // ----------------------------------- |
1540 | 1561 |
1541 __ pop(ebx); | 1562 __ pop(ebx); |
1542 __ push(edx); | 1563 __ push(edx); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1672 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1693 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1673 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1694 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1674 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1695 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1675 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1696 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1676 } | 1697 } |
1677 | 1698 |
1678 | 1699 |
1679 } } // namespace v8::internal | 1700 } } // namespace v8::internal |
1680 | 1701 |
1681 #endif // V8_TARGET_ARCH_IA32 | 1702 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |