Chromium Code Reviews| 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 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1220 argument_count_ -= instr->argument_count(); | 1220 argument_count_ -= instr->argument_count(); |
| 1221 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); | 1221 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 | 1224 |
| 1225 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1225 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
| 1226 BuiltinFunctionId op = instr->op(); | 1226 BuiltinFunctionId op = instr->op(); |
| 1227 if (op == kMathLog || op == kMathSin || op == kMathCos) { | 1227 if (op == kMathLog || op == kMathSin || op == kMathCos) { |
| 1228 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1228 LOperand* input = UseFixedDouble(instr->value(), xmm1); |
| 1229 LUnaryMathOperation* result = new LUnaryMathOperation(input); | 1229 LUnaryMathOperation* result = new LUnaryMathOperation(input); |
| 1230 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | 1230 if (op == kMathLog) { |
|
fschneider
2011/04/05 07:31:05
You don't need a fixed register for MathLog either
| |
| 1231 return DefineFixedDouble(result, xmm1); | |
| 1232 } else { | |
| 1233 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | |
| 1234 } | |
| 1231 } else { | 1235 } else { |
| 1232 LOperand* input = UseRegisterAtStart(instr->value()); | 1236 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1233 LUnaryMathOperation* result = new LUnaryMathOperation(input); | 1237 LUnaryMathOperation* result = new LUnaryMathOperation(input); |
| 1234 switch (op) { | 1238 switch (op) { |
| 1235 case kMathAbs: | 1239 case kMathAbs: |
| 1236 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1240 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
| 1237 case kMathFloor: | 1241 case kMathFloor: |
| 1238 return AssignEnvironment(DefineAsRegister(result)); | 1242 return AssignEnvironment(DefineAsRegister(result)); |
| 1239 case kMathRound: | 1243 case kMathRound: |
| 1240 return AssignEnvironment(DefineAsRegister(result)); | 1244 return AssignEnvironment(DefineAsRegister(result)); |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2156 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2160 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2157 HEnvironment* outer = current_block_->last_environment()->outer(); | 2161 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2158 current_block_->UpdateEnvironment(outer); | 2162 current_block_->UpdateEnvironment(outer); |
| 2159 return NULL; | 2163 return NULL; |
| 2160 } | 2164 } |
| 2161 | 2165 |
| 2162 | 2166 |
| 2163 } } // namespace v8::internal | 2167 } } // namespace v8::internal |
| 2164 | 2168 |
| 2165 #endif // V8_TARGET_ARCH_IA32 | 2169 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |