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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 __ push(ebx); // return address | 1575 __ push(ebx); // return address |
1576 | 1576 |
1577 // Do tail-call to runtime routine. | 1577 // Do tail-call to runtime routine. |
1578 ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 1578 ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
1579 __ TailCallExternalReference(ref, 3, 1); | 1579 __ TailCallExternalReference(ref, 3, 1); |
1580 } | 1580 } |
1581 | 1581 |
1582 | 1582 |
1583 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { | 1583 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { |
1584 // ----------- S t a t e ------------- | 1584 // ----------- S t a t e ------------- |
| 1585 // -- ebx : target map |
1585 // -- edx : receiver | 1586 // -- edx : receiver |
1586 // -- esp[0] : return address | 1587 // -- esp[0] : return address |
1587 // ----------------------------------- | 1588 // ----------------------------------- |
1588 // Must return the modified receiver in eax. | 1589 // Must return the modified receiver in eax. |
| 1590 if (!FLAG_trace_elements_transitions) { |
| 1591 Label fail; |
| 1592 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
| 1593 __ mov(eax, edx); |
| 1594 __ Ret(); |
| 1595 __ bind(&fail); |
| 1596 } |
1589 | 1597 |
1590 __ pop(ebx); | 1598 __ pop(ebx); |
1591 __ push(edx); | 1599 __ push(edx); |
1592 __ push(ebx); // return address | 1600 __ push(ebx); // return address |
1593 | |
1594 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); | 1601 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
1595 } | 1602 } |
1596 | 1603 |
1597 | 1604 |
1598 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( | 1605 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
1599 MacroAssembler* masm) { | 1606 MacroAssembler* masm) { |
1600 // ----------- S t a t e ------------- | 1607 // ----------- S t a t e ------------- |
| 1608 // -- ebx : target map |
1601 // -- edx : receiver | 1609 // -- edx : receiver |
1602 // -- esp[0] : return address | 1610 // -- esp[0] : return address |
1603 // ----------------------------------- | 1611 // ----------------------------------- |
1604 // Must return the modified receiver in eax. | 1612 // Must return the modified receiver in eax. |
| 1613 if (!FLAG_trace_elements_transitions) { |
| 1614 Label fail; |
| 1615 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
| 1616 __ mov(eax, edx); |
| 1617 __ Ret(); |
| 1618 __ bind(&fail); |
| 1619 } |
1605 | 1620 |
1606 __ pop(ebx); | 1621 __ pop(ebx); |
1607 __ push(edx); | 1622 __ push(edx); |
1608 __ push(ebx); // return address | 1623 __ push(ebx); // return address |
1609 | |
1610 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); | 1624 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
1611 } | 1625 } |
1612 | 1626 |
1613 | 1627 |
1614 #undef __ | 1628 #undef __ |
1615 | 1629 |
1616 | 1630 |
1617 Condition CompareIC::ComputeCondition(Token::Value op) { | 1631 Condition CompareIC::ComputeCondition(Token::Value op) { |
1618 switch (op) { | 1632 switch (op) { |
1619 case Token::EQ_STRICT: | 1633 case Token::EQ_STRICT: |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1719 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1706 ? not_zero | 1720 ? not_zero |
1707 : zero; | 1721 : zero; |
1708 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1722 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1709 } | 1723 } |
1710 | 1724 |
1711 | 1725 |
1712 } } // namespace v8::internal | 1726 } } // namespace v8::internal |
1713 | 1727 |
1714 #endif // V8_TARGET_ARCH_IA32 | 1728 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |