OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1113 LInstruction* LChunkBuilder::DoCallConstantFunction( |
1114 HCallConstantFunction* instr) { | 1114 HCallConstantFunction* instr) { |
1115 argument_count_ -= instr->argument_count(); | 1115 argument_count_ -= instr->argument_count(); |
1116 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr); | 1116 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr); |
1117 } | 1117 } |
1118 | 1118 |
1119 | 1119 |
1120 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1120 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1121 BuiltinFunctionId op = instr->op(); | 1121 BuiltinFunctionId op = instr->op(); |
1122 LOperand* input = UseRegisterAtStart(instr->value()); | 1122 LOperand* input = UseRegisterAtStart(instr->value()); |
1123 LInstruction* result = new LUnaryMathOperation(input); | 1123 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; |
| 1124 LInstruction* result = new LUnaryMathOperation(input, temp); |
1124 switch (op) { | 1125 switch (op) { |
1125 case kMathAbs: | 1126 case kMathAbs: |
1126 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1127 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1127 case kMathFloor: | 1128 case kMathFloor: |
1128 return AssignEnvironment(DefineAsRegister(result)); | 1129 return AssignEnvironment(DefineAsRegister(result)); |
1129 case kMathSqrt: | 1130 case kMathSqrt: |
1130 return DefineSameAsFirst(result); | 1131 return DefineSameAsFirst(result); |
1131 case kMathRound: | 1132 case kMathRound: |
1132 Abort("MathRound LUnaryMathOperation not implemented"); | 1133 Abort("MathRound LUnaryMathOperation not implemented"); |
1133 return NULL; | 1134 return NULL; |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 | 1833 |
1833 | 1834 |
1834 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1835 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1835 HEnvironment* outer = current_block_->last_environment()->outer(); | 1836 HEnvironment* outer = current_block_->last_environment()->outer(); |
1836 current_block_->UpdateEnvironment(outer); | 1837 current_block_->UpdateEnvironment(outer); |
1837 return NULL; | 1838 return NULL; |
1838 } | 1839 } |
1839 | 1840 |
1840 | 1841 |
1841 } } // namespace v8::internal | 1842 } } // namespace v8::internal |
OLD | NEW |