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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1146 return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1147 } | 1147 } |
1148 | 1148 |
1149 | 1149 |
1150 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1150 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1151 BuiltinFunctionId op = instr->op(); | 1151 BuiltinFunctionId op = instr->op(); |
1152 if (op == kMathLog || op == kMathSin || op == kMathCos) { | 1152 if (op == kMathLog || op == kMathSin || op == kMathCos) { |
1153 LOperand* input = UseFixedDouble(instr->value(), d2); | 1153 LOperand* input = UseFixedDouble(instr->value(), d2); |
1154 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); | 1154 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); |
1155 return MarkAsCall(DefineFixedDouble(result, d2), instr); | 1155 return MarkAsCall(DefineFixedDouble(result, d2), instr); |
| 1156 } if (op == kMathPowHalf) { |
| 1157 LOperand* input = UseFixedDouble(instr->value(), d2); |
| 1158 LOperand* temp = FixedTemp(d3); |
| 1159 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); |
| 1160 return DefineFixedDouble(result, d2); |
1156 } else { | 1161 } else { |
1157 LOperand* input = UseRegisterAtStart(instr->value()); | 1162 LOperand* input = UseRegisterAtStart(instr->value()); |
1158 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; | 1163 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; |
1159 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); | 1164 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); |
1160 switch (op) { | 1165 switch (op) { |
1161 case kMathAbs: | 1166 case kMathAbs: |
1162 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 1167 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
1163 case kMathFloor: | 1168 case kMathFloor: |
1164 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 1169 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
1165 case kMathSqrt: | 1170 case kMathSqrt: |
1166 return DefineAsRegister(result); | 1171 return DefineAsRegister(result); |
1167 case kMathRound: | 1172 case kMathRound: |
1168 return AssignEnvironment(DefineAsRegister(result)); | 1173 return AssignEnvironment(DefineAsRegister(result)); |
1169 case kMathPowHalf: | |
1170 return DefineAsRegister(result); | |
1171 default: | 1174 default: |
1172 UNREACHABLE(); | 1175 UNREACHABLE(); |
1173 return NULL; | 1176 return NULL; |
1174 } | 1177 } |
1175 } | 1178 } |
1176 } | 1179 } |
1177 | 1180 |
1178 | 1181 |
1179 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { | 1182 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
1180 ASSERT(instr->key()->representation().IsTagged()); | 1183 ASSERT(instr->key()->representation().IsTagged()); |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 | 2236 |
2234 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2237 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2235 LOperand* key = UseRegisterAtStart(instr->key()); | 2238 LOperand* key = UseRegisterAtStart(instr->key()); |
2236 LOperand* object = UseRegisterAtStart(instr->object()); | 2239 LOperand* object = UseRegisterAtStart(instr->object()); |
2237 LIn* result = new LIn(key, object); | 2240 LIn* result = new LIn(key, object); |
2238 return MarkAsCall(DefineFixed(result, r0), instr); | 2241 return MarkAsCall(DefineFixed(result, r0), instr); |
2239 } | 2242 } |
2240 | 2243 |
2241 | 2244 |
2242 } } // namespace v8::internal | 2245 } } // namespace v8::internal |
OLD | NEW |