| OLD | NEW | 
|---|
| 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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1180   return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1180   return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 
| 1181 } | 1181 } | 
| 1182 | 1182 | 
| 1183 | 1183 | 
| 1184 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1184 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 
| 1185   switch (instr->op()) { | 1185   switch (instr->op()) { | 
| 1186     case kMathFloor: return DoMathFloor(instr); | 1186     case kMathFloor: return DoMathFloor(instr); | 
| 1187     case kMathRound: return DoMathRound(instr); | 1187     case kMathRound: return DoMathRound(instr); | 
| 1188     case kMathAbs: return DoMathAbs(instr); | 1188     case kMathAbs: return DoMathAbs(instr); | 
| 1189     case kMathLog: return DoMathLog(instr); | 1189     case kMathLog: return DoMathLog(instr); | 
| 1190     case kMathSin: return DoMathSin(instr); |  | 
| 1191     case kMathCos: return DoMathCos(instr); |  | 
| 1192     case kMathTan: return DoMathTan(instr); |  | 
| 1193     case kMathExp: return DoMathExp(instr); | 1190     case kMathExp: return DoMathExp(instr); | 
| 1194     case kMathSqrt: return DoMathSqrt(instr); | 1191     case kMathSqrt: return DoMathSqrt(instr); | 
| 1195     case kMathPowHalf: return DoMathPowHalf(instr); | 1192     case kMathPowHalf: return DoMathPowHalf(instr); | 
| 1196     default: | 1193     default: | 
| 1197       UNREACHABLE(); | 1194       UNREACHABLE(); | 
| 1198       return NULL; | 1195       return NULL; | 
| 1199   } | 1196   } | 
| 1200 } | 1197 } | 
| 1201 | 1198 | 
| 1202 | 1199 | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 1226 } | 1223 } | 
| 1227 | 1224 | 
| 1228 | 1225 | 
| 1229 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { | 1226 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { | 
| 1230   LOperand* input = UseFixedDouble(instr->value(), d2); | 1227   LOperand* input = UseFixedDouble(instr->value(), d2); | 
| 1231   LMathLog* result = new(zone()) LMathLog(input); | 1228   LMathLog* result = new(zone()) LMathLog(input); | 
| 1232   return MarkAsCall(DefineFixedDouble(result, d2), instr); | 1229   return MarkAsCall(DefineFixedDouble(result, d2), instr); | 
| 1233 } | 1230 } | 
| 1234 | 1231 | 
| 1235 | 1232 | 
| 1236 LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) { |  | 
| 1237   LOperand* input = UseFixedDouble(instr->value(), d2); |  | 
| 1238   LMathSin* result = new(zone()) LMathSin(input); |  | 
| 1239   return MarkAsCall(DefineFixedDouble(result, d2), instr); |  | 
| 1240 } |  | 
| 1241 |  | 
| 1242 |  | 
| 1243 LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) { |  | 
| 1244   LOperand* input = UseFixedDouble(instr->value(), d2); |  | 
| 1245   LMathCos* result = new(zone()) LMathCos(input); |  | 
| 1246   return MarkAsCall(DefineFixedDouble(result, d2), instr); |  | 
| 1247 } |  | 
| 1248 |  | 
| 1249 |  | 
| 1250 LInstruction* LChunkBuilder::DoMathTan(HUnaryMathOperation* instr) { |  | 
| 1251   LOperand* input = UseFixedDouble(instr->value(), d2); |  | 
| 1252   LMathTan* result = new(zone()) LMathTan(input); |  | 
| 1253   return MarkAsCall(DefineFixedDouble(result, d2), instr); |  | 
| 1254 } |  | 
| 1255 |  | 
| 1256 |  | 
| 1257 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { | 1233 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { | 
| 1258   ASSERT(instr->representation().IsDouble()); | 1234   ASSERT(instr->representation().IsDouble()); | 
| 1259   ASSERT(instr->value()->representation().IsDouble()); | 1235   ASSERT(instr->value()->representation().IsDouble()); | 
| 1260   LOperand* input = UseRegister(instr->value()); | 1236   LOperand* input = UseRegister(instr->value()); | 
| 1261   LOperand* temp1 = TempRegister(); | 1237   LOperand* temp1 = TempRegister(); | 
| 1262   LOperand* temp2 = TempRegister(); | 1238   LOperand* temp2 = TempRegister(); | 
| 1263   LOperand* double_temp = FixedTemp(d3);  // Chosen by fair dice roll. | 1239   LOperand* double_temp = FixedTemp(d3);  // Chosen by fair dice roll. | 
| 1264   LMathExp* result = new(zone()) LMathExp(input, double_temp, temp1, temp2); | 1240   LMathExp* result = new(zone()) LMathExp(input, double_temp, temp1, temp2); | 
| 1265   return DefineAsRegister(result); | 1241   return DefineAsRegister(result); | 
| 1266 } | 1242 } | 
| (...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2670   return AssignEnvironment(new(zone()) LCheckMapValue(value, map)); | 2646   return AssignEnvironment(new(zone()) LCheckMapValue(value, map)); | 
| 2671 } | 2647 } | 
| 2672 | 2648 | 
| 2673 | 2649 | 
| 2674 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2650 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 
| 2675   LOperand* object = UseRegister(instr->object()); | 2651   LOperand* object = UseRegister(instr->object()); | 
| 2676   LOperand* index = UseRegister(instr->index()); | 2652   LOperand* index = UseRegister(instr->index()); | 
| 2677   return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2653   return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 
| 2678 } | 2654 } | 
| 2679 | 2655 | 
| 2680 |  | 
| 2681 } }  // namespace v8::internal | 2656 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|