Flutter Engine
The Flutter Engine
ffi_test_functions_generated_2.cc
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// This file has been automatically generated. Please do not edit it manually.
6// Generated by tests/ffi/generator/address_of_test_generator.dart.
7
8#include <stdarg.h>
9#include <stddef.h>
10#include <stdint.h>
11#include <stdlib.h>
12#include <sys/types.h>
13
14#include <cmath>
15#include <iostream>
16#include <limits>
17
18#if defined(_WIN32)
19#define DART_EXPORT extern "C" __declspec(dllexport)
20#else
21#define DART_EXPORT \
22 extern "C" __attribute__((visibility("default"))) __attribute((used))
23#endif
24
25namespace dart {
26
27#define CHECK(X) \
28 if (!(X)) { \
29 fprintf(stderr, "%s\n", "Check failed: " #X); \
30 return 1; \
31 }
32
33#define CHECK_EQ(X, Y) CHECK((X) == (Y))
34
35// Works for positive, negative and zero.
36#define CHECK_APPROX(EXPECTED, ACTUAL) \
37 CHECK(((EXPECTED * 0.99) <= (ACTUAL) && (EXPECTED * 1.01) >= (ACTUAL)) || \
38 ((EXPECTED * 0.99) >= (ACTUAL) && (EXPECTED * 1.01) <= (ACTUAL)))
39
40DART_EXPORT int8_t TakeInt8Pointer(int8_t* data, size_t length) {
41 int8_t result = 0;
42 if (length > 100) {
43 std::cout << "Mangled arguments\n";
44 return result;
45 }
46 for (size_t i = 0; i < length; i++) {
47 std::cout << "data[" << i << "] = " << static_cast<int>(data[i]) << "\n";
48 result += data[i];
49 }
50 return result;
51}
52
53DART_EXPORT int8_t TakeInt8PointerMany(int8_t* data0,
54 int8_t* data1,
55 int8_t* data2,
56 int8_t* data3,
57 int8_t* data4,
58 int8_t* data5,
59 int8_t* data6,
60 int8_t* data7,
61 int8_t* data8,
62 int8_t* data9,
63 int8_t* data10,
64 int8_t* data11,
65 int8_t* data12,
66 int8_t* data13,
67 int8_t* data14,
68 int8_t* data15,
69 int8_t* data16,
70 int8_t* data17,
71 int8_t* data18,
72 int8_t* data19) {
73 int8_t result = 0;
74 std::cout << "data0[0] = " << static_cast<int>(data0[0]) << "\n";
75 result += data0[0];
76 std::cout << "data1[0] = " << static_cast<int>(data1[0]) << "\n";
77 result += data1[0];
78 std::cout << "data2[0] = " << static_cast<int>(data2[0]) << "\n";
79 result += data2[0];
80 std::cout << "data3[0] = " << static_cast<int>(data3[0]) << "\n";
81 result += data3[0];
82 std::cout << "data4[0] = " << static_cast<int>(data4[0]) << "\n";
83 result += data4[0];
84 std::cout << "data5[0] = " << static_cast<int>(data5[0]) << "\n";
85 result += data5[0];
86 std::cout << "data6[0] = " << static_cast<int>(data6[0]) << "\n";
87 result += data6[0];
88 std::cout << "data7[0] = " << static_cast<int>(data7[0]) << "\n";
89 result += data7[0];
90 std::cout << "data8[0] = " << static_cast<int>(data8[0]) << "\n";
91 result += data8[0];
92 std::cout << "data9[0] = " << static_cast<int>(data9[0]) << "\n";
93 result += data9[0];
94 std::cout << "data10[0] = " << static_cast<int>(data10[0]) << "\n";
95 result += data10[0];
96 std::cout << "data11[0] = " << static_cast<int>(data11[0]) << "\n";
97 result += data11[0];
98 std::cout << "data12[0] = " << static_cast<int>(data12[0]) << "\n";
99 result += data12[0];
100 std::cout << "data13[0] = " << static_cast<int>(data13[0]) << "\n";
101 result += data13[0];
102 std::cout << "data14[0] = " << static_cast<int>(data14[0]) << "\n";
103 result += data14[0];
104 std::cout << "data15[0] = " << static_cast<int>(data15[0]) << "\n";
105 result += data15[0];
106 std::cout << "data16[0] = " << static_cast<int>(data16[0]) << "\n";
107 result += data16[0];
108 std::cout << "data17[0] = " << static_cast<int>(data17[0]) << "\n";
109 result += data17[0];
110 std::cout << "data18[0] = " << static_cast<int>(data18[0]) << "\n";
111 result += data18[0];
112 std::cout << "data19[0] = " << static_cast<int>(data19[0]) << "\n";
113 result += data19[0];
114 return result;
115}
116
117DART_EXPORT int16_t TakeInt16Pointer(int16_t* data, size_t length) {
118 int16_t result = 0;
119 if (length > 100) {
120 std::cout << "Mangled arguments\n";
121 return result;
122 }
123 for (size_t i = 0; i < length; i++) {
124 std::cout << "data[" << i << "] = " << data[i] << "\n";
125 result += data[i];
126 }
127 return result;
128}
129
130DART_EXPORT int16_t TakeInt16PointerMany(int16_t* data0,
131 int16_t* data1,
132 int16_t* data2,
133 int16_t* data3,
134 int16_t* data4,
135 int16_t* data5,
136 int16_t* data6,
137 int16_t* data7,
138 int16_t* data8,
139 int16_t* data9,
140 int16_t* data10,
141 int16_t* data11,
142 int16_t* data12,
143 int16_t* data13,
144 int16_t* data14,
145 int16_t* data15,
146 int16_t* data16,
147 int16_t* data17,
148 int16_t* data18,
149 int16_t* data19) {
150 int16_t result = 0;
151 std::cout << "data0[0] = " << data0[0] << "\n";
152 result += data0[0];
153 std::cout << "data1[0] = " << data1[0] << "\n";
154 result += data1[0];
155 std::cout << "data2[0] = " << data2[0] << "\n";
156 result += data2[0];
157 std::cout << "data3[0] = " << data3[0] << "\n";
158 result += data3[0];
159 std::cout << "data4[0] = " << data4[0] << "\n";
160 result += data4[0];
161 std::cout << "data5[0] = " << data5[0] << "\n";
162 result += data5[0];
163 std::cout << "data6[0] = " << data6[0] << "\n";
164 result += data6[0];
165 std::cout << "data7[0] = " << data7[0] << "\n";
166 result += data7[0];
167 std::cout << "data8[0] = " << data8[0] << "\n";
168 result += data8[0];
169 std::cout << "data9[0] = " << data9[0] << "\n";
170 result += data9[0];
171 std::cout << "data10[0] = " << data10[0] << "\n";
172 result += data10[0];
173 std::cout << "data11[0] = " << data11[0] << "\n";
174 result += data11[0];
175 std::cout << "data12[0] = " << data12[0] << "\n";
176 result += data12[0];
177 std::cout << "data13[0] = " << data13[0] << "\n";
178 result += data13[0];
179 std::cout << "data14[0] = " << data14[0] << "\n";
180 result += data14[0];
181 std::cout << "data15[0] = " << data15[0] << "\n";
182 result += data15[0];
183 std::cout << "data16[0] = " << data16[0] << "\n";
184 result += data16[0];
185 std::cout << "data17[0] = " << data17[0] << "\n";
186 result += data17[0];
187 std::cout << "data18[0] = " << data18[0] << "\n";
188 result += data18[0];
189 std::cout << "data19[0] = " << data19[0] << "\n";
190 result += data19[0];
191 return result;
192}
193
194DART_EXPORT int32_t TakeInt32Pointer(int32_t* data, size_t length) {
195 int32_t result = 0;
196 if (length > 100) {
197 std::cout << "Mangled arguments\n";
198 return result;
199 }
200 for (size_t i = 0; i < length; i++) {
201 std::cout << "data[" << i << "] = " << data[i] << "\n";
202 result += data[i];
203 }
204 return result;
205}
206
207DART_EXPORT int32_t TakeInt32PointerMany(int32_t* data0,
208 int32_t* data1,
209 int32_t* data2,
210 int32_t* data3,
211 int32_t* data4,
212 int32_t* data5,
213 int32_t* data6,
214 int32_t* data7,
215 int32_t* data8,
216 int32_t* data9,
217 int32_t* data10,
218 int32_t* data11,
219 int32_t* data12,
220 int32_t* data13,
221 int32_t* data14,
222 int32_t* data15,
223 int32_t* data16,
224 int32_t* data17,
225 int32_t* data18,
226 int32_t* data19) {
227 int32_t result = 0;
228 std::cout << "data0[0] = " << data0[0] << "\n";
229 result += data0[0];
230 std::cout << "data1[0] = " << data1[0] << "\n";
231 result += data1[0];
232 std::cout << "data2[0] = " << data2[0] << "\n";
233 result += data2[0];
234 std::cout << "data3[0] = " << data3[0] << "\n";
235 result += data3[0];
236 std::cout << "data4[0] = " << data4[0] << "\n";
237 result += data4[0];
238 std::cout << "data5[0] = " << data5[0] << "\n";
239 result += data5[0];
240 std::cout << "data6[0] = " << data6[0] << "\n";
241 result += data6[0];
242 std::cout << "data7[0] = " << data7[0] << "\n";
243 result += data7[0];
244 std::cout << "data8[0] = " << data8[0] << "\n";
245 result += data8[0];
246 std::cout << "data9[0] = " << data9[0] << "\n";
247 result += data9[0];
248 std::cout << "data10[0] = " << data10[0] << "\n";
249 result += data10[0];
250 std::cout << "data11[0] = " << data11[0] << "\n";
251 result += data11[0];
252 std::cout << "data12[0] = " << data12[0] << "\n";
253 result += data12[0];
254 std::cout << "data13[0] = " << data13[0] << "\n";
255 result += data13[0];
256 std::cout << "data14[0] = " << data14[0] << "\n";
257 result += data14[0];
258 std::cout << "data15[0] = " << data15[0] << "\n";
259 result += data15[0];
260 std::cout << "data16[0] = " << data16[0] << "\n";
261 result += data16[0];
262 std::cout << "data17[0] = " << data17[0] << "\n";
263 result += data17[0];
264 std::cout << "data18[0] = " << data18[0] << "\n";
265 result += data18[0];
266 std::cout << "data19[0] = " << data19[0] << "\n";
267 result += data19[0];
268 return result;
269}
270
271DART_EXPORT int64_t TakeInt64Pointer(int64_t* data, size_t length) {
272 int64_t result = 0;
273 if (length > 100) {
274 std::cout << "Mangled arguments\n";
275 return result;
276 }
277 for (size_t i = 0; i < length; i++) {
278 std::cout << "data[" << i << "] = " << data[i] << "\n";
279 result += data[i];
280 }
281 return result;
282}
283
284DART_EXPORT int64_t TakeInt64PointerMany(int64_t* data0,
285 int64_t* data1,
286 int64_t* data2,
287 int64_t* data3,
288 int64_t* data4,
289 int64_t* data5,
290 int64_t* data6,
291 int64_t* data7,
292 int64_t* data8,
293 int64_t* data9,
294 int64_t* data10,
295 int64_t* data11,
296 int64_t* data12,
297 int64_t* data13,
298 int64_t* data14,
299 int64_t* data15,
300 int64_t* data16,
301 int64_t* data17,
302 int64_t* data18,
303 int64_t* data19) {
304 int64_t result = 0;
305 std::cout << "data0[0] = " << data0[0] << "\n";
306 result += data0[0];
307 std::cout << "data1[0] = " << data1[0] << "\n";
308 result += data1[0];
309 std::cout << "data2[0] = " << data2[0] << "\n";
310 result += data2[0];
311 std::cout << "data3[0] = " << data3[0] << "\n";
312 result += data3[0];
313 std::cout << "data4[0] = " << data4[0] << "\n";
314 result += data4[0];
315 std::cout << "data5[0] = " << data5[0] << "\n";
316 result += data5[0];
317 std::cout << "data6[0] = " << data6[0] << "\n";
318 result += data6[0];
319 std::cout << "data7[0] = " << data7[0] << "\n";
320 result += data7[0];
321 std::cout << "data8[0] = " << data8[0] << "\n";
322 result += data8[0];
323 std::cout << "data9[0] = " << data9[0] << "\n";
324 result += data9[0];
325 std::cout << "data10[0] = " << data10[0] << "\n";
326 result += data10[0];
327 std::cout << "data11[0] = " << data11[0] << "\n";
328 result += data11[0];
329 std::cout << "data12[0] = " << data12[0] << "\n";
330 result += data12[0];
331 std::cout << "data13[0] = " << data13[0] << "\n";
332 result += data13[0];
333 std::cout << "data14[0] = " << data14[0] << "\n";
334 result += data14[0];
335 std::cout << "data15[0] = " << data15[0] << "\n";
336 result += data15[0];
337 std::cout << "data16[0] = " << data16[0] << "\n";
338 result += data16[0];
339 std::cout << "data17[0] = " << data17[0] << "\n";
340 result += data17[0];
341 std::cout << "data18[0] = " << data18[0] << "\n";
342 result += data18[0];
343 std::cout << "data19[0] = " << data19[0] << "\n";
344 result += data19[0];
345 return result;
346}
347
348DART_EXPORT uint8_t TakeUint8Pointer(uint8_t* data, size_t length) {
349 uint8_t result = 0;
350 if (length > 100) {
351 std::cout << "Mangled arguments\n";
352 return result;
353 }
354 for (size_t i = 0; i < length; i++) {
355 std::cout << "data[" << i << "] = " << static_cast<int>(data[i]) << "\n";
356 result += data[i];
357 }
358 return result;
359}
360
361DART_EXPORT uint8_t TakeUint8PointerMany(uint8_t* data0,
362 uint8_t* data1,
363 uint8_t* data2,
364 uint8_t* data3,
365 uint8_t* data4,
366 uint8_t* data5,
367 uint8_t* data6,
368 uint8_t* data7,
369 uint8_t* data8,
370 uint8_t* data9,
371 uint8_t* data10,
372 uint8_t* data11,
373 uint8_t* data12,
374 uint8_t* data13,
375 uint8_t* data14,
376 uint8_t* data15,
377 uint8_t* data16,
378 uint8_t* data17,
379 uint8_t* data18,
380 uint8_t* data19) {
381 uint8_t result = 0;
382 std::cout << "data0[0] = " << static_cast<int>(data0[0]) << "\n";
383 result += data0[0];
384 std::cout << "data1[0] = " << static_cast<int>(data1[0]) << "\n";
385 result += data1[0];
386 std::cout << "data2[0] = " << static_cast<int>(data2[0]) << "\n";
387 result += data2[0];
388 std::cout << "data3[0] = " << static_cast<int>(data3[0]) << "\n";
389 result += data3[0];
390 std::cout << "data4[0] = " << static_cast<int>(data4[0]) << "\n";
391 result += data4[0];
392 std::cout << "data5[0] = " << static_cast<int>(data5[0]) << "\n";
393 result += data5[0];
394 std::cout << "data6[0] = " << static_cast<int>(data6[0]) << "\n";
395 result += data6[0];
396 std::cout << "data7[0] = " << static_cast<int>(data7[0]) << "\n";
397 result += data7[0];
398 std::cout << "data8[0] = " << static_cast<int>(data8[0]) << "\n";
399 result += data8[0];
400 std::cout << "data9[0] = " << static_cast<int>(data9[0]) << "\n";
401 result += data9[0];
402 std::cout << "data10[0] = " << static_cast<int>(data10[0]) << "\n";
403 result += data10[0];
404 std::cout << "data11[0] = " << static_cast<int>(data11[0]) << "\n";
405 result += data11[0];
406 std::cout << "data12[0] = " << static_cast<int>(data12[0]) << "\n";
407 result += data12[0];
408 std::cout << "data13[0] = " << static_cast<int>(data13[0]) << "\n";
409 result += data13[0];
410 std::cout << "data14[0] = " << static_cast<int>(data14[0]) << "\n";
411 result += data14[0];
412 std::cout << "data15[0] = " << static_cast<int>(data15[0]) << "\n";
413 result += data15[0];
414 std::cout << "data16[0] = " << static_cast<int>(data16[0]) << "\n";
415 result += data16[0];
416 std::cout << "data17[0] = " << static_cast<int>(data17[0]) << "\n";
417 result += data17[0];
418 std::cout << "data18[0] = " << static_cast<int>(data18[0]) << "\n";
419 result += data18[0];
420 std::cout << "data19[0] = " << static_cast<int>(data19[0]) << "\n";
421 result += data19[0];
422 return result;
423}
424
425DART_EXPORT uint16_t TakeUint16Pointer(uint16_t* data, size_t length) {
426 uint16_t result = 0;
427 if (length > 100) {
428 std::cout << "Mangled arguments\n";
429 return result;
430 }
431 for (size_t i = 0; i < length; i++) {
432 std::cout << "data[" << i << "] = " << data[i] << "\n";
433 result += data[i];
434 }
435 return result;
436}
437
438DART_EXPORT uint16_t TakeUint16PointerMany(uint16_t* data0,
439 uint16_t* data1,
440 uint16_t* data2,
441 uint16_t* data3,
442 uint16_t* data4,
443 uint16_t* data5,
444 uint16_t* data6,
445 uint16_t* data7,
446 uint16_t* data8,
447 uint16_t* data9,
448 uint16_t* data10,
449 uint16_t* data11,
450 uint16_t* data12,
451 uint16_t* data13,
452 uint16_t* data14,
453 uint16_t* data15,
454 uint16_t* data16,
455 uint16_t* data17,
456 uint16_t* data18,
457 uint16_t* data19) {
458 uint16_t result = 0;
459 std::cout << "data0[0] = " << data0[0] << "\n";
460 result += data0[0];
461 std::cout << "data1[0] = " << data1[0] << "\n";
462 result += data1[0];
463 std::cout << "data2[0] = " << data2[0] << "\n";
464 result += data2[0];
465 std::cout << "data3[0] = " << data3[0] << "\n";
466 result += data3[0];
467 std::cout << "data4[0] = " << data4[0] << "\n";
468 result += data4[0];
469 std::cout << "data5[0] = " << data5[0] << "\n";
470 result += data5[0];
471 std::cout << "data6[0] = " << data6[0] << "\n";
472 result += data6[0];
473 std::cout << "data7[0] = " << data7[0] << "\n";
474 result += data7[0];
475 std::cout << "data8[0] = " << data8[0] << "\n";
476 result += data8[0];
477 std::cout << "data9[0] = " << data9[0] << "\n";
478 result += data9[0];
479 std::cout << "data10[0] = " << data10[0] << "\n";
480 result += data10[0];
481 std::cout << "data11[0] = " << data11[0] << "\n";
482 result += data11[0];
483 std::cout << "data12[0] = " << data12[0] << "\n";
484 result += data12[0];
485 std::cout << "data13[0] = " << data13[0] << "\n";
486 result += data13[0];
487 std::cout << "data14[0] = " << data14[0] << "\n";
488 result += data14[0];
489 std::cout << "data15[0] = " << data15[0] << "\n";
490 result += data15[0];
491 std::cout << "data16[0] = " << data16[0] << "\n";
492 result += data16[0];
493 std::cout << "data17[0] = " << data17[0] << "\n";
494 result += data17[0];
495 std::cout << "data18[0] = " << data18[0] << "\n";
496 result += data18[0];
497 std::cout << "data19[0] = " << data19[0] << "\n";
498 result += data19[0];
499 return result;
500}
501
502DART_EXPORT uint32_t TakeUint32Pointer(uint32_t* data, size_t length) {
503 uint32_t result = 0;
504 if (length > 100) {
505 std::cout << "Mangled arguments\n";
506 return result;
507 }
508 for (size_t i = 0; i < length; i++) {
509 std::cout << "data[" << i << "] = " << data[i] << "\n";
510 result += data[i];
511 }
512 return result;
513}
514
515DART_EXPORT uint32_t TakeUint32PointerMany(uint32_t* data0,
516 uint32_t* data1,
517 uint32_t* data2,
518 uint32_t* data3,
519 uint32_t* data4,
520 uint32_t* data5,
521 uint32_t* data6,
522 uint32_t* data7,
523 uint32_t* data8,
524 uint32_t* data9,
525 uint32_t* data10,
526 uint32_t* data11,
527 uint32_t* data12,
528 uint32_t* data13,
529 uint32_t* data14,
530 uint32_t* data15,
531 uint32_t* data16,
532 uint32_t* data17,
533 uint32_t* data18,
534 uint32_t* data19) {
535 uint32_t result = 0;
536 std::cout << "data0[0] = " << data0[0] << "\n";
537 result += data0[0];
538 std::cout << "data1[0] = " << data1[0] << "\n";
539 result += data1[0];
540 std::cout << "data2[0] = " << data2[0] << "\n";
541 result += data2[0];
542 std::cout << "data3[0] = " << data3[0] << "\n";
543 result += data3[0];
544 std::cout << "data4[0] = " << data4[0] << "\n";
545 result += data4[0];
546 std::cout << "data5[0] = " << data5[0] << "\n";
547 result += data5[0];
548 std::cout << "data6[0] = " << data6[0] << "\n";
549 result += data6[0];
550 std::cout << "data7[0] = " << data7[0] << "\n";
551 result += data7[0];
552 std::cout << "data8[0] = " << data8[0] << "\n";
553 result += data8[0];
554 std::cout << "data9[0] = " << data9[0] << "\n";
555 result += data9[0];
556 std::cout << "data10[0] = " << data10[0] << "\n";
557 result += data10[0];
558 std::cout << "data11[0] = " << data11[0] << "\n";
559 result += data11[0];
560 std::cout << "data12[0] = " << data12[0] << "\n";
561 result += data12[0];
562 std::cout << "data13[0] = " << data13[0] << "\n";
563 result += data13[0];
564 std::cout << "data14[0] = " << data14[0] << "\n";
565 result += data14[0];
566 std::cout << "data15[0] = " << data15[0] << "\n";
567 result += data15[0];
568 std::cout << "data16[0] = " << data16[0] << "\n";
569 result += data16[0];
570 std::cout << "data17[0] = " << data17[0] << "\n";
571 result += data17[0];
572 std::cout << "data18[0] = " << data18[0] << "\n";
573 result += data18[0];
574 std::cout << "data19[0] = " << data19[0] << "\n";
575 result += data19[0];
576 return result;
577}
578
579DART_EXPORT uint64_t TakeUint64Pointer(uint64_t* data, size_t length) {
580 uint64_t result = 0;
581 if (length > 100) {
582 std::cout << "Mangled arguments\n";
583 return result;
584 }
585 for (size_t i = 0; i < length; i++) {
586 std::cout << "data[" << i << "] = " << data[i] << "\n";
587 result += data[i];
588 }
589 return result;
590}
591
592DART_EXPORT uint64_t TakeUint64PointerMany(uint64_t* data0,
593 uint64_t* data1,
594 uint64_t* data2,
595 uint64_t* data3,
596 uint64_t* data4,
597 uint64_t* data5,
598 uint64_t* data6,
599 uint64_t* data7,
600 uint64_t* data8,
601 uint64_t* data9,
602 uint64_t* data10,
603 uint64_t* data11,
604 uint64_t* data12,
605 uint64_t* data13,
606 uint64_t* data14,
607 uint64_t* data15,
608 uint64_t* data16,
609 uint64_t* data17,
610 uint64_t* data18,
611 uint64_t* data19) {
612 uint64_t result = 0;
613 std::cout << "data0[0] = " << data0[0] << "\n";
614 result += data0[0];
615 std::cout << "data1[0] = " << data1[0] << "\n";
616 result += data1[0];
617 std::cout << "data2[0] = " << data2[0] << "\n";
618 result += data2[0];
619 std::cout << "data3[0] = " << data3[0] << "\n";
620 result += data3[0];
621 std::cout << "data4[0] = " << data4[0] << "\n";
622 result += data4[0];
623 std::cout << "data5[0] = " << data5[0] << "\n";
624 result += data5[0];
625 std::cout << "data6[0] = " << data6[0] << "\n";
626 result += data6[0];
627 std::cout << "data7[0] = " << data7[0] << "\n";
628 result += data7[0];
629 std::cout << "data8[0] = " << data8[0] << "\n";
630 result += data8[0];
631 std::cout << "data9[0] = " << data9[0] << "\n";
632 result += data9[0];
633 std::cout << "data10[0] = " << data10[0] << "\n";
634 result += data10[0];
635 std::cout << "data11[0] = " << data11[0] << "\n";
636 result += data11[0];
637 std::cout << "data12[0] = " << data12[0] << "\n";
638 result += data12[0];
639 std::cout << "data13[0] = " << data13[0] << "\n";
640 result += data13[0];
641 std::cout << "data14[0] = " << data14[0] << "\n";
642 result += data14[0];
643 std::cout << "data15[0] = " << data15[0] << "\n";
644 result += data15[0];
645 std::cout << "data16[0] = " << data16[0] << "\n";
646 result += data16[0];
647 std::cout << "data17[0] = " << data17[0] << "\n";
648 result += data17[0];
649 std::cout << "data18[0] = " << data18[0] << "\n";
650 result += data18[0];
651 std::cout << "data19[0] = " << data19[0] << "\n";
652 result += data19[0];
653 return result;
654}
655
657 float result = 0.0;
658 if (length > 100) {
659 std::cout << "Mangled arguments\n";
660 return result;
661 }
662 for (size_t i = 0; i < length; i++) {
663 std::cout << "data[" << i << "] = " << data[i] << "\n";
664 result += data[i];
665 }
666 return result;
667}
668
670 float* data1,
671 float* data2,
672 float* data3,
673 float* data4,
674 float* data5,
675 float* data6,
676 float* data7,
677 float* data8,
678 float* data9,
679 float* data10,
680 float* data11,
681 float* data12,
682 float* data13,
683 float* data14,
684 float* data15,
685 float* data16,
686 float* data17,
687 float* data18,
688 float* data19) {
689 float result = 0.0;
690 std::cout << "data0[0] = " << data0[0] << "\n";
691 result += data0[0];
692 std::cout << "data1[0] = " << data1[0] << "\n";
693 result += data1[0];
694 std::cout << "data2[0] = " << data2[0] << "\n";
695 result += data2[0];
696 std::cout << "data3[0] = " << data3[0] << "\n";
697 result += data3[0];
698 std::cout << "data4[0] = " << data4[0] << "\n";
699 result += data4[0];
700 std::cout << "data5[0] = " << data5[0] << "\n";
701 result += data5[0];
702 std::cout << "data6[0] = " << data6[0] << "\n";
703 result += data6[0];
704 std::cout << "data7[0] = " << data7[0] << "\n";
705 result += data7[0];
706 std::cout << "data8[0] = " << data8[0] << "\n";
707 result += data8[0];
708 std::cout << "data9[0] = " << data9[0] << "\n";
709 result += data9[0];
710 std::cout << "data10[0] = " << data10[0] << "\n";
711 result += data10[0];
712 std::cout << "data11[0] = " << data11[0] << "\n";
713 result += data11[0];
714 std::cout << "data12[0] = " << data12[0] << "\n";
715 result += data12[0];
716 std::cout << "data13[0] = " << data13[0] << "\n";
717 result += data13[0];
718 std::cout << "data14[0] = " << data14[0] << "\n";
719 result += data14[0];
720 std::cout << "data15[0] = " << data15[0] << "\n";
721 result += data15[0];
722 std::cout << "data16[0] = " << data16[0] << "\n";
723 result += data16[0];
724 std::cout << "data17[0] = " << data17[0] << "\n";
725 result += data17[0];
726 std::cout << "data18[0] = " << data18[0] << "\n";
727 result += data18[0];
728 std::cout << "data19[0] = " << data19[0] << "\n";
729 result += data19[0];
730 return result;
731}
732
733DART_EXPORT double TakeDoublePointer(double* data, size_t length) {
734 double result = 0.0;
735 if (length > 100) {
736 std::cout << "Mangled arguments\n";
737 return result;
738 }
739 for (size_t i = 0; i < length; i++) {
740 std::cout << "data[" << i << "] = " << data[i] << "\n";
741 result += data[i];
742 }
743 return result;
744}
745
747 double* data1,
748 double* data2,
749 double* data3,
750 double* data4,
751 double* data5,
752 double* data6,
753 double* data7,
754 double* data8,
755 double* data9,
756 double* data10,
757 double* data11,
758 double* data12,
759 double* data13,
760 double* data14,
761 double* data15,
762 double* data16,
763 double* data17,
764 double* data18,
765 double* data19) {
766 double result = 0.0;
767 std::cout << "data0[0] = " << data0[0] << "\n";
768 result += data0[0];
769 std::cout << "data1[0] = " << data1[0] << "\n";
770 result += data1[0];
771 std::cout << "data2[0] = " << data2[0] << "\n";
772 result += data2[0];
773 std::cout << "data3[0] = " << data3[0] << "\n";
774 result += data3[0];
775 std::cout << "data4[0] = " << data4[0] << "\n";
776 result += data4[0];
777 std::cout << "data5[0] = " << data5[0] << "\n";
778 result += data5[0];
779 std::cout << "data6[0] = " << data6[0] << "\n";
780 result += data6[0];
781 std::cout << "data7[0] = " << data7[0] << "\n";
782 result += data7[0];
783 std::cout << "data8[0] = " << data8[0] << "\n";
784 result += data8[0];
785 std::cout << "data9[0] = " << data9[0] << "\n";
786 result += data9[0];
787 std::cout << "data10[0] = " << data10[0] << "\n";
788 result += data10[0];
789 std::cout << "data11[0] = " << data11[0] << "\n";
790 result += data11[0];
791 std::cout << "data12[0] = " << data12[0] << "\n";
792 result += data12[0];
793 std::cout << "data13[0] = " << data13[0] << "\n";
794 result += data13[0];
795 std::cout << "data14[0] = " << data14[0] << "\n";
796 result += data14[0];
797 std::cout << "data15[0] = " << data15[0] << "\n";
798 result += data15[0];
799 std::cout << "data16[0] = " << data16[0] << "\n";
800 result += data16[0];
801 std::cout << "data17[0] = " << data17[0] << "\n";
802 result += data17[0];
803 std::cout << "data18[0] = " << data18[0] << "\n";
804 result += data18[0];
805 std::cout << "data19[0] = " << data19[0] << "\n";
806 result += data19[0];
807 return result;
808}
809
811 bool result = false;
812 if (length > 100) {
813 std::cout << "Mangled arguments\n";
814 return result;
815 }
816 for (size_t i = 0; i < length; i++) {
817 std::cout << "data[" << i << "] = " << static_cast<int>(data[i]) << "\n";
818 result ^= static_cast<int>(data[i]);
819 }
820 return result;
821}
822
824 bool* data1,
825 bool* data2,
826 bool* data3,
827 bool* data4,
828 bool* data5,
829 bool* data6,
830 bool* data7,
831 bool* data8,
832 bool* data9,
833 bool* data10,
834 bool* data11,
835 bool* data12,
836 bool* data13,
837 bool* data14,
838 bool* data15,
839 bool* data16,
840 bool* data17,
841 bool* data18,
842 bool* data19) {
843 bool result = false;
844 std::cout << "data0[0] = " << static_cast<int>(data0[0]) << "\n";
845 result ^= static_cast<int>(data0[0]);
846 std::cout << "data1[0] = " << static_cast<int>(data1[0]) << "\n";
847 result ^= static_cast<int>(data1[0]);
848 std::cout << "data2[0] = " << static_cast<int>(data2[0]) << "\n";
849 result ^= static_cast<int>(data2[0]);
850 std::cout << "data3[0] = " << static_cast<int>(data3[0]) << "\n";
851 result ^= static_cast<int>(data3[0]);
852 std::cout << "data4[0] = " << static_cast<int>(data4[0]) << "\n";
853 result ^= static_cast<int>(data4[0]);
854 std::cout << "data5[0] = " << static_cast<int>(data5[0]) << "\n";
855 result ^= static_cast<int>(data5[0]);
856 std::cout << "data6[0] = " << static_cast<int>(data6[0]) << "\n";
857 result ^= static_cast<int>(data6[0]);
858 std::cout << "data7[0] = " << static_cast<int>(data7[0]) << "\n";
859 result ^= static_cast<int>(data7[0]);
860 std::cout << "data8[0] = " << static_cast<int>(data8[0]) << "\n";
861 result ^= static_cast<int>(data8[0]);
862 std::cout << "data9[0] = " << static_cast<int>(data9[0]) << "\n";
863 result ^= static_cast<int>(data9[0]);
864 std::cout << "data10[0] = " << static_cast<int>(data10[0]) << "\n";
865 result ^= static_cast<int>(data10[0]);
866 std::cout << "data11[0] = " << static_cast<int>(data11[0]) << "\n";
867 result ^= static_cast<int>(data11[0]);
868 std::cout << "data12[0] = " << static_cast<int>(data12[0]) << "\n";
869 result ^= static_cast<int>(data12[0]);
870 std::cout << "data13[0] = " << static_cast<int>(data13[0]) << "\n";
871 result ^= static_cast<int>(data13[0]);
872 std::cout << "data14[0] = " << static_cast<int>(data14[0]) << "\n";
873 result ^= static_cast<int>(data14[0]);
874 std::cout << "data15[0] = " << static_cast<int>(data15[0]) << "\n";
875 result ^= static_cast<int>(data15[0]);
876 std::cout << "data16[0] = " << static_cast<int>(data16[0]) << "\n";
877 result ^= static_cast<int>(data16[0]);
878 std::cout << "data17[0] = " << static_cast<int>(data17[0]) << "\n";
879 result ^= static_cast<int>(data17[0]);
880 std::cout << "data18[0] = " << static_cast<int>(data18[0]) << "\n";
881 result ^= static_cast<int>(data18[0]);
882 std::cout << "data19[0] = " << static_cast<int>(data19[0]) << "\n";
883 result ^= static_cast<int>(data19[0]);
884 return result;
885}
886
888 int16_t a0;
889};
890
892 Struct2BytesInt* data1,
893 Struct2BytesInt* data2,
894 Struct2BytesInt* data3,
895 Struct2BytesInt* data4,
896 Struct2BytesInt* data5,
897 Struct2BytesInt* data6,
898 Struct2BytesInt* data7,
899 Struct2BytesInt* data8,
900 Struct2BytesInt* data9,
901 Struct2BytesInt* data10,
902 Struct2BytesInt* data11,
903 Struct2BytesInt* data12,
904 Struct2BytesInt* data13,
905 Struct2BytesInt* data14,
906 Struct2BytesInt* data15,
907 Struct2BytesInt* data16,
908 Struct2BytesInt* data17,
909 Struct2BytesInt* data18,
910 Struct2BytesInt* data19) {
911 int16_t result = 0;
912 std::cout << "data0->a0 = " << data0->a0 << "\n";
913 result += data0->a0;
914 std::cout << "data1->a0 = " << data1->a0 << "\n";
915 result += data1->a0;
916 std::cout << "data2->a0 = " << data2->a0 << "\n";
917 result += data2->a0;
918 std::cout << "data3->a0 = " << data3->a0 << "\n";
919 result += data3->a0;
920 std::cout << "data4->a0 = " << data4->a0 << "\n";
921 result += data4->a0;
922 std::cout << "data5->a0 = " << data5->a0 << "\n";
923 result += data5->a0;
924 std::cout << "data6->a0 = " << data6->a0 << "\n";
925 result += data6->a0;
926 std::cout << "data7->a0 = " << data7->a0 << "\n";
927 result += data7->a0;
928 std::cout << "data8->a0 = " << data8->a0 << "\n";
929 result += data8->a0;
930 std::cout << "data9->a0 = " << data9->a0 << "\n";
931 result += data9->a0;
932 std::cout << "data10->a0 = " << data10->a0 << "\n";
933 result += data10->a0;
934 std::cout << "data11->a0 = " << data11->a0 << "\n";
935 result += data11->a0;
936 std::cout << "data12->a0 = " << data12->a0 << "\n";
937 result += data12->a0;
938 std::cout << "data13->a0 = " << data13->a0 << "\n";
939 result += data13->a0;
940 std::cout << "data14->a0 = " << data14->a0 << "\n";
941 result += data14->a0;
942 std::cout << "data15->a0 = " << data15->a0 << "\n";
943 result += data15->a0;
944 std::cout << "data16->a0 = " << data16->a0 << "\n";
945 result += data16->a0;
946 std::cout << "data17->a0 = " << data17->a0 << "\n";
947 result += data17->a0;
948 std::cout << "data18->a0 = " << data18->a0 << "\n";
949 result += data18->a0;
950 std::cout << "data19->a0 = " << data19->a0 << "\n";
951 result += data19->a0;
952 return result;
953}
954
956 int16_t a0;
957};
958
960 Union2BytesInt* data1,
961 Union2BytesInt* data2,
962 Union2BytesInt* data3,
963 Union2BytesInt* data4,
964 Union2BytesInt* data5,
965 Union2BytesInt* data6,
966 Union2BytesInt* data7,
967 Union2BytesInt* data8,
968 Union2BytesInt* data9,
969 Union2BytesInt* data10,
970 Union2BytesInt* data11,
971 Union2BytesInt* data12,
972 Union2BytesInt* data13,
973 Union2BytesInt* data14,
974 Union2BytesInt* data15,
975 Union2BytesInt* data16,
976 Union2BytesInt* data17,
977 Union2BytesInt* data18,
978 Union2BytesInt* data19) {
979 int16_t result = 0;
980 std::cout << "data0->a0 = " << data0->a0 << "\n";
981 result += data0->a0;
982 std::cout << "data1->a0 = " << data1->a0 << "\n";
983 result += data1->a0;
984 std::cout << "data2->a0 = " << data2->a0 << "\n";
985 result += data2->a0;
986 std::cout << "data3->a0 = " << data3->a0 << "\n";
987 result += data3->a0;
988 std::cout << "data4->a0 = " << data4->a0 << "\n";
989 result += data4->a0;
990 std::cout << "data5->a0 = " << data5->a0 << "\n";
991 result += data5->a0;
992 std::cout << "data6->a0 = " << data6->a0 << "\n";
993 result += data6->a0;
994 std::cout << "data7->a0 = " << data7->a0 << "\n";
995 result += data7->a0;
996 std::cout << "data8->a0 = " << data8->a0 << "\n";
997 result += data8->a0;
998 std::cout << "data9->a0 = " << data9->a0 << "\n";
999 result += data9->a0;
1000 std::cout << "data10->a0 = " << data10->a0 << "\n";
1001 result += data10->a0;
1002 std::cout << "data11->a0 = " << data11->a0 << "\n";
1003 result += data11->a0;
1004 std::cout << "data12->a0 = " << data12->a0 << "\n";
1005 result += data12->a0;
1006 std::cout << "data13->a0 = " << data13->a0 << "\n";
1007 result += data13->a0;
1008 std::cout << "data14->a0 = " << data14->a0 << "\n";
1009 result += data14->a0;
1010 std::cout << "data15->a0 = " << data15->a0 << "\n";
1011 result += data15->a0;
1012 std::cout << "data16->a0 = " << data16->a0 << "\n";
1013 result += data16->a0;
1014 std::cout << "data17->a0 = " << data17->a0 << "\n";
1015 result += data17->a0;
1016 std::cout << "data18->a0 = " << data18->a0 << "\n";
1017 result += data18->a0;
1018 std::cout << "data19->a0 = " << data19->a0 << "\n";
1019 result += data19->a0;
1020 return result;
1021}
1022
1023} // namespace dart
GAsyncResult * result
size_t length
Definition: dart_vm.cc:33
DART_EXPORT float TakeFloatPointerMany(float *data0, float *data1, float *data2, float *data3, float *data4, float *data5, float *data6, float *data7, float *data8, float *data9, float *data10, float *data11, float *data12, float *data13, float *data14, float *data15, float *data16, float *data17, float *data18, float *data19)
DART_EXPORT uint32_t TakeUint32PointerMany(uint32_t *data0, uint32_t *data1, uint32_t *data2, uint32_t *data3, uint32_t *data4, uint32_t *data5, uint32_t *data6, uint32_t *data7, uint32_t *data8, uint32_t *data9, uint32_t *data10, uint32_t *data11, uint32_t *data12, uint32_t *data13, uint32_t *data14, uint32_t *data15, uint32_t *data16, uint32_t *data17, uint32_t *data18, uint32_t *data19)
DART_EXPORT int8_t TakeInt8Pointer(int8_t *data, size_t length)
DART_EXPORT bool TakeBoolPointer(bool *data, size_t length)
DART_EXPORT uint32_t TakeUint32Pointer(uint32_t *data, size_t length)
DART_EXPORT uint64_t TakeUint64PointerMany(uint64_t *data0, uint64_t *data1, uint64_t *data2, uint64_t *data3, uint64_t *data4, uint64_t *data5, uint64_t *data6, uint64_t *data7, uint64_t *data8, uint64_t *data9, uint64_t *data10, uint64_t *data11, uint64_t *data12, uint64_t *data13, uint64_t *data14, uint64_t *data15, uint64_t *data16, uint64_t *data17, uint64_t *data18, uint64_t *data19)
DART_EXPORT uint8_t TakeUint8PointerMany(uint8_t *data0, uint8_t *data1, uint8_t *data2, uint8_t *data3, uint8_t *data4, uint8_t *data5, uint8_t *data6, uint8_t *data7, uint8_t *data8, uint8_t *data9, uint8_t *data10, uint8_t *data11, uint8_t *data12, uint8_t *data13, uint8_t *data14, uint8_t *data15, uint8_t *data16, uint8_t *data17, uint8_t *data18, uint8_t *data19)
DART_EXPORT uint16_t TakeUint16PointerMany(uint16_t *data0, uint16_t *data1, uint16_t *data2, uint16_t *data3, uint16_t *data4, uint16_t *data5, uint16_t *data6, uint16_t *data7, uint16_t *data8, uint16_t *data9, uint16_t *data10, uint16_t *data11, uint16_t *data12, uint16_t *data13, uint16_t *data14, uint16_t *data15, uint16_t *data16, uint16_t *data17, uint16_t *data18, uint16_t *data19)
DART_EXPORT int64_t TakeInt64PointerMany(int64_t *data0, int64_t *data1, int64_t *data2, int64_t *data3, int64_t *data4, int64_t *data5, int64_t *data6, int64_t *data7, int64_t *data8, int64_t *data9, int64_t *data10, int64_t *data11, int64_t *data12, int64_t *data13, int64_t *data14, int64_t *data15, int64_t *data16, int64_t *data17, int64_t *data18, int64_t *data19)
DART_EXPORT int16_t TakeUnion2BytesIntPointerMany(Union2BytesInt *data0, Union2BytesInt *data1, Union2BytesInt *data2, Union2BytesInt *data3, Union2BytesInt *data4, Union2BytesInt *data5, Union2BytesInt *data6, Union2BytesInt *data7, Union2BytesInt *data8, Union2BytesInt *data9, Union2BytesInt *data10, Union2BytesInt *data11, Union2BytesInt *data12, Union2BytesInt *data13, Union2BytesInt *data14, Union2BytesInt *data15, Union2BytesInt *data16, Union2BytesInt *data17, Union2BytesInt *data18, Union2BytesInt *data19)
DART_EXPORT double TakeDoublePointer(double *data, size_t length)
DART_EXPORT float TakeFloatPointer(float *data, size_t length)
DART_EXPORT int16_t TakeInt16PointerMany(int16_t *data0, int16_t *data1, int16_t *data2, int16_t *data3, int16_t *data4, int16_t *data5, int16_t *data6, int16_t *data7, int16_t *data8, int16_t *data9, int16_t *data10, int16_t *data11, int16_t *data12, int16_t *data13, int16_t *data14, int16_t *data15, int16_t *data16, int16_t *data17, int16_t *data18, int16_t *data19)
DART_EXPORT int64_t TakeInt64Pointer(int64_t *data, size_t length)
DART_EXPORT bool TakeBoolPointerMany(bool *data0, bool *data1, bool *data2, bool *data3, bool *data4, bool *data5, bool *data6, bool *data7, bool *data8, bool *data9, bool *data10, bool *data11, bool *data12, bool *data13, bool *data14, bool *data15, bool *data16, bool *data17, bool *data18, bool *data19)
DART_EXPORT uint64_t TakeUint64Pointer(uint64_t *data, size_t length)
DART_EXPORT double TakeDoublePointerMany(double *data0, double *data1, double *data2, double *data3, double *data4, double *data5, double *data6, double *data7, double *data8, double *data9, double *data10, double *data11, double *data12, double *data13, double *data14, double *data15, double *data16, double *data17, double *data18, double *data19)
DART_EXPORT int32_t TakeInt32PointerMany(int32_t *data0, int32_t *data1, int32_t *data2, int32_t *data3, int32_t *data4, int32_t *data5, int32_t *data6, int32_t *data7, int32_t *data8, int32_t *data9, int32_t *data10, int32_t *data11, int32_t *data12, int32_t *data13, int32_t *data14, int32_t *data15, int32_t *data16, int32_t *data17, int32_t *data18, int32_t *data19)
DART_EXPORT uint8_t TakeUint8Pointer(uint8_t *data, size_t length)
DART_EXPORT int16_t TakeStruct2BytesIntPointerMany(Struct2BytesInt *data0, Struct2BytesInt *data1, Struct2BytesInt *data2, Struct2BytesInt *data3, Struct2BytesInt *data4, Struct2BytesInt *data5, Struct2BytesInt *data6, Struct2BytesInt *data7, Struct2BytesInt *data8, Struct2BytesInt *data9, Struct2BytesInt *data10, Struct2BytesInt *data11, Struct2BytesInt *data12, Struct2BytesInt *data13, Struct2BytesInt *data14, Struct2BytesInt *data15, Struct2BytesInt *data16, Struct2BytesInt *data17, Struct2BytesInt *data18, Struct2BytesInt *data19)
static int8_t data[kExtLength]
DART_EXPORT int8_t TakeInt8PointerMany(int8_t *data0, int8_t *data1, int8_t *data2, int8_t *data3, int8_t *data4, int8_t *data5, int8_t *data6, int8_t *data7, int8_t *data8, int8_t *data9, int8_t *data10, int8_t *data11, int8_t *data12, int8_t *data13, int8_t *data14, int8_t *data15, int8_t *data16, int8_t *data17, int8_t *data18, int8_t *data19)
DART_EXPORT int16_t TakeInt16Pointer(int16_t *data, size_t length)
DART_EXPORT uint16_t TakeUint16Pointer(uint16_t *data, size_t length)
DART_EXPORT int32_t TakeInt32Pointer(int32_t *data, size_t length)