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

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

Issue 15778006: DummyUse if Representation::Tagged()+Type::Smi() to Representation::Smi() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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.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 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 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 // building a stack frame. 1829 // building a stack frame.
1830 if (from.IsTagged()) { 1830 if (from.IsTagged()) {
1831 if (to.IsDouble()) { 1831 if (to.IsDouble()) {
1832 info()->MarkAsDeferredCalling(); 1832 info()->MarkAsDeferredCalling();
1833 LOperand* value = UseRegister(instr->value()); 1833 LOperand* value = UseRegister(instr->value());
1834 LNumberUntagD* res = new(zone()) LNumberUntagD(value); 1834 LNumberUntagD* res = new(zone()) LNumberUntagD(value);
1835 return AssignEnvironment(DefineAsRegister(res)); 1835 return AssignEnvironment(DefineAsRegister(res));
1836 } else if (to.IsSmi()) { 1836 } else if (to.IsSmi()) {
1837 HValue* val = instr->value(); 1837 HValue* val = instr->value();
1838 LOperand* value = UseRegister(val); 1838 LOperand* value = UseRegister(val);
1839 if (val->type().IsSmi()) {
1840 return DefineSameAsFirst(new(zone()) LDummyUse(value));
1841 }
1839 return AssignEnvironment( 1842 return AssignEnvironment(
1840 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); 1843 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
1841 } else { 1844 } else {
1842 ASSERT(to.IsInteger32()); 1845 ASSERT(to.IsInteger32());
1843 LOperand* value = UseRegister(instr->value()); 1846 LOperand* value = UseRegister(instr->value());
1844 if (instr->value()->type().IsSmi()) { 1847 if (instr->value()->type().IsSmi()) {
1845 LInstruction* result = 1848 LInstruction* result =
1846 DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); 1849 DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
1847 if (instr->value()->IsLoadKeyed()) { 1850 if (instr->value()->IsLoadKeyed()) {
1848 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value()); 1851 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value());
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2586 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2584 LOperand* object = UseRegister(instr->object()); 2587 LOperand* object = UseRegister(instr->object());
2585 LOperand* index = UseTempRegister(instr->index()); 2588 LOperand* index = UseTempRegister(instr->index());
2586 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2589 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2587 } 2590 }
2588 2591
2589 2592
2590 } } // namespace v8::internal 2593 } } // namespace v8::internal
2591 2594
2592 #endif // V8_TARGET_ARCH_X64 2595 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698