| 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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 __ push(ecx); | 1584 __ push(ecx); |
| 1585 __ push(eax); | 1585 __ push(eax); |
| 1586 __ push(ebx); // return address | 1586 __ push(ebx); // return address |
| 1587 | 1587 |
| 1588 // Do tail-call to runtime routine. | 1588 // Do tail-call to runtime routine. |
| 1589 ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 1589 ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
| 1590 __ TailCallExternalReference(ref, 3, 1); | 1590 __ TailCallExternalReference(ref, 3, 1); |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 | 1593 |
| 1594 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { | |
| 1595 // ----------- S t a t e ------------- | |
| 1596 // -- ebx : target map | |
| 1597 // -- edx : receiver | |
| 1598 // -- esp[0] : return address | |
| 1599 // ----------------------------------- | |
| 1600 // Must return the modified receiver in eax. | |
| 1601 if (!FLAG_trace_elements_transitions) { | |
| 1602 Label fail; | |
| 1603 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, | |
| 1604 FAST_DOUBLE_ELEMENTS); | |
| 1605 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); | |
| 1606 __ mov(eax, edx); | |
| 1607 __ Ret(); | |
| 1608 __ bind(&fail); | |
| 1609 } | |
| 1610 | |
| 1611 __ pop(ebx); | |
| 1612 __ push(edx); | |
| 1613 __ push(ebx); // return address | |
| 1614 // Leaving the code managed by the register allocator and return to the | |
| 1615 // convention of using esi as context register. | |
| 1616 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | |
| 1617 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); | |
| 1618 } | |
| 1619 | |
| 1620 | |
| 1621 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( | |
| 1622 MacroAssembler* masm) { | |
| 1623 // ----------- S t a t e ------------- | |
| 1624 // -- ebx : target map | |
| 1625 // -- edx : receiver | |
| 1626 // -- esp[0] : return address | |
| 1627 // ----------------------------------- | |
| 1628 // Must return the modified receiver in eax. | |
| 1629 if (!FLAG_trace_elements_transitions) { | |
| 1630 Label fail; | |
| 1631 AllocationSiteMode mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, | |
| 1632 FAST_ELEMENTS); | |
| 1633 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); | |
| 1634 __ mov(eax, edx); | |
| 1635 __ Ret(); | |
| 1636 __ bind(&fail); | |
| 1637 } | |
| 1638 | |
| 1639 __ pop(ebx); | |
| 1640 __ push(edx); | |
| 1641 __ push(ebx); // return address | |
| 1642 // Leaving the code managed by the register allocator and return to the | |
| 1643 // convention of using esi as context register. | |
| 1644 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | |
| 1645 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); | |
| 1646 } | |
| 1647 | |
| 1648 | |
| 1649 #undef __ | 1594 #undef __ |
| 1650 | 1595 |
| 1651 | 1596 |
| 1652 Condition CompareIC::ComputeCondition(Token::Value op) { | 1597 Condition CompareIC::ComputeCondition(Token::Value op) { |
| 1653 switch (op) { | 1598 switch (op) { |
| 1654 case Token::EQ_STRICT: | 1599 case Token::EQ_STRICT: |
| 1655 case Token::EQ: | 1600 case Token::EQ: |
| 1656 return equal; | 1601 return equal; |
| 1657 case Token::LT: | 1602 case Token::LT: |
| 1658 return less; | 1603 return less; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1658 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
| 1714 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1659 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1715 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1660 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1716 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1661 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1717 } | 1662 } |
| 1718 | 1663 |
| 1719 | 1664 |
| 1720 } } // namespace v8::internal | 1665 } } // namespace v8::internal |
| 1721 | 1666 |
| 1722 #endif // V8_TARGET_ARCH_IA32 | 1667 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |