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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
#include "../../../context.h"
#include <stdio.h>
#include "/Users/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/String.h"
StackTest* createStackTestImpl3(struct Context* context) {
struct StackTest* stackTest = &ALLOCATE(context, StackTest)->StackTest;
struct StackTestImpl3* StackTestImpl3 = &ALLOCATE(context, StackTestImpl3)->StackTestImpl3;
stackTest->stackTest = (union Data*)StackTestImpl3;
stackTest->stack = NULL;
stackTest->data = NULL;
stackTest->data1 = NULL;
stackTest->insertTest1 = C_insertTest1StackTestImpl3;
stackTest->insertTest2 = C_insertTest2StackTestImpl3;
stackTest->insertTest3 = C_insertTest3StackTestImpl3;
stackTest->insertTest4 = C_insertTest4StackTestImpl3;
stackTest->pop2Test = C_pop2TestStackTestImpl3;
stackTest->pop2Test1 = C_pop2Test1StackTestImpl3;
return stackTest;
}
__code insertTest1StackTestImpl3(struct Context *context,struct StackTestImpl3* stackTest, struct Stack* stack, enum Code next) {
String* str = NEW(String);
str->size = 99;
Gearef(context, Stack)->stack = (union Data*) stack;
Gearef(context, Stack)->data = (union Data*)str;
Gearef(context, Stack)->next = C_insertTest2StackTestImpl3;
goto meta(context, stack->push);
}
__code insertTest1StackTestImpl3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto insertTest1StackTestImpl3(context, stackTest, stack, next);
}
__code insertTest2StackTestImpl3(struct Context *context,struct StackTestImpl3* stackTest, struct Stack* stack, enum Code next) {
String* str = NEW(String);
str->size = 100;
Gearef(context, Stack)->stack = (union Data*) stack;
Gearef(context, Stack)->data = (union Data*)str;
Gearef(context, Stack)->next = C_pop2TestStackTestImpl3;
goto meta(context, stack->push);
}
__code insertTest2StackTestImpl3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto insertTest2StackTestImpl3(context, stackTest, stack, next);
}
__code pop2TestStackTestImpl3(struct Context *context,struct StackTestImpl3* stackTest, struct Stack* stack, enum Code next) {
Gearef(context, Stack)->stack = (union Data*) stack;
Gearef(context, Stack)->next = C_pop2Test1StackTestImpl3_1;
goto meta(context, stack->pop2);
}
__code pop2TestStackTestImpl3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto pop2TestStackTestImpl3(context, stackTest, stack, next);
}
__code pop2Test3(struct Context *context,struct StackTestImpl3* stackTest, struct Stack* stack, enum Code next,union Data **O_data,union Data **O_data1) {
Data* data __attribute__((unused)) = *O_data;
Data* data1 __attribute__((unused)) = *O_data1;
String* str = NEW(String);
str->size = 200;
String* str1 = NEW(String);
str1->size = 300;
data = (union Data*)str;
data1 = (union Data*)str1;
goto meta(context, C_pop2Test1StackTestImpl3);
}
__code pop2Test3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
Data** O_data = &Gearef(context, StackTest)->data;
Data** O_data1 = &Gearef(context, StackTest)->data1;
goto pop2Test3(context, stackTest, stack, next, O_data, O_data1);
}
__code pop2Test1StackTestImpl3(struct Context *context,struct StackTestImpl3* stackTest, union Data* data, union Data* data1, struct Stack* stack, enum Code next) {
String* str = (String*)data;
String* str2 = (String*)data1;
printf("%d\n", str->size);
printf("%d\n", str2->size);
goto meta(context, next);
}
__code pop2Test1StackTestImpl3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Data* data = Gearef(context, StackTest)->data;
Data* data1 = Gearef(context, StackTest)->data1;
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto pop2Test1StackTestImpl3(context, stackTest, data, data1, stack, next);
}
__code insertTest3StackTestImpl3(struct Context *context,struct StackTestImpl3* stackTest, struct Stack* stack, enum Code next) {
StackTest2* stackTest2 = createStackTest2Impl(context);
String* str = NEW(String);
str->size = 100;
Gearef(context, StackTest2)->stackTest2 = (union Data*) stackTest2;
Gearef(context, StackTest2)->stack = stack;
Gearef(context, StackTest2)->data1 = (union Data*) (union Data*)str;
Gearef(context, StackTest2)->next = C_pop2TestStackTestImpl3;
goto meta(context, stackTest2->insertTest1);
}
__code insertTest3StackTestImpl3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto insertTest3StackTestImpl3(context, stackTest, stack, next);
}
__code insertTest4StackTestImpl3(struct Context *context,struct StackTestImpl3* stackTest, struct Stack* stack, enum Code next) {
StackTest2* stackTest2 = createStackTest2Impl(context);
String* str = NEW(String);
str->size = 100;
Gearef(context, StackTest2)->stackTest2 = (union Data*) stackTest2;
Gearef(context, StackTest2)->stack = stack;
Gearef(context, StackTest2)->data1 = (union Data*) (union Data*)str;
Gearef(context, StackTest2)->next = C_pop2TestStackTestImpl3;
goto meta(context, stackTest2->insertTest1);
}
__code insertTest4StackTestImpl3_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto insertTest4StackTestImpl3(context, stackTest, stack, next);
}
__code pop2Test1StackTestImpl3_1_stub(struct Context* context) {
StackTestImpl3* stackTest = (StackTestImpl3*)GearImpl(context, StackTest, stackTest);
Data* data = Gearef(context, Stack)->data;
Data* data1 = Gearef(context, Stack)->data1;
Stack* stack = Gearef(context, StackTest)->stack;
enum Code next = Gearef(context, StackTest)->next;
goto pop2Test1StackTestImpl3(context, stackTest, data, data1, stack, next);
}
|