MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / inner

Function inner

test/core/test_emscripten_scan_registers.cpp:23–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23__attribute__((noinline))
24void inner(int x, int y) {
25 if (x == y) inner(x + 1, y - 1); // avoid inlining in binaryen
26 DO_SCAN
27 printf("a %d, %d\n", x, y);
28 assert(seenInts.count(314159));
29 assert(seenInts.count(21828));
30 assert(seenInts.size() < 1000);
31 seenInts.clear();
32 int z;
33 if (x < y) {
34 printf("left..\n");
35 z = x + 100;
36 DO_SCAN
37 printf("..left\n");
38 } else {
39 printf("right..\n");
40 z = y + 200;
41 DO_SCAN
42 printf("..right\n");
43 }
44 printf("b %d, %d, %d\n", x, y, z);
45 assert(seenInts.count(314159));
46 assert(seenInts.count(21828));
47 assert(seenInts.count(22028));
48 assert(seenInts.size() < 1000);
49 seenInts.clear();
50}
51
52int main() {
53 int x = EM_ASM_INT({ return 314159 });

Callers 1

mainFunction · 0.70

Calls 5

printfFunction · 0.85
countMethod · 0.65
sizeMethod · 0.65
assertFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected