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 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 __ TailCallExternalReference(ref, 3, 1); | 1600 __ TailCallExternalReference(ref, 3, 1); |
1601 } | 1601 } |
1602 | 1602 |
1603 | 1603 |
1604 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { | 1604 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { |
1605 // ----------- S t a t e ------------- | 1605 // ----------- S t a t e ------------- |
1606 // -- rdx : receiver | 1606 // -- rdx : receiver |
1607 // -- rsp[0] : return address | 1607 // -- rsp[0] : return address |
1608 // ----------------------------------- | 1608 // ----------------------------------- |
1609 // Must return the modified receiver in eax. | 1609 // Must return the modified receiver in eax. |
| 1610 if (!FLAG_trace_elements_transitions) { |
| 1611 Label fail; |
| 1612 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
| 1613 __ movq(rax, rdx); |
| 1614 __ Ret(); |
| 1615 __ bind(&fail); |
| 1616 } |
1610 | 1617 |
1611 __ pop(rbx); | 1618 __ pop(rbx); |
1612 __ push(rdx); | 1619 __ push(rdx); |
1613 __ push(rbx); // return address | 1620 __ push(rbx); // return address |
1614 | |
1615 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); | 1621 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
1616 } | 1622 } |
1617 | 1623 |
1618 | 1624 |
1619 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( | 1625 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
1620 MacroAssembler* masm) { | 1626 MacroAssembler* masm) { |
1621 // ----------- S t a t e ------------- | 1627 // ----------- S t a t e ------------- |
1622 // -- rdx : receiver | 1628 // -- rdx : receiver |
1623 // -- rsp[0] : return address | 1629 // -- rsp[0] : return address |
1624 // ----------------------------------- | 1630 // ----------------------------------- |
1625 // Must return the modified receiver in eax. | 1631 // Must return the modified receiver in eax. |
| 1632 if (!FLAG_trace_elements_transitions) { |
| 1633 Label fail; |
| 1634 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
| 1635 __ movq(rax, rdx); |
| 1636 __ Ret(); |
| 1637 __ bind(&fail); |
| 1638 } |
1626 | 1639 |
1627 __ pop(rbx); | 1640 __ pop(rbx); |
1628 __ push(rdx); | 1641 __ push(rdx); |
1629 __ push(rbx); // return address | 1642 __ push(rbx); // return address |
1630 | |
1631 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); | 1643 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
1632 } | 1644 } |
1633 | 1645 |
1634 | 1646 |
1635 #undef __ | 1647 #undef __ |
1636 | 1648 |
1637 | 1649 |
1638 Condition CompareIC::ComputeCondition(Token::Value op) { | 1650 Condition CompareIC::ComputeCondition(Token::Value op) { |
1639 switch (op) { | 1651 switch (op) { |
1640 case Token::EQ_STRICT: | 1652 case Token::EQ_STRICT: |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1737 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1726 ? not_zero | 1738 ? not_zero |
1727 : zero; | 1739 : zero; |
1728 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1740 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1729 } | 1741 } |
1730 | 1742 |
1731 | 1743 |
1732 } } // namespace v8::internal | 1744 } } // namespace v8::internal |
1733 | 1745 |
1734 #endif // V8_TARGET_ARCH_X64 | 1746 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |