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

Side by Side Diff: src/arm/lithium-arm.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 | « no previous file | src/ia32/lithium-ia32.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 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 } 1901 }
1902 if (from.IsTagged()) { 1902 if (from.IsTagged()) {
1903 if (to.IsDouble()) { 1903 if (to.IsDouble()) {
1904 info()->MarkAsDeferredCalling(); 1904 info()->MarkAsDeferredCalling();
1905 LOperand* value = UseRegister(instr->value()); 1905 LOperand* value = UseRegister(instr->value());
1906 LNumberUntagD* res = new(zone()) LNumberUntagD(value); 1906 LNumberUntagD* res = new(zone()) LNumberUntagD(value);
1907 return AssignEnvironment(DefineAsRegister(res)); 1907 return AssignEnvironment(DefineAsRegister(res));
1908 } else if (to.IsSmi()) { 1908 } else if (to.IsSmi()) {
1909 HValue* val = instr->value(); 1909 HValue* val = instr->value();
1910 LOperand* value = UseRegister(val); 1910 LOperand* value = UseRegister(val);
1911 if (val->type().IsSmi()) {
1912 return DefineSameAsFirst(new(zone()) LDummyUse(value));
1913 }
1911 return AssignEnvironment( 1914 return AssignEnvironment(
1912 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); 1915 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
1913 } else { 1916 } else {
1914 ASSERT(to.IsInteger32()); 1917 ASSERT(to.IsInteger32());
1915 LOperand* value = NULL; 1918 LOperand* value = NULL;
1916 LInstruction* res = NULL; 1919 LInstruction* res = NULL;
1917 if (instr->value()->type().IsSmi()) { 1920 if (instr->value()->type().IsSmi()) {
1918 value = UseRegisterAtStart(instr->value()); 1921 value = UseRegisterAtStart(instr->value());
1919 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); 1922 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1920 if (instr->value()->IsLoadKeyed()) { 1923 if (instr->value()->IsLoadKeyed()) {
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 2642
2640 2643
2641 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2644 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2642 LOperand* object = UseRegister(instr->object()); 2645 LOperand* object = UseRegister(instr->object());
2643 LOperand* index = UseRegister(instr->index()); 2646 LOperand* index = UseRegister(instr->index());
2644 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2647 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2645 } 2648 }
2646 2649
2647 2650
2648 } } // namespace v8::internal 2651 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698