Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: src/x64/ic-x64.cc

Issue 8355035: Refactor elements kind conversion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Bugfix Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 ExternalReference ref = force_generic 1596 ExternalReference ref = force_generic
1597 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), 1597 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric),
1598 masm->isolate()) 1598 masm->isolate())
1599 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 1599 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
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 // -- rbx : target map
1606 // -- rdx : receiver 1607 // -- rdx : receiver
1607 // -- rsp[0] : return address 1608 // -- rsp[0] : return address
1608 // ----------------------------------- 1609 // -----------------------------------
1609 // Must return the modified receiver in eax. 1610 // Must return the modified receiver in eax.
1611 if (!FLAG_trace_elements_transitions) {
1612 Label fail;
1613 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail);
1614 __ movq(rax, rdx);
1615 __ Ret();
1616 __ bind(&fail);
1617 }
1610 1618
1611 __ pop(rbx); 1619 __ pop(rbx);
1612 __ push(rdx); 1620 __ push(rdx);
1613 __ push(rbx); // return address 1621 __ push(rbx); // return address
1614
1615 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1622 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1616 } 1623 }
1617 1624
1618 1625
1619 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( 1626 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1620 MacroAssembler* masm) { 1627 MacroAssembler* masm) {
1621 // ----------- S t a t e ------------- 1628 // ----------- S t a t e -------------
1629 // -- rbx : target map
1622 // -- rdx : receiver 1630 // -- rdx : receiver
1623 // -- rsp[0] : return address 1631 // -- rsp[0] : return address
1624 // ----------------------------------- 1632 // -----------------------------------
1625 // Must return the modified receiver in eax. 1633 // Must return the modified receiver in eax.
1634 if (!FLAG_trace_elements_transitions) {
1635 Label fail;
1636 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail);
1637 __ movq(rax, rdx);
1638 __ Ret();
1639 __ bind(&fail);
1640 }
1626 1641
1627 __ pop(rbx); 1642 __ pop(rbx);
1628 __ push(rdx); 1643 __ push(rdx);
1629 __ push(rbx); // return address 1644 __ push(rbx); // return address
1630
1631 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); 1645 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1632 } 1646 }
1633 1647
1634 1648
1635 #undef __ 1649 #undef __
1636 1650
1637 1651
1638 Condition CompareIC::ComputeCondition(Token::Value op) { 1652 Condition CompareIC::ComputeCondition(Token::Value op) {
1639 switch (op) { 1653 switch (op) {
1640 case Token::EQ_STRICT: 1654 case Token::EQ_STRICT:
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1739 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1726 ? not_zero 1740 ? not_zero
1727 : zero; 1741 : zero;
1728 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1742 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1729 } 1743 }
1730 1744
1731 1745
1732 } } // namespace v8::internal 1746 } } // namespace v8::internal
1733 1747
1734 #endif // V8_TARGET_ARCH_X64 1748 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698