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

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

Issue 8355035: Refactor elements kind conversion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased to bleeding edge. 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
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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // -- edx : receiver 1585 // -- edx : receiver
1586 // -- esp[0] : return address 1586 // -- esp[0] : return address
1587 // ----------------------------------- 1587 // -----------------------------------
1588 // Must return the modified receiver in eax. 1588 // Must return the modified receiver in eax.
1589 if (!FLAG_trace_elements_transitions) {
1590 Label fail;
1591 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail);
1592 __ mov(eax, edx);
1593 __ Ret();
1594 __ bind(&fail);
1595 }
1589 1596
1590 __ pop(ebx); 1597 __ pop(ebx);
1591 __ push(edx); 1598 __ push(edx);
1592 __ push(ebx); // return address 1599 __ push(ebx); // return address
1593
1594 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1600 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1595 } 1601 }
1596 1602
1597 1603
1598 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( 1604 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1599 MacroAssembler* masm) { 1605 MacroAssembler* masm) {
1600 // ----------- S t a t e ------------- 1606 // ----------- S t a t e -------------
1601 // -- edx : receiver 1607 // -- edx : receiver
1602 // -- esp[0] : return address 1608 // -- esp[0] : return address
1603 // ----------------------------------- 1609 // -----------------------------------
1604 // 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::GenerateDoubleToObject(masm, &fail);
1614 __ mov(eax, edx);
1615 __ Ret();
1616 __ bind(&fail);
1617 }
1605 1618
1606 __ pop(ebx); 1619 __ pop(ebx);
1607 __ push(edx); 1620 __ push(edx);
1608 __ push(ebx); // return address 1621 __ push(ebx); // return address
1609
1610 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); 1622 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1611 } 1623 }
1612 1624
1613 1625
1614 #undef __ 1626 #undef __
1615 1627
1616 1628
1617 Condition CompareIC::ComputeCondition(Token::Value op) { 1629 Condition CompareIC::ComputeCondition(Token::Value op) {
1618 switch (op) { 1630 switch (op) {
1619 case Token::EQ_STRICT: 1631 case Token::EQ_STRICT:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1717 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1706 ? not_zero 1718 ? not_zero
1707 : zero; 1719 : zero;
1708 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1720 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1709 } 1721 }
1710 1722
1711 1723
1712 } } // namespace v8::internal 1724 } } // namespace v8::internal
1713 1725
1714 #endif // V8_TARGET_ARCH_IA32 1726 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm/codegen-arm.h ('K') | « src/ia32/codegen-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698