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

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

Issue 88623004: MIPS: Optimize Integer32ToSmi. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years 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
« 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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 } else if (val->HasRange() && val->range()->IsInSmiRange()) { 1944 } else if (val->HasRange() && val->range()->IsInSmiRange()) {
1945 return DefineAsRegister(new(zone()) LSmiTag(value)); 1945 return DefineAsRegister(new(zone()) LSmiTag(value));
1946 } else { 1946 } else {
1947 LNumberTagI* result = new(zone()) LNumberTagI(value); 1947 LNumberTagI* result = new(zone()) LNumberTagI(value);
1948 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1948 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1949 } 1949 }
1950 } else if (to.IsSmi()) { 1950 } else if (to.IsSmi()) {
1951 HValue* val = instr->value(); 1951 HValue* val = instr->value();
1952 LOperand* value = UseRegister(val); 1952 LOperand* value = UseRegister(val);
1953 LInstruction* result = val->CheckFlag(HInstruction::kUint32) 1953 LInstruction* result = val->CheckFlag(HInstruction::kUint32)
1954 ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) 1954 ? DefineAsRegister(new(zone()) LUint32ToSmi(value))
1955 : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); 1955 : DefineAsRegister(new(zone()) LInteger32ToSmi(value));
1956 if (val->HasRange() && val->range()->IsInSmiRange()) { 1956 if (val->HasRange() && val->range()->IsInSmiRange()) {
1957 return result; 1957 return result;
1958 } 1958 }
1959 return AssignEnvironment(result); 1959 return AssignEnvironment(result);
1960 } else { 1960 } else {
1961 ASSERT(to.IsDouble()); 1961 ASSERT(to.IsDouble());
1962 if (instr->value()->CheckFlag(HInstruction::kUint32)) { 1962 if (instr->value()->CheckFlag(HInstruction::kUint32)) {
1963 return DefineAsRegister( 1963 return DefineAsRegister(
1964 new(zone()) LUint32ToDouble(UseRegister(instr->value()))); 1964 new(zone()) LUint32ToDouble(UseRegister(instr->value())));
1965 } else { 1965 } else {
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 2597
2598 2598
2599 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2599 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2600 LOperand* object = UseRegister(instr->object()); 2600 LOperand* object = UseRegister(instr->object());
2601 LOperand* index = UseRegister(instr->index()); 2601 LOperand* index = UseRegister(instr->index());
2602 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2602 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2603 } 2603 }
2604 2604
2605 2605
2606 } } // namespace v8::internal 2606 } } // 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