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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('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 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); 1922 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp);
1923 if (CpuFeatures::IsSafeForSnapshot(SSE2)) { 1923 if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
1924 return AssignEnvironment(DefineAsRegister(res)); 1924 return AssignEnvironment(DefineAsRegister(res));
1925 } else { 1925 } else {
1926 return AssignEnvironment(DefineX87TOS(res)); 1926 return AssignEnvironment(DefineX87TOS(res));
1927 } 1927 }
1928 } else { 1928 } else {
1929 ASSERT(to.IsInteger32()); 1929 ASSERT(to.IsInteger32());
1930 if (instr->value()->type().IsSmi()) { 1930 if (instr->value()->type().IsSmi()) {
1931 LOperand* value = UseRegister(instr->value()); 1931 LOperand* value = UseRegister(instr->value());
1932 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); 1932 LInstruction* result =
1933 DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
1934 if (instr->value()->IsLoadKeyed()) {
1935 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value());
1936 if (load_keyed->UsesMustHandleHole() &&
1937 load_keyed->hole_mode() == NEVER_RETURN_HOLE) {
1938 return AssignEnvironment(result);
1939 }
1940 }
1941 return result;
1933 } else { 1942 } else {
1934 bool truncating = instr->CanTruncateToInt32(); 1943 bool truncating = instr->CanTruncateToInt32();
1935 if (CpuFeatures::IsSafeForSnapshot(SSE2)) { 1944 if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
1936 LOperand* value = UseRegister(instr->value()); 1945 LOperand* value = UseRegister(instr->value());
1937 LOperand* xmm_temp = 1946 LOperand* xmm_temp =
1938 (truncating && CpuFeatures::IsSupported(SSE3)) 1947 (truncating && CpuFeatures::IsSupported(SSE3))
1939 ? NULL 1948 ? NULL
1940 : FixedTemp(xmm1); 1949 : FixedTemp(xmm1);
1941 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); 1950 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp);
1942 return AssignEnvironment(DefineSameAsFirst(res)); 1951 return AssignEnvironment(DefineSameAsFirst(res));
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2768 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2760 LOperand* object = UseRegister(instr->object()); 2769 LOperand* object = UseRegister(instr->object());
2761 LOperand* index = UseTempRegister(instr->index()); 2770 LOperand* index = UseTempRegister(instr->index());
2762 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2771 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2763 } 2772 }
2764 2773
2765 2774
2766 } } // namespace v8::internal 2775 } } // namespace v8::internal
2767 2776
2768 #endif // V8_TARGET_ARCH_IA32 2777 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698