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

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

Issue 15737003: Handle holes in smi-untag from LoadKeyed requiring hole handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Respect hole-mode 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/x64/lithium-x64.h ('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 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 if (from.IsTagged()) { 1818 if (from.IsTagged()) {
1819 if (to.IsDouble()) { 1819 if (to.IsDouble()) {
1820 info()->MarkAsDeferredCalling(); 1820 info()->MarkAsDeferredCalling();
1821 LOperand* value = UseRegister(instr->value()); 1821 LOperand* value = UseRegister(instr->value());
1822 LNumberUntagD* res = new(zone()) LNumberUntagD(value); 1822 LNumberUntagD* res = new(zone()) LNumberUntagD(value);
1823 return AssignEnvironment(DefineAsRegister(res)); 1823 return AssignEnvironment(DefineAsRegister(res));
1824 } else { 1824 } else {
1825 ASSERT(to.IsInteger32()); 1825 ASSERT(to.IsInteger32());
1826 LOperand* value = UseRegister(instr->value()); 1826 LOperand* value = UseRegister(instr->value());
1827 if (instr->value()->type().IsSmi()) { 1827 if (instr->value()->type().IsSmi()) {
1828 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); 1828 LInstruction* result =
1829 DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
1830 if (instr->value()->IsLoadKeyed()) {
1831 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value());
1832 if (load_keyed->UsesMustHandleHole() &&
1833 load_keyed->hole_mode() == NEVER_RETURN_HOLE) {
1834 return AssignEnvironment(result);
1835 }
1836 }
1837 return result;
1829 } else { 1838 } else {
1830 bool truncating = instr->CanTruncateToInt32(); 1839 bool truncating = instr->CanTruncateToInt32();
1831 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1); 1840 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1);
1832 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); 1841 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp);
1833 return AssignEnvironment(DefineSameAsFirst(res)); 1842 return AssignEnvironment(DefineSameAsFirst(res));
1834 } 1843 }
1835 } 1844 }
1836 } else if (from.IsDouble()) { 1845 } else if (from.IsDouble()) {
1837 if (to.IsTagged()) { 1846 if (to.IsTagged()) {
1838 info()->MarkAsDeferredCalling(); 1847 info()->MarkAsDeferredCalling();
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2558 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2550 LOperand* object = UseRegister(instr->object()); 2559 LOperand* object = UseRegister(instr->object());
2551 LOperand* index = UseTempRegister(instr->index()); 2560 LOperand* index = UseTempRegister(instr->index());
2552 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2561 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2553 } 2562 }
2554 2563
2555 2564
2556 } } // namespace v8::internal 2565 } } // namespace v8::internal
2557 2566
2558 #endif // V8_TARGET_ARCH_X64 2567 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698