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

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

Issue 104203003: Remove unused trigonometric code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/objects.h » ('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 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1183 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1184 } 1184 }
1185 1185
1186 1186
1187 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1187 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1188 switch (instr->op()) { 1188 switch (instr->op()) {
1189 case kMathFloor: return DoMathFloor(instr); 1189 case kMathFloor: return DoMathFloor(instr);
1190 case kMathRound: return DoMathRound(instr); 1190 case kMathRound: return DoMathRound(instr);
1191 case kMathAbs: return DoMathAbs(instr); 1191 case kMathAbs: return DoMathAbs(instr);
1192 case kMathLog: return DoMathLog(instr); 1192 case kMathLog: return DoMathLog(instr);
1193 case kMathSin: return DoMathSin(instr);
1194 case kMathCos: return DoMathCos(instr);
1195 case kMathTan: return DoMathTan(instr);
1196 case kMathExp: return DoMathExp(instr); 1193 case kMathExp: return DoMathExp(instr);
1197 case kMathSqrt: return DoMathSqrt(instr); 1194 case kMathSqrt: return DoMathSqrt(instr);
1198 case kMathPowHalf: return DoMathPowHalf(instr); 1195 case kMathPowHalf: return DoMathPowHalf(instr);
1199 default: 1196 default:
1200 UNREACHABLE(); 1197 UNREACHABLE();
1201 return NULL; 1198 return NULL;
1202 } 1199 }
1203 } 1200 }
1204 1201
1205 1202
1206 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { 1203 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) {
1207 LOperand* input = UseFixedDouble(instr->value(), f4); 1204 LOperand* input = UseFixedDouble(instr->value(), f4);
1208 LMathLog* result = new(zone()) LMathLog(input); 1205 LMathLog* result = new(zone()) LMathLog(input);
1209 return MarkAsCall(DefineFixedDouble(result, f4), instr); 1206 return MarkAsCall(DefineFixedDouble(result, f4), instr);
1210 } 1207 }
1211 1208
1212 1209
1213 LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) {
1214 LOperand* input = UseFixedDouble(instr->value(), f4);
1215 LMathSin* result = new(zone()) LMathSin(input);
1216 return MarkAsCall(DefineFixedDouble(result, f4), instr);
1217 }
1218
1219
1220 LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) {
1221 LOperand* input = UseFixedDouble(instr->value(), f4);
1222 LMathCos* result = new(zone()) LMathCos(input);
1223 return MarkAsCall(DefineFixedDouble(result, f4), instr);
1224 }
1225
1226
1227 LInstruction* LChunkBuilder::DoMathTan(HUnaryMathOperation* instr) {
1228 LOperand* input = UseFixedDouble(instr->value(), f4);
1229 LMathTan* result = new(zone()) LMathTan(input);
1230 return MarkAsCall(DefineFixedDouble(result, f4), instr);
1231 }
1232
1233
1234 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { 1210 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) {
1235 ASSERT(instr->representation().IsDouble()); 1211 ASSERT(instr->representation().IsDouble());
1236 ASSERT(instr->value()->representation().IsDouble()); 1212 ASSERT(instr->value()->representation().IsDouble());
1237 LOperand* input = UseRegister(instr->value()); 1213 LOperand* input = UseRegister(instr->value());
1238 LOperand* temp1 = TempRegister(); 1214 LOperand* temp1 = TempRegister();
1239 LOperand* temp2 = TempRegister(); 1215 LOperand* temp2 = TempRegister();
1240 LOperand* double_temp = FixedTemp(f6); // Chosen by fair dice roll. 1216 LOperand* double_temp = FixedTemp(f6); // Chosen by fair dice roll.
1241 LMathExp* result = new(zone()) LMathExp(input, double_temp, temp1, temp2); 1217 LMathExp* result = new(zone()) LMathExp(input, double_temp, temp1, temp2);
1242 return DefineAsRegister(result); 1218 return DefineAsRegister(result);
1243 } 1219 }
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 2574
2599 2575
2600 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2576 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2601 LOperand* object = UseRegister(instr->object()); 2577 LOperand* object = UseRegister(instr->object());
2602 LOperand* index = UseRegister(instr->index()); 2578 LOperand* index = UseRegister(instr->index());
2603 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2579 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2604 } 2580 }
2605 2581
2606 2582
2607 } } // namespace v8::internal 2583 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698