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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 | 1354 |
1355 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1355 LInstruction* LChunkBuilder::DoCallConstantFunction( |
1356 HCallConstantFunction* instr) { | 1356 HCallConstantFunction* instr) { |
1357 argument_count_ -= instr->argument_count(); | 1357 argument_count_ -= instr->argument_count(); |
1358 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); | 1358 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); |
1359 } | 1359 } |
1360 | 1360 |
1361 | 1361 |
1362 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1362 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1363 BuiltinFunctionId op = instr->op(); | 1363 BuiltinFunctionId op = instr->op(); |
1364 if (op == kMathLog) { | 1364 if (op == kMathLog || op == kMathSin || op == kMathCos) { |
1365 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1365 LOperand* input = UseFixedDouble(instr->value(), xmm1); |
1366 LInstruction* result = new LUnaryMathOperation(input); | 1366 LInstruction* result = new LUnaryMathOperation(input); |
1367 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | 1367 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); |
1368 } else { | 1368 } else { |
1369 LOperand* input = UseRegisterAtStart(instr->value()); | 1369 LOperand* input = UseRegisterAtStart(instr->value()); |
1370 LInstruction* result = new LUnaryMathOperation(input); | 1370 LInstruction* result = new LUnaryMathOperation(input); |
1371 switch (op) { | 1371 switch (op) { |
1372 case kMathAbs: | 1372 case kMathAbs: |
1373 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1373 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1374 case kMathFloor: | 1374 case kMathFloor: |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 void LPointerMap::PrintTo(StringStream* stream) const { | 2119 void LPointerMap::PrintTo(StringStream* stream) const { |
2120 stream->Add("{"); | 2120 stream->Add("{"); |
2121 for (int i = 0; i < pointer_operands_.length(); ++i) { | 2121 for (int i = 0; i < pointer_operands_.length(); ++i) { |
2122 if (i != 0) stream->Add(";"); | 2122 if (i != 0) stream->Add(";"); |
2123 pointer_operands_[i]->PrintTo(stream); | 2123 pointer_operands_[i]->PrintTo(stream); |
2124 } | 2124 } |
2125 stream->Add("} @%d", position()); | 2125 stream->Add("} @%d", position()); |
2126 } | 2126 } |
2127 | 2127 |
2128 } } // namespace v8::internal | 2128 } } // namespace v8::internal |
OLD | NEW |