Flutter Engine
The Flutter Engine
native_functions.c
Go to the documentation of this file.
1// Copyright (c) 2019, 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#include <stdint.h>
6
7uint8_t Function1Uint8(uint8_t x) { return x + 42; }
8
9uint16_t Function1Uint16(uint16_t x) { return x + 42; }
10
11uint32_t Function1Uint32(uint32_t x) { return x + 42; }
12
13uint64_t Function1Uint64(uint64_t x) { return x + 42; }
14
15int8_t Function1Int8(int8_t x) { return x + 42; }
16
17int16_t Function1Int16(int16_t x) { return x + 42; }
18
19int32_t Function1Int32(int32_t x) { return x + 42; }
20
21int32_t Function2Int32(int32_t a, int32_t b) {
22 return a + b;
23}
24
25int32_t Function4Int32(int32_t a, int32_t b, int32_t c, int32_t d) {
26 return a + b + c + d;
27}
28
29int32_t Function10Int32(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e,
30 int32_t f, int32_t g, int32_t h, int32_t i, int32_t j) {
31 return a + b + c + d + e + f + g + h + i + j;
32}
33
34int32_t Function20Int32(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e,
35 int32_t f, int32_t g, int32_t h, int32_t i, int32_t j,
36 int32_t k, int32_t l, int32_t m, int32_t n, int32_t o,
37 int32_t p, int32_t q, int32_t r, int32_t s, int32_t t) {
38 return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o +
39 p + q + r + s + t;
40}
41
42int64_t Function1Int64(int64_t x) { return x + 42; }
43
44int64_t Function2Int64(int64_t a, int64_t b) {
45 return a + b;
46}
47
48int64_t Function4Int64(int64_t a, int64_t b, int64_t c, int64_t d) {
49 return a + b + c + d;
50}
51
52int64_t Function10Int64(int64_t a, int64_t b, int64_t c, int64_t d, int64_t e,
53 int64_t f, int64_t g, int64_t h, int64_t i, int64_t j) {
54 return a + b + c + d + e + f + g + h + i + j;
55}
56
57int64_t Function20Int64(int64_t a, int64_t b, int64_t c, int64_t d, int64_t e,
58 int64_t f, int64_t g, int64_t h, int64_t i, int64_t j,
59 int64_t k, int64_t l, int64_t m, int64_t n, int64_t o,
60 int64_t p, int64_t q, int64_t r, int64_t s, int64_t t) {
61 return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o +
62 p + q + r + s + t;
63}
64
65float Function1Float(float x) { return x + 42.0f; }
66
67float Function2Float(float a, float b) {
68 return a + b;
69}
70
71float Function4Float(float a, float b, float c, float d) {
72 return a + b + c + d;
73}
74
75float Function10Float(float a, float b, float c, float d, float e, float f,
76 float g, float h, float i, float j) {
77 return a + b + c + d + e + f + g + h + i + j;
78}
79
80float Function20Float(float a, float b, float c, float d, float e, float f,
81 float g, float h, float i, float j, float k, float l,
82 float m, float n, float o, float p, float q, float r,
83 float s, float t) {
84 return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p +
85 q + r + s + t;
86}
87
88double Function1Double(double x) { return x + 42.0; }
89
90double Function2Double(double a, double b) {
91 return a + b;
92}
93
94double Function4Double(double a, double b, double c, double d) {
95 return a + b + c + d;
96}
97
98double Function10Double(double a, double b, double c, double d, double e,
99 double f, double g, double h, double i, double j) {
100 return a + b + c + d + e + f + g + h + i + j;
101}
102
103double Function20Double(double a, double b, double c, double d, double e,
104 double f, double g, double h, double i, double j,
105 double k, double l, double m, double n, double o,
106 double p, double q, double r, double s, double t) {
107 return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o +
108 p + q + r + s + t;
109}
110
111uint8_t *Function1PointerUint8(uint8_t *a) { return a + 1; }
112
113uint8_t *Function2PointerUint8(uint8_t *a, uint8_t *b) { return a + 1; }
114
115uint8_t *Function4PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d) {
116 return a + 1;
117}
118
119uint8_t *Function10PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d,
120 uint8_t *e, uint8_t *f, uint8_t *g, uint8_t *h,
121 uint8_t *i, uint8_t *j) {
122 return a + 1;
123}
124
125uint8_t *Function20PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d,
126 uint8_t *e, uint8_t *f, uint8_t *g, uint8_t *h,
127 uint8_t *i, uint8_t *j, uint8_t *k, uint8_t *l,
128 uint8_t *m, uint8_t *n, uint8_t *o, uint8_t *p,
129 uint8_t *q, uint8_t *r, uint8_t *s,
130 uint8_t *t) {
131 return a + 1;
132}
133
134void* Function1Handle(void* a) {
135 return a;
136}
137
138void* Function2Handle(void* a, void* b) {
139 return a;
140}
141
142void* Function4Handle(void* a, void* b, void* c, void* d) {
143 return a;
144}
145
146void* Function10Handle(void* a,
147 void* b,
148 void* c,
149 void* d,
150 void* e,
151 void* f,
152 void* g,
153 void* h,
154 void* i,
155 void* j) {
156 return a;
157}
158
159void* Function20Handle(void* a,
160 void* b,
161 void* c,
162 void* d,
163 void* e,
164 void* f,
165 void* g,
166 void* h,
167 void* i,
168 void* j,
169 void* k,
170 void* l,
171 void* m,
172 void* n,
173 void* o,
174 void* p,
175 void* q,
176 void* r,
177 void* s,
178 void* t) {
179 return a;
180}
float Function20Float(float a, float b, float c, float d, float e, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o, float p, float q, float r, float s, float t)
uint8_t * Function4PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d)
int64_t Function10Int64(int64_t a, int64_t b, int64_t c, int64_t d, int64_t e, int64_t f, int64_t g, int64_t h, int64_t i, int64_t j)
int64_t Function4Int64(int64_t a, int64_t b, int64_t c, int64_t d)
int16_t Function1Int16(int16_t x)
int32_t Function10Int32(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f, int32_t g, int32_t h, int32_t i, int32_t j)
int8_t Function1Int8(int8_t x)
uint32_t Function1Uint32(uint32_t x)
uint8_t * Function10PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d, uint8_t *e, uint8_t *f, uint8_t *g, uint8_t *h, uint8_t *i, uint8_t *j)
void * Function10Handle(void *a, void *b, void *c, void *d, void *e, void *f, void *g, void *h, void *i, void *j)
void * Function2Handle(void *a, void *b)
float Function1Float(float x)
int32_t Function2Int32(int32_t a, int32_t b)
void * Function1Handle(void *a)
int32_t Function4Int32(int32_t a, int32_t b, int32_t c, int32_t d)
uint8_t * Function20PointerUint8(uint8_t *a, uint8_t *b, uint8_t *c, uint8_t *d, uint8_t *e, uint8_t *f, uint8_t *g, uint8_t *h, uint8_t *i, uint8_t *j, uint8_t *k, uint8_t *l, uint8_t *m, uint8_t *n, uint8_t *o, uint8_t *p, uint8_t *q, uint8_t *r, uint8_t *s, uint8_t *t)
int32_t Function20Int32(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f, int32_t g, int32_t h, int32_t i, int32_t j, int32_t k, int32_t l, int32_t m, int32_t n, int32_t o, int32_t p, int32_t q, int32_t r, int32_t s, int32_t t)
double Function10Double(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j)
uint8_t Function1Uint8(uint8_t x)
int64_t Function2Int64(int64_t a, int64_t b)
void * Function20Handle(void *a, void *b, void *c, void *d, void *e, void *f, void *g, void *h, void *i, void *j, void *k, void *l, void *m, void *n, void *o, void *p, void *q, void *r, void *s, void *t)
uint64_t Function1Uint64(uint64_t x)
double Function4Double(double a, double b, double c, double d)
float Function4Float(float a, float b, float c, float d)
uint8_t * Function2PointerUint8(uint8_t *a, uint8_t *b)
int32_t Function1Int32(int32_t x)
float Function10Float(float a, float b, float c, float d, float e, float f, float g, float h, float i, float j)
int64_t Function1Int64(int64_t x)
int64_t Function20Int64(int64_t a, int64_t b, int64_t c, int64_t d, int64_t e, int64_t f, int64_t g, int64_t h, int64_t i, int64_t j, int64_t k, int64_t l, int64_t m, int64_t n, int64_t o, int64_t p, int64_t q, int64_t r, int64_t s, int64_t t)
double Function2Double(double a, double b)
uint8_t * Function1PointerUint8(uint8_t *a)
float Function2Float(float a, float b)
uint16_t Function1Uint16(uint16_t x)
void * Function4Handle(void *a, void *b, void *c, void *d)
double Function1Double(double x)
double Function20Double(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j, double k, double l, double m, double n, double o, double p, double q, double r, double s, double t)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
static bool b
struct MyStruct s
struct MyStruct a[10]
double x
SkScalar h