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 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 Label fail; | 1632 Label fail; |
1633 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); | 1633 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
1634 __ mov(eax, edx); | 1634 __ mov(eax, edx); |
1635 __ Ret(); | 1635 __ Ret(); |
1636 __ bind(&fail); | 1636 __ bind(&fail); |
1637 } | 1637 } |
1638 | 1638 |
1639 __ pop(ebx); | 1639 __ pop(ebx); |
1640 __ push(edx); | 1640 __ push(edx); |
1641 __ push(ebx); // return address | 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)); |
1642 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); | 1645 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
1643 } | 1646 } |
1644 | 1647 |
1645 | 1648 |
1646 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( | 1649 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
1647 MacroAssembler* masm) { | 1650 MacroAssembler* masm) { |
1648 // ----------- S t a t e ------------- | 1651 // ----------- S t a t e ------------- |
1649 // -- ebx : target map | 1652 // -- ebx : target map |
1650 // -- edx : receiver | 1653 // -- edx : receiver |
1651 // -- esp[0] : return address | 1654 // -- esp[0] : return address |
1652 // ----------------------------------- | 1655 // ----------------------------------- |
1653 // Must return the modified receiver in eax. | 1656 // Must return the modified receiver in eax. |
1654 if (!FLAG_trace_elements_transitions) { | 1657 if (!FLAG_trace_elements_transitions) { |
1655 Label fail; | 1658 Label fail; |
1656 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); | 1659 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
1657 __ mov(eax, edx); | 1660 __ mov(eax, edx); |
1658 __ Ret(); | 1661 __ Ret(); |
1659 __ bind(&fail); | 1662 __ bind(&fail); |
1660 } | 1663 } |
1661 | 1664 |
1662 __ pop(ebx); | 1665 __ pop(ebx); |
1663 __ push(edx); | 1666 __ push(edx); |
1664 __ push(ebx); // return address | 1667 __ push(ebx); // return address |
| 1668 // Leaving the code managed by the register allocator and return to the |
| 1669 // convention of using esi as context register. |
| 1670 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
1665 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); | 1671 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
1666 } | 1672 } |
1667 | 1673 |
1668 | 1674 |
1669 #undef __ | 1675 #undef __ |
1670 | 1676 |
1671 | 1677 |
1672 Condition CompareIC::ComputeCondition(Token::Value op) { | 1678 Condition CompareIC::ComputeCondition(Token::Value op) { |
1673 switch (op) { | 1679 switch (op) { |
1674 case Token::EQ_STRICT: | 1680 case Token::EQ_STRICT: |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1769 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1764 ? not_zero | 1770 ? not_zero |
1765 : zero; | 1771 : zero; |
1766 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1772 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1767 } | 1773 } |
1768 | 1774 |
1769 | 1775 |
1770 } } // namespace v8::internal | 1776 } } // namespace v8::internal |
1771 | 1777 |
1772 #endif // V8_TARGET_ARCH_IA32 | 1778 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |