OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ |
6 #define V8_COMPILER_CODE_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 Node* ExternalConstant(ExternalReference address); | 220 Node* ExternalConstant(ExternalReference address); |
221 Node* Float64Constant(double value); | 221 Node* Float64Constant(double value); |
222 Node* NaNConstant(); | 222 Node* NaNConstant(); |
223 | 223 |
224 bool ToInt32Constant(Node* node, int32_t& out_value); | 224 bool ToInt32Constant(Node* node, int32_t& out_value); |
225 bool ToInt64Constant(Node* node, int64_t& out_value); | 225 bool ToInt64Constant(Node* node, int64_t& out_value); |
226 bool ToSmiConstant(Node* node, Smi*& out_value); | 226 bool ToSmiConstant(Node* node, Smi*& out_value); |
227 bool ToIntPtrConstant(Node* node, intptr_t& out_value); | 227 bool ToIntPtrConstant(Node* node, intptr_t& out_value); |
228 | 228 |
229 Node* Parameter(int value); | 229 Node* Parameter(int value); |
| 230 Node* GetJSContextParameter(); |
230 void Return(Node* value); | 231 void Return(Node* value); |
231 void PopAndReturn(Node* pop, Node* value); | 232 void PopAndReturn(Node* pop, Node* value); |
232 | 233 |
233 void DebugBreak(); | 234 void DebugBreak(); |
234 void Comment(const char* format, ...); | 235 void Comment(const char* format, ...); |
235 | 236 |
236 void Bind(Label* label); | 237 void Bind(Label* label); |
237 void Goto(Label* label); | 238 void Goto(Label* label); |
238 void GotoIf(Node* condition, Label* true_label); | 239 void GotoIf(Node* condition, Label* true_label); |
239 void GotoUnless(Node* condition, Label* false_label); | 240 void GotoUnless(Node* condition, Label* false_label); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 TArgs... args) { | 358 TArgs... args) { |
358 int argc = static_cast<int>(sizeof...(args)); | 359 int argc = static_cast<int>(sizeof...(args)); |
359 Node* arity = Int32Constant(argc); | 360 Node* arity = Int32Constant(argc); |
360 Node* receiver = LoadRoot(Heap::kUndefinedValueRootIndex); | 361 Node* receiver = LoadRoot(Heap::kUndefinedValueRootIndex); |
361 | 362 |
362 // Construct(target, new_target, arity, receiver, arguments...) | 363 // Construct(target, new_target, arity, receiver, arguments...) |
363 return CallStub(callable, context, new_target, new_target, arity, receiver, | 364 return CallStub(callable, context, new_target, new_target, arity, receiver, |
364 args...); | 365 args...); |
365 } | 366 } |
366 | 367 |
| 368 Node* CallCFunctionN(Signature<MachineType>* signature, int input_count, |
| 369 Node* const* inputs); |
| 370 |
367 // Call to a C function with two arguments. | 371 // Call to a C function with two arguments. |
368 Node* CallCFunction2(MachineType return_type, MachineType arg0_type, | 372 Node* CallCFunction2(MachineType return_type, MachineType arg0_type, |
369 MachineType arg1_type, Node* function, Node* arg0, | 373 MachineType arg1_type, Node* function, Node* arg0, |
370 Node* arg1); | 374 Node* arg1); |
371 | 375 |
372 // Call to a C function with three arguments. | 376 // Call to a C function with three arguments. |
373 Node* CallCFunction3(MachineType return_type, MachineType arg0_type, | 377 Node* CallCFunction3(MachineType return_type, MachineType arg0_type, |
374 MachineType arg1_type, MachineType arg2_type, | 378 MachineType arg1_type, MachineType arg2_type, |
375 Node* function, Node* arg0, Node* arg1, Node* arg2); | 379 Node* function, Node* arg0, Node* arg1, Node* arg2); |
376 | 380 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 CodeAssemblerCallback call_epilogue_; | 505 CodeAssemblerCallback call_epilogue_; |
502 | 506 |
503 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState); | 507 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState); |
504 }; | 508 }; |
505 | 509 |
506 } // namespace compiler | 510 } // namespace compiler |
507 } // namespace internal | 511 } // namespace internal |
508 } // namespace v8 | 512 } // namespace v8 |
509 | 513 |
510 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 514 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
OLD | NEW |