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

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

Issue 23462004: MIPS: Eliminate Smi check when changing from Smi to Integer32 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | 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 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 HValue* val = instr->value(); 1821 HValue* val = instr->value();
1822 LOperand* value = UseRegister(val); 1822 LOperand* value = UseRegister(val);
1823 if (val->type().IsSmi()) { 1823 if (val->type().IsSmi()) {
1824 return DefineSameAsFirst(new(zone()) LDummyUse(value)); 1824 return DefineSameAsFirst(new(zone()) LDummyUse(value));
1825 } 1825 }
1826 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); 1826 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value)));
1827 } else { 1827 } else {
1828 ASSERT(to.IsInteger32()); 1828 ASSERT(to.IsInteger32());
1829 LOperand* value = NULL; 1829 LOperand* value = NULL;
1830 LInstruction* res = NULL; 1830 LInstruction* res = NULL;
1831 if (instr->value()->type().IsSmi()) { 1831 HValue* val = instr->value();
1832 value = UseRegisterAtStart(instr->value()); 1832 if (val->type().IsSmi() || val->representation().IsSmi()) {
1833 value = UseRegisterAtStart(val);
1833 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); 1834 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1834 } else { 1835 } else {
1835 value = UseRegister(instr->value()); 1836 value = UseRegister(val);
1836 LOperand* temp1 = TempRegister(); 1837 LOperand* temp1 = TempRegister();
1837 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1838 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1838 : NULL; 1839 : NULL;
1839 LOperand* temp3 = FixedTemp(f22); 1840 LOperand* temp3 = FixedTemp(f22);
1840 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, 1841 res = DefineSameAsFirst(new(zone()) LTaggedToI(value,
1841 temp1, 1842 temp1,
1842 temp2, 1843 temp2,
1843 temp3)); 1844 temp3));
1844 res = AssignEnvironment(res); 1845 res = AssignEnvironment(res);
1845 } 1846 }
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 2500
2500 2501
2501 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2502 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2502 LOperand* object = UseRegister(instr->object()); 2503 LOperand* object = UseRegister(instr->object());
2503 LOperand* index = UseRegister(instr->index()); 2504 LOperand* index = UseRegister(instr->index());
2504 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2505 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2505 } 2506 }
2506 2507
2507 2508
2508 } } // namespace v8::internal 2509 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698