| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 | 1348 |
| 1349 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1349 LInstruction* LChunkBuilder::DoCallConstantFunction( |
| 1350 HCallConstantFunction* instr) { | 1350 HCallConstantFunction* instr) { |
| 1351 argument_count_ -= instr->argument_count(); | 1351 argument_count_ -= instr->argument_count(); |
| 1352 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); | 1352 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 | 1355 |
| 1356 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1356 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
| 1357 MathFunctionId op = instr->op(); | 1357 MathFunctionId op = instr->op(); |
| 1358 if (op == kMathLog) { | 1358 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1359 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1359 LInstruction* result = new LUnaryMathOperation(input); |
| 1360 LInstruction* result = new LUnaryMathOperation(input); | 1360 switch (op) { |
| 1361 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | 1361 case kMathAbs: |
| 1362 } else { | 1362 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
| 1363 LOperand* input = UseRegisterAtStart(instr->value()); | 1363 case kMathFloor: |
| 1364 LInstruction* result = new LUnaryMathOperation(input); | 1364 return AssignEnvironment(DefineAsRegister(result)); |
| 1365 switch (op) { | 1365 case kMathRound: |
| 1366 case kMathAbs: | 1366 return AssignEnvironment(DefineAsRegister(result)); |
| 1367 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1367 case kMathSqrt: |
| 1368 case kMathFloor: | 1368 return DefineSameAsFirst(result); |
| 1369 return AssignEnvironment(DefineAsRegister(result)); | 1369 case kMathPowHalf: |
| 1370 case kMathRound: | 1370 return AssignEnvironment(DefineSameAsFirst(result)); |
| 1371 return AssignEnvironment(DefineAsRegister(result)); | 1371 default: |
| 1372 case kMathSqrt: | 1372 UNREACHABLE(); |
| 1373 return DefineSameAsFirst(result); | 1373 return NULL; |
| 1374 case kMathPowHalf: | |
| 1375 return AssignEnvironment(DefineSameAsFirst(result)); | |
| 1376 default: | |
| 1377 UNREACHABLE(); | |
| 1378 return NULL; | |
| 1379 } | |
| 1380 } | 1374 } |
| 1381 } | 1375 } |
| 1382 | 1376 |
| 1383 | 1377 |
| 1384 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { | 1378 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
| 1385 ASSERT(instr->key()->representation().IsTagged()); | 1379 ASSERT(instr->key()->representation().IsTagged()); |
| 1386 argument_count_ -= instr->argument_count(); | 1380 argument_count_ -= instr->argument_count(); |
| 1387 UseFixed(instr->key(), ecx); | 1381 UseFixed(instr->key(), ecx); |
| 1388 return MarkAsCall(DefineFixed(new LCallKeyed, eax), instr); | 1382 return MarkAsCall(DefineFixed(new LCallKeyed, eax), instr); |
| 1389 } | 1383 } |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 void LPointerMap::PrintTo(StringStream* stream) const { | 2099 void LPointerMap::PrintTo(StringStream* stream) const { |
| 2106 stream->Add("{"); | 2100 stream->Add("{"); |
| 2107 for (int i = 0; i < pointer_operands_.length(); ++i) { | 2101 for (int i = 0; i < pointer_operands_.length(); ++i) { |
| 2108 if (i != 0) stream->Add(";"); | 2102 if (i != 0) stream->Add(";"); |
| 2109 pointer_operands_[i]->PrintTo(stream); | 2103 pointer_operands_[i]->PrintTo(stream); |
| 2110 } | 2104 } |
| 2111 stream->Add("} @%d", position()); | 2105 stream->Add("} @%d", position()); |
| 2112 } | 2106 } |
| 2113 | 2107 |
| 2114 } } // namespace v8::internal | 2108 } } // namespace v8::internal |
| OLD | NEW |