1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
+kajika+anatofuz$ perl tools/trans_impl.pl examples/pop_and_push/StackTest2Impl.h
#include "../../../context.h"
#interface "StackTest2.h"
// ----
// typedef struct StackTest2Impl <> impl StackTest2 {
// __code next(...);
// } StackTest2Impl;
// ----
\ {
codeName {
gotoOtherInterface {
argc 4,
args "Impl* stackTest2, struct Stack* stack, union Data* data1, struct StackTest* stackTest, __code next(...)",
name "gotoOtherInterface"
},
insertTest1 {
argc 3,
args "Impl* stackTest2, struct Stack* stack, union Data* data1, __code next(...)",
name "insertTest1"
}
},
codes [
[0] var{codeName}{insertTest1},
[1] var{codeName}{gotoOtherInterface}
],
content [
[0] "enum Code insertTest1;",
[1] "union Data* stackTest2;",
[2] "struct Stack* stack;",
[3] "union Data* data1;",
[4] "enum Code gotoOtherInterface;",
[5] "struct StackTest* stackTest;",
[6] "enum Code next;",
[7] ""
],
data [
[0] "union Data* stackTest2;",
[1] "struct Stack* stack;",
[2] "union Data* data1;",
[3] "struct StackTest* stackTest;",
[4] ""
],
file_name "/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/tools/../examples/pop_and_push/StackTest2.h",
hasOutputArgs {},
inner_code_gears {
next 1
},
name "StackTest2"
}
\ {
codeName {
next {
argc 1,
args "...",
name "next"
}
},
codes [
[0] var{codeName}{next}
],
content [
[0] "enum Code next;"
],
data [],
file_name "/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/StackTest2Impl.h",
hasOutputArgs {},
inner_code_gears {},
isa "StackTest2",
name "StackTest2Impl"
}
StackTest2* createStackTest2Impl(struct Context* context) {
struct StackTest2* stackTest2 = new StackTest2();
struct StackTest2Impl* stack_test2impl = new StackTest2Impl();
stackTest2->stackTest2 = (union Data*)stack_test2impl;
stackTest2->stack = NULL;
stackTest2->data1 = NULL;
stackTest2->stackTest = NULL;
stackTest2->insertTest1 = C_insertTest1StackTest2Impl;
stackTest2->gotoOtherInterface = C_gotoOtherInterfaceStackTest2Impl;
return stackTest2;
}
__code insertTest1_StackTest2Impl(struct StackTest2Impl* stackTest2, struct Stack* stack, union Data* data1, __code next(...)) {
goto next(...);
}
__code gotoOtherInterface_StackTest2Impl(struct StackTest2Impl* stackTest2, struct Stack* stack, union Data* data1, struct StackTest* stackTest, __code next(...)) {
goto next(...);
}
|