| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 stream->Add("#%d / ", arity()); | 290 stream->Add("#%d / ", arity()); |
| 291 } | 291 } |
| 292 | 292 |
| 293 | 293 |
| 294 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { | 294 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { |
| 295 stream->Add("/%s ", hydrogen()->OpName()); | 295 stream->Add("/%s ", hydrogen()->OpName()); |
| 296 value()->PrintTo(stream); | 296 value()->PrintTo(stream); |
| 297 } | 297 } |
| 298 | 298 |
| 299 | 299 |
| 300 void LMathExp::PrintDataTo(StringStream* stream) { |
| 301 value()->PrintTo(stream); |
| 302 } |
| 303 |
| 304 |
| 300 void LLoadContextSlot::PrintDataTo(StringStream* stream) { | 305 void LLoadContextSlot::PrintDataTo(StringStream* stream) { |
| 301 context()->PrintTo(stream); | 306 context()->PrintTo(stream); |
| 302 stream->Add("[%d]", slot_index()); | 307 stream->Add("[%d]", slot_index()); |
| 303 } | 308 } |
| 304 | 309 |
| 305 | 310 |
| 306 void LStoreContextSlot::PrintDataTo(StringStream* stream) { | 311 void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
| 307 context()->PrintTo(stream); | 312 context()->PrintTo(stream); |
| 308 stream->Add("[%d] <- ", slot_index()); | 313 stream->Add("[%d] <- ", slot_index()); |
| 309 value()->PrintTo(stream); | 314 value()->PrintTo(stream); |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1038 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1034 } | 1039 } |
| 1035 | 1040 |
| 1036 | 1041 |
| 1037 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1042 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
| 1038 BuiltinFunctionId op = instr->op(); | 1043 BuiltinFunctionId op = instr->op(); |
| 1039 if (op == kMathLog || op == kMathSin || op == kMathCos || op == kMathTan) { | 1044 if (op == kMathLog || op == kMathSin || op == kMathCos || op == kMathTan) { |
| 1040 LOperand* input = UseFixedDouble(instr->value(), f4); | 1045 LOperand* input = UseFixedDouble(instr->value(), f4); |
| 1041 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, NULL); | 1046 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, NULL); |
| 1042 return MarkAsCall(DefineFixedDouble(result, f4), instr); | 1047 return MarkAsCall(DefineFixedDouble(result, f4), instr); |
| 1048 } else if (op == kMathExp) { |
| 1049 ASSERT(instr->representation().IsDouble()); |
| 1050 ASSERT(instr->value()->representation().IsDouble()); |
| 1051 LOperand* input = UseTempRegister(instr->value()); |
| 1052 LOperand* temp1 = TempRegister(); |
| 1053 LOperand* temp2 = TempRegister(); |
| 1054 LOperand* double_temp = FixedTemp(f6); // Chosen by fair dice roll. |
| 1055 LMathExp* result = new(zone()) LMathExp(input, double_temp, temp1, temp2); |
| 1056 return DefineAsRegister(result); |
| 1043 } else if (op == kMathPowHalf) { | 1057 } else if (op == kMathPowHalf) { |
| 1044 // Input cannot be the same as the result. | 1058 // Input cannot be the same as the result. |
| 1045 // See lithium-codegen-mips.cc::DoMathPowHalf. | 1059 // See lithium-codegen-mips.cc::DoMathPowHalf. |
| 1046 LOperand* input = UseFixedDouble(instr->value(), f8); | 1060 LOperand* input = UseFixedDouble(instr->value(), f8); |
| 1047 LOperand* temp = FixedTemp(f6); | 1061 LOperand* temp = FixedTemp(f6); |
| 1048 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp); | 1062 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp); |
| 1049 return DefineFixedDouble(result, f4); | 1063 return DefineFixedDouble(result, f4); |
| 1050 } else { | 1064 } else { |
| 1051 LOperand* input = UseRegisterAtStart(instr->value()); | 1065 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1052 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; | 1066 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; |
| (...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2227 | 2241 |
| 2228 | 2242 |
| 2229 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2243 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2230 LOperand* object = UseRegister(instr->object()); | 2244 LOperand* object = UseRegister(instr->object()); |
| 2231 LOperand* index = UseRegister(instr->index()); | 2245 LOperand* index = UseRegister(instr->index()); |
| 2232 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2246 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2233 } | 2247 } |
| 2234 | 2248 |
| 2235 | 2249 |
| 2236 } } // namespace v8::internal | 2250 } } // namespace v8::internal |
| OLD | NEW |