annotate test/arg.c @ 75:92dcf107a837 c-code-output

c code output
author kono
date Mon, 24 Feb 2003 19:50:20 +0900
parents 3d7f199e99d0
children 2b8ba655e572
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
1 #include "stdio.h"
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
2
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
3 struct arg {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
4 int a0;int a1;int a2;int a3;int a4;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
5 };
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
6
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
7 code carg1(int arg0,int arg1,int arg2,int arg3,int arg4,code(*exit1)(),void *env)
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
8 {
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
9 printf("arg1: %d %d %d %d %d : %x %x\n",arg0,arg1,arg2,arg3,arg4,exit1,env);
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
10 goto carg2(arg1,arg2,arg3,arg4,arg0,exit1,env);
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
11 }
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
12
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
13 code carg2(int arg0,int arg1,int arg2,int arg3,int arg4,code(*exit1)(),void *env)
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
14 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
15 struct arg args0;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
16 printf("arg1: %d %d %d %d %d : %x %x\n",arg0,arg1,arg2,arg3,arg4,exit1,env);
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
17 args0.a0 = arg0;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
18 args0.a1 = arg1;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
19 args0.a2 = arg2;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
20 args0.a3 = arg3;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
21 args0.a4 = arg4;
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
22 goto cargs(args0,exit1,env);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
23 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
24
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
25 code cargs(struct arg args0,code exit1(),void *env)
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
26 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
27 printf("args: %d %d %d %d %d : %x %x\n",
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
28 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
29 exit1,env);
54
kono
parents: 53
diff changeset
30 goto (*exit1)(321),env;
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
31 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
32
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
33
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
34 code carg3(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
35 {
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
36 goto carg4(args0,args1,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
37 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
38
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
39 code carg4(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
40 {
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
41 goto carg5(args1,args0,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
42 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
43
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
44 code carg5(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
45 {
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
46 goto carg6(i,j,k,l,args0);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
47 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
48
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
49 code carg6(int i, int j,int k,int l,struct arg args0)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
50 {
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
51 goto carg3(args0,args0,i,j,k,l);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
52 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
53
54
kono
parents: 53
diff changeset
54 int main1(int n)
kono
parents: 53
diff changeset
55 {
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
56 goto carg1(0,1,2,3,4,return,environment);
54
kono
parents: 53
diff changeset
57 return n;
kono
parents: 53
diff changeset
58 }
kono
parents: 53
diff changeset
59
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
60 int main( int ac, char *av[])
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
61 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
62 int n;
54
kono
parents: 53
diff changeset
63 n = main1(123);
kono
parents: 53
diff changeset
64 printf("321=%d\n",n);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
65 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
66