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

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

Issue 10536128: MIPS: Eliminate redundant smi checks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/mips/lithium-codegen-mips.cc ('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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 Representation from = instr->from(); 1640 Representation from = instr->from();
1641 Representation to = instr->to(); 1641 Representation to = instr->to();
1642 if (from.IsTagged()) { 1642 if (from.IsTagged()) {
1643 if (to.IsDouble()) { 1643 if (to.IsDouble()) {
1644 LOperand* value = UseRegister(instr->value()); 1644 LOperand* value = UseRegister(instr->value());
1645 LNumberUntagD* res = new(zone()) LNumberUntagD(value); 1645 LNumberUntagD* res = new(zone()) LNumberUntagD(value);
1646 return AssignEnvironment(DefineAsRegister(res)); 1646 return AssignEnvironment(DefineAsRegister(res));
1647 } else { 1647 } else {
1648 ASSERT(to.IsInteger32()); 1648 ASSERT(to.IsInteger32());
1649 LOperand* value = UseRegisterAtStart(instr->value()); 1649 LOperand* value = UseRegisterAtStart(instr->value());
1650 bool needs_check = !instr->value()->type().IsSmi();
1651 LInstruction* res = NULL; 1650 LInstruction* res = NULL;
1652 if (!needs_check) { 1651 if (instr->value()->type().IsSmi()) {
1653 res = DefineAsRegister(new(zone()) LSmiUntag(value, needs_check)); 1652 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1654 } else { 1653 } else {
1655 LOperand* temp1 = TempRegister(); 1654 LOperand* temp1 = TempRegister();
1656 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1655 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1657 : NULL; 1656 : NULL;
1658 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(f22) 1657 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(f22)
1659 : NULL; 1658 : NULL;
1660 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, 1659 res = DefineSameAsFirst(new(zone()) LTaggedToI(value,
1661 temp1, 1660 temp1,
1662 temp2, 1661 temp2,
1663 temp3)); 1662 temp3));
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 2334
2336 2335
2337 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2336 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2338 LOperand* object = UseRegister(instr->object()); 2337 LOperand* object = UseRegister(instr->object());
2339 LOperand* index = UseRegister(instr->index()); 2338 LOperand* index = UseRegister(instr->index());
2340 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2339 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2341 } 2340 }
2342 2341
2343 2342
2344 } } // namespace v8::internal 2343 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698