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

Side by Side Diff: src/ia32/lithium-ia32.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/arm/lithium-arm.cc ('k') | src/x64/lithium-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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 : NULL; 1933 : NULL;
1934 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); 1934 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp);
1935 if (CpuFeatures::IsSafeForSnapshot(SSE2)) { 1935 if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
1936 return AssignEnvironment(DefineAsRegister(res)); 1936 return AssignEnvironment(DefineAsRegister(res));
1937 } else { 1937 } else {
1938 return AssignEnvironment(DefineX87TOS(res)); 1938 return AssignEnvironment(DefineX87TOS(res));
1939 } 1939 }
1940 } else if (to.IsSmi()) { 1940 } else if (to.IsSmi()) {
1941 HValue* val = instr->value(); 1941 HValue* val = instr->value();
1942 LOperand* value = UseRegister(val); 1942 LOperand* value = UseRegister(val);
1943 if (val->type().IsSmi()) {
1944 return DefineSameAsFirst(new(zone()) LDummyUse(value));
1945 }
1943 return AssignEnvironment( 1946 return AssignEnvironment(
1944 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); 1947 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
1945 } else { 1948 } else {
1946 ASSERT(to.IsInteger32()); 1949 ASSERT(to.IsInteger32());
1947 if (instr->value()->type().IsSmi()) { 1950 if (instr->value()->type().IsSmi()) {
1948 LOperand* value = UseRegister(instr->value()); 1951 LOperand* value = UseRegister(instr->value());
1949 LInstruction* result = 1952 LInstruction* result =
1950 DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); 1953 DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
1951 if (instr->value()->IsLoadKeyed()) { 1954 if (instr->value()->IsLoadKeyed()) {
1952 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value()); 1955 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value());
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2795 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2793 LOperand* object = UseRegister(instr->object()); 2796 LOperand* object = UseRegister(instr->object());
2794 LOperand* index = UseTempRegister(instr->index()); 2797 LOperand* index = UseTempRegister(instr->index());
2795 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2798 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2796 } 2799 }
2797 2800
2798 2801
2799 } } // namespace v8::internal 2802 } } // namespace v8::internal
2800 2803
2801 #endif // V8_TARGET_ARCH_IA32 2804 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698