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

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

Issue 6691054: [Arguments] Merge (7442,7496] from bleeding_edge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Created 9 years, 8 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/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-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 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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 receiver, 1180 receiver,
1181 length, 1181 length,
1182 elements, 1182 elements,
1183 temp); 1183 temp);
1184 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY); 1184 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY);
1185 } 1185 }
1186 1186
1187 1187
1188 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { 1188 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1189 ++argument_count_; 1189 ++argument_count_;
1190 LOperand* argument = UseOrConstant(instr->argument()); 1190 LOperand* argument = UseAny(instr->argument());
1191 return new LPushArgument(argument); 1191 return new LPushArgument(argument);
1192 } 1192 }
1193 1193
1194 1194
1195 LInstruction* LChunkBuilder::DoContext(HContext* instr) { 1195 LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1196 return DefineAsRegister(new LContext); 1196 return DefineAsRegister(new LContext);
1197 } 1197 }
1198 1198
1199 1199
1200 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { 1200 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 if (from.IsTagged()) { 1626 if (from.IsTagged()) {
1627 if (to.IsDouble()) { 1627 if (to.IsDouble()) {
1628 LOperand* value = UseRegister(instr->value()); 1628 LOperand* value = UseRegister(instr->value());
1629 LNumberUntagD* res = new LNumberUntagD(value); 1629 LNumberUntagD* res = new LNumberUntagD(value);
1630 return AssignEnvironment(DefineAsRegister(res)); 1630 return AssignEnvironment(DefineAsRegister(res));
1631 } else { 1631 } else {
1632 ASSERT(to.IsInteger32()); 1632 ASSERT(to.IsInteger32());
1633 LOperand* value = UseRegister(instr->value()); 1633 LOperand* value = UseRegister(instr->value());
1634 bool needs_check = !instr->value()->type().IsSmi(); 1634 bool needs_check = !instr->value()->type().IsSmi();
1635 if (needs_check) { 1635 if (needs_check) {
1636 CpuFeatures* cpu_features = Isolate::Current()->cpu_features();
1637 LOperand* xmm_temp = 1636 LOperand* xmm_temp =
1638 (instr->CanTruncateToInt32() && cpu_features->IsSupported(SSE3)) 1637 (instr->CanTruncateToInt32() && CpuFeatures::IsSupported(SSE3))
1639 ? NULL 1638 ? NULL
1640 : FixedTemp(xmm1); 1639 : FixedTemp(xmm1);
1641 LTaggedToI* res = new LTaggedToI(value, xmm_temp); 1640 LTaggedToI* res = new LTaggedToI(value, xmm_temp);
1642 return AssignEnvironment(DefineSameAsFirst(res)); 1641 return AssignEnvironment(DefineSameAsFirst(res));
1643 } else { 1642 } else {
1644 return DefineSameAsFirst(new LSmiUntag(value, needs_check)); 1643 return DefineSameAsFirst(new LSmiUntag(value, needs_check));
1645 } 1644 }
1646 } 1645 }
1647 } else if (from.IsDouble()) { 1646 } else if (from.IsDouble()) {
1648 if (to.IsTagged()) { 1647 if (to.IsTagged()) {
1649 LOperand* value = UseRegister(instr->value()); 1648 LOperand* value = UseRegister(instr->value());
1650 LOperand* temp = TempRegister(); 1649 LOperand* temp = TempRegister();
1651 1650
1652 // Make sure that temp and result_temp are different registers. 1651 // Make sure that temp and result_temp are different registers.
1653 LUnallocated* result_temp = TempRegister(); 1652 LUnallocated* result_temp = TempRegister();
1654 LNumberTagD* result = new LNumberTagD(value, temp); 1653 LNumberTagD* result = new LNumberTagD(value, temp);
1655 return AssignPointerMap(Define(result, result_temp)); 1654 return AssignPointerMap(Define(result, result_temp));
1656 } else { 1655 } else {
1657 ASSERT(to.IsInteger32()); 1656 ASSERT(to.IsInteger32());
1658 bool needs_temp = instr->CanTruncateToInt32() && 1657 bool needs_temp = instr->CanTruncateToInt32() &&
1659 !Isolate::Current()->cpu_features()->IsSupported(SSE3); 1658 !CpuFeatures::IsSupported(SSE3);
1660 LOperand* value = needs_temp ? 1659 LOperand* value = needs_temp ?
1661 UseTempRegister(instr->value()) : UseRegister(instr->value()); 1660 UseTempRegister(instr->value()) : UseRegister(instr->value());
1662 LOperand* temp = needs_temp ? TempRegister() : NULL; 1661 LOperand* temp = needs_temp ? TempRegister() : NULL;
1663 return AssignEnvironment(DefineAsRegister(new LDoubleToI(value, temp))); 1662 return AssignEnvironment(DefineAsRegister(new LDoubleToI(value, temp)));
1664 } 1663 }
1665 } else if (from.IsInteger32()) { 1664 } else if (from.IsInteger32()) {
1666 if (to.IsTagged()) { 1665 if (to.IsTagged()) {
1667 HValue* val = instr->value(); 1666 HValue* val = instr->value();
1668 LOperand* value = UseRegister(val); 1667 LOperand* value = UseRegister(val);
1669 if (val->HasRange() && val->range()->IsInSmiRange()) { 1668 if (val->HasRange() && val->range()->IsInSmiRange()) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 return DefineAsRegister(new LConstantD(temp)); 1738 return DefineAsRegister(new LConstantD(temp));
1740 } else if (r.IsTagged()) { 1739 } else if (r.IsTagged()) {
1741 return DefineAsRegister(new LConstantT); 1740 return DefineAsRegister(new LConstantT);
1742 } else { 1741 } else {
1743 UNREACHABLE(); 1742 UNREACHABLE();
1744 return NULL; 1743 return NULL;
1745 } 1744 }
1746 } 1745 }
1747 1746
1748 1747
1749 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { 1748 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
1750 LLoadGlobal* result = new LLoadGlobal; 1749 LLoadGlobalCell* result = new LLoadGlobalCell;
1751 return instr->check_hole_value() 1750 return instr->check_hole_value()
1752 ? AssignEnvironment(DefineAsRegister(result)) 1751 ? AssignEnvironment(DefineAsRegister(result))
1753 : DefineAsRegister(result); 1752 : DefineAsRegister(result);
1754 } 1753 }
1755 1754
1756 1755
1757 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { 1756 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
1758 LStoreGlobal* result = new LStoreGlobal(UseRegisterAtStart(instr->value())); 1757 LOperand* context = UseFixed(instr->context(), esi);
1758 LOperand* global_object = UseFixed(instr->global_object(), eax);
1759 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(context, global_object);
1760 return MarkAsCall(DefineFixed(result, eax), instr);
1761 }
1762
1763
1764 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
1765 LStoreGlobalCell* result =
1766 new LStoreGlobalCell(UseRegisterAtStart(instr->value()));
1759 return instr->check_hole_value() ? AssignEnvironment(result) : result; 1767 return instr->check_hole_value() ? AssignEnvironment(result) : result;
1760 } 1768 }
1761 1769
1762 1770
1771 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) {
1772 LOperand* context = UseFixed(instr->context(), esi);
1773 LOperand* global_object = UseFixed(instr->global_object(), edx);
1774 LOperand* value = UseFixed(instr->value(), eax);
1775 LStoreGlobalGeneric* result =
1776 new LStoreGlobalGeneric(context, global_object, value);
1777 return MarkAsCall(result, instr);
1778 }
1779
1780
1763 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 1781 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1764 LOperand* context = UseRegisterAtStart(instr->value()); 1782 LOperand* context = UseRegisterAtStart(instr->value());
1765 return DefineAsRegister(new LLoadContextSlot(context)); 1783 return DefineAsRegister(new LLoadContextSlot(context));
1766 } 1784 }
1767 1785
1768 1786
1769 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { 1787 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
1770 LOperand* context; 1788 LOperand* context;
1771 LOperand* value; 1789 LOperand* value;
1772 LOperand* temp; 1790 LOperand* temp;
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2167 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2150 HEnvironment* outer = current_block_->last_environment()->outer(); 2168 HEnvironment* outer = current_block_->last_environment()->outer();
2151 current_block_->UpdateEnvironment(outer); 2169 current_block_->UpdateEnvironment(outer);
2152 return NULL; 2170 return NULL;
2153 } 2171 }
2154 2172
2155 2173
2156 } } // namespace v8::internal 2174 } } // namespace v8::internal
2157 2175
2158 #endif // V8_TARGET_ARCH_IA32 2176 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698