Flutter Engine
The Flutter Engine
dart_calling_conventions.h
Go to the documentation of this file.
1// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_COMPILER_BACKEND_DART_CALLING_CONVENTIONS_H_
6#define RUNTIME_VM_COMPILER_BACKEND_DART_CALLING_CONVENTIONS_H_
7
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
10#endif // defined(DART_PRECOMPILED_RUNTIME)
11
12#include <utility>
13
14#include "platform/globals.h"
17
18namespace dart {
19
20class Function;
21
22namespace compiler {
23
24// Array which for every parameter (or argument) contains its expected
25// |Location| and its |Representation|.
27
28// For a call to the |target| function with |argc| arguments compute
29// amount of stack space needed to pass all arguments in words.
30//
31// If |parameter_info| is not |nullptr| then it will be populated to
32// describe expected location and representation of each argument.
33//
34// If |should_assign_stack_locations| is |false| then only arguments
35// which will be passsed in registers have their locations computed.
36// This does not affect return value: it is always equal to the
37// number of words needed for all arguments which are passed on the stack.
39 Zone* zone,
40 const Function& target,
41 intptr_t argc,
42 std::function<Representation(intptr_t)> argument_rep,
43 bool should_assign_stack_locations,
44 ParameterInfoArray* parameter_info);
45
46} // namespace compiler
47
48} // namespace dart
49
50#endif // RUNTIME_VM_COMPILER_BACKEND_DART_CALLING_CONVENTIONS_H_
uint32_t * target
Dart_NativeFunction function
Definition: fuchsia.cc:51
intptr_t ComputeCallingConvention(Zone *zone, const Function &target, intptr_t argc, std::function< Representation(intptr_t)> argument_rep, bool should_assign_stack_locations, ParameterInfoArray *parameter_info)
Definition: dart_vm.cc:33
Representation
Definition: locations.h:66