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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 void LStoreContextSlot::PrintDataTo(StringStream* stream) { | 298 void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
299 InputAt(0)->PrintTo(stream); | 299 InputAt(0)->PrintTo(stream); |
300 stream->Add("[%d] <- ", slot_index()); | 300 stream->Add("[%d] <- ", slot_index()); |
301 InputAt(1)->PrintTo(stream); | 301 InputAt(1)->PrintTo(stream); |
302 } | 302 } |
303 | 303 |
304 | 304 |
| 305 void LInvokeFunction::PrintDataTo(StringStream* stream) { |
| 306 stream->Add("= "); |
| 307 InputAt(0)->PrintTo(stream); |
| 308 stream->Add(" #%d / ", arity()); |
| 309 } |
| 310 |
| 311 |
305 void LCallKeyed::PrintDataTo(StringStream* stream) { | 312 void LCallKeyed::PrintDataTo(StringStream* stream) { |
306 stream->Add("[rcx] #%d / ", arity()); | 313 stream->Add("[rcx] #%d / ", arity()); |
307 } | 314 } |
308 | 315 |
309 | 316 |
310 void LCallNamed::PrintDataTo(StringStream* stream) { | 317 void LCallNamed::PrintDataTo(StringStream* stream) { |
311 SmartPointer<char> name_string = name()->ToCString(); | 318 SmartPointer<char> name_string = name()->ToCString(); |
312 stream->Add("%s #%d / ", *name_string, arity()); | 319 stream->Add("%s #%d / ", *name_string, arity()); |
313 } | 320 } |
314 | 321 |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 } | 1210 } |
1204 | 1211 |
1205 | 1212 |
1206 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1213 LInstruction* LChunkBuilder::DoCallConstantFunction( |
1207 HCallConstantFunction* instr) { | 1214 HCallConstantFunction* instr) { |
1208 argument_count_ -= instr->argument_count(); | 1215 argument_count_ -= instr->argument_count(); |
1209 return MarkAsCall(DefineFixed(new LCallConstantFunction, rax), instr); | 1216 return MarkAsCall(DefineFixed(new LCallConstantFunction, rax), instr); |
1210 } | 1217 } |
1211 | 1218 |
1212 | 1219 |
| 1220 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
| 1221 LOperand* function = UseFixed(instr->function(), rdi); |
| 1222 argument_count_ -= instr->argument_count(); |
| 1223 LInvokeFunction* result = new LInvokeFunction(function); |
| 1224 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1225 } |
| 1226 |
| 1227 |
1213 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1228 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1214 BuiltinFunctionId op = instr->op(); | 1229 BuiltinFunctionId op = instr->op(); |
1215 if (op == kMathLog || op == kMathSin || op == kMathCos) { | 1230 if (op == kMathLog || op == kMathSin || op == kMathCos) { |
1216 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1231 LOperand* input = UseFixedDouble(instr->value(), xmm1); |
1217 LUnaryMathOperation* result = new LUnaryMathOperation(input); | 1232 LUnaryMathOperation* result = new LUnaryMathOperation(input); |
1218 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | 1233 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); |
1219 } else { | 1234 } else { |
1220 LOperand* input = UseRegisterAtStart(instr->value()); | 1235 LOperand* input = UseRegisterAtStart(instr->value()); |
1221 LUnaryMathOperation* result = new LUnaryMathOperation(input); | 1236 LUnaryMathOperation* result = new LUnaryMathOperation(input); |
1222 switch (op) { | 1237 switch (op) { |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 | 2128 |
2114 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2129 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2115 HEnvironment* outer = current_block_->last_environment()->outer(); | 2130 HEnvironment* outer = current_block_->last_environment()->outer(); |
2116 current_block_->UpdateEnvironment(outer); | 2131 current_block_->UpdateEnvironment(outer); |
2117 return NULL; | 2132 return NULL; |
2118 } | 2133 } |
2119 | 2134 |
2120 } } // namespace v8::internal | 2135 } } // namespace v8::internal |
2121 | 2136 |
2122 #endif // V8_TARGET_ARCH_X64 | 2137 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |