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

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

Issue 21173004: Version 3.20.11.1 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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/hydrogen-mark-deoptimize.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 __ push(ecx); 1584 __ push(ecx);
1585 __ push(eax); 1585 __ push(eax);
1586 __ push(ebx); // return address 1586 __ push(ebx); // return address
1587 1587
1588 // Do tail-call to runtime routine. 1588 // Do tail-call to runtime routine.
1589 ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); 1589 ExternalReference ref(IC_Utility(kKeyedStoreIC_Slow), masm->isolate());
1590 __ TailCallExternalReference(ref, 3, 1); 1590 __ TailCallExternalReference(ref, 3, 1);
1591 } 1591 }
1592 1592
1593 1593
1594 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1595 // ----------- S t a t e -------------
1596 // -- ebx : target map
1597 // -- edx : receiver
1598 // -- esp[0] : return address
1599 // -----------------------------------
1600 // Must return the modified receiver in eax.
1601 if (!FLAG_trace_elements_transitions) {
1602 Label fail;
1603 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1604 FAST_DOUBLE_ELEMENTS);
1605 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail);
1606 __ mov(eax, edx);
1607 __ Ret();
1608 __ bind(&fail);
1609 }
1610
1611 __ pop(ebx);
1612 __ push(edx);
1613 __ push(ebx); // return address
1614 // Leaving the code managed by the register allocator and return to the
1615 // convention of using esi as context register.
1616 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
1617 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1618 }
1619
1620
1621 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1622 MacroAssembler* masm) {
1623 // ----------- S t a t e -------------
1624 // -- ebx : target map
1625 // -- edx : receiver
1626 // -- esp[0] : return address
1627 // -----------------------------------
1628 // Must return the modified receiver in eax.
1629 if (!FLAG_trace_elements_transitions) {
1630 Label fail;
1631 AllocationSiteMode mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS,
1632 FAST_ELEMENTS);
1633 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
1634 __ mov(eax, edx);
1635 __ Ret();
1636 __ bind(&fail);
1637 }
1638
1639 __ pop(ebx);
1640 __ push(edx);
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));
1645 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1646 }
1647
1648
1594 #undef __ 1649 #undef __
1595 1650
1596 1651
1597 Condition CompareIC::ComputeCondition(Token::Value op) { 1652 Condition CompareIC::ComputeCondition(Token::Value op) {
1598 switch (op) { 1653 switch (op) {
1599 case Token::EQ_STRICT: 1654 case Token::EQ_STRICT:
1600 case Token::EQ: 1655 case Token::EQ:
1601 return equal; 1656 return equal;
1602 case Token::LT: 1657 case Token::LT:
1603 return less; 1658 return less;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1713 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1659 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1714 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1660 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1715 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1661 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1716 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1662 } 1717 }
1663 1718
1664 1719
1665 } } // namespace v8::internal 1720 } } // namespace v8::internal
1666 1721
1667 #endif // V8_TARGET_ARCH_IA32 1722 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-mark-deoptimize.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698