Mercurial > hg > Gears > Gears
comparison src/parallel_execution/examples/DebughelloWorld/HelloImpl.cbc @ 1016:3e8d89f271e2 debugger
debugger branch
author | Takato Matsuoka <t.matsuoka@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 19 Jan 2022 17:51:07 +0900 |
parents | e6778c866876 |
children | a747a99ae1f2 |
comparison
equal
deleted
inserted
replaced
1015:e6778c866876 | 1016:3e8d89f271e2 |
---|---|
13 // char* wString; | 13 // char* wString; |
14 // } HelloImpl; | 14 // } HelloImpl; |
15 // ---- | 15 // ---- |
16 | 16 |
17 Hello* createHelloImpl(struct Context* context) { | 17 Hello* createHelloImpl(struct Context* context) { |
18 printf("[Debug log] createHelloImpl in HelloImpl\n"); | |
19 struct Hello* hello = new Hello(); | 18 struct Hello* hello = new Hello(); |
20 struct HelloImpl* hello_impl = new HelloImpl(); | 19 struct HelloImpl* hello_impl = new HelloImpl(); |
21 hello->hello = (union Data*)hello_impl; | 20 hello->hello = (union Data*)hello_impl; |
22 hello->string = NULL; | 21 hello->string = NULL; |
23 hello_impl->hString = NULL; | 22 hello_impl->hString = NULL; |
25 hello->h = C_hHelloImpl; | 24 hello->h = C_hHelloImpl; |
26 hello->w = C_wHelloImpl; | 25 hello->w = C_wHelloImpl; |
27 return hello; | 26 return hello; |
28 } | 27 } |
29 __code h(struct HelloImpl* hello, __code next(...)) { | 28 __code h(struct HelloImpl* hello, __code next(...)) { |
30 printf("[Debug log] h in HelloImpl\n"); | |
31 hello->hString = "Hello, "; //createImpl部分では_implなのだが動く | 29 hello->hString = "Hello, "; //createImpl部分では_implなのだが動く |
32 printf("%s", hello->hString); | 30 printf("%s", hello->hString); |
33 goto w(hello, next); | 31 goto w(hello, next); |
34 } | 32 } |
35 | 33 |
36 __code w(struct HelloImpl* hello, __code next(...)) { | 34 __code w(struct HelloImpl* hello, __code next(...)) { |
37 printf("[Debug log] w in HelloImpl\n"); | |
38 hello->wString = "World.\n"; | 35 hello->wString = "World.\n"; |
39 printf("%s", hello->wString); | 36 printf("%s", hello->wString); |
40 goto next(...); | 37 goto next(...); |
41 } | 38 } |
42 | 39 |