|
Parrot 6.3.0 "Black-cheeked Lovebird" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC Set by moderator on 15 April 2014. |
|||
|
00:07
rurban1 joined
03:16
Khisanth joined
03:50
webart joined,
webart left
04:31
Psyche^ joined
07:05
FROGGS joined
07:56
wagle joined
08:25
basiliscos joined
08:40
Liz joined,
woolfy_ joined
13:06
webart joined,
webart left
14:28
bluescreen joined
16:19
cxreg joined
16:32
FROGGS joined
16:35
woosley joined
18:11
Chirag joined
|
|||
| Chirag | rurban: Hey! I dont quite understand the role of RETURN() over return() and how it automatically adds WB .. Also how to classify a method as PCCMETHOD ? | 18:32 | |
| rurban | The compiler does check for RETURN in PCCMETHOD's currently, and the new version in all methods | 18:33 | |
| We'll use this to add the WB there | |||
| Did you get my mail today? I cannot see it anymore | |||
| Chirag | yes I got that | ||
| I read it but I didnt clearly understand the part on the use of RETURN | 18:36 | ||
| rurban | PCCMETHOD's are special methods called via nci. see eg. src/pmc/role.c | ||
| They all have already the WB added automatically | 18:38 | ||
| we miss the WB in our VTABLE methods | |||
| ok, eg. in role.pmc get_string | 18:40 | ||
| return role->name; => RETURN(STRING *name); | 18:41 | ||
| or better as in METHOD name with an intermediate ret_name | 18:42 | ||
| you can see in role.c how the compiler adds the METHOD params intro, adds the body, and expands the RETURN with a WB | 18:44 | ||
| For a VTABLE we need no intro param handling, but we still need to add the WB | |||
| And there you can also see why our METHOD calls are so slow. The compiler could expand Parrot_pcc_fill_params_from_c_args(interp, _call_object, "PiSoIp", &_self, &name, &got_name); much more efficiently | 18:46 | ||
| Same for the return preparation Parrot_pcc_set_call_from_c_args(interp, _call_object, "S", (STRING*)ret_name); | 18:47 | ||
| nci is our FFI (native calling convention) "foreign function interface" | 18:48 | ||
| call from pcc (parrot calling convention, CPS style) to c | 18:49 | ||
| FROGGS | (nci == native calling interface) | ||
| rurban | yes | ||
| Chirag | That expansion which makes it slower happens when we use RETURN ? | 18:51 | |
| rurban | no pcc_fill_params_from_c_args is too slow. but this part of the summer project, not now | 18:52 | |
| RETURNM is just handy to use, to be able get WB's getting added automatically | |||
| Parrot_pcc_set_call_from_c_args is not getting added in a RETURN with VTABLE, only for PCCMETHODs | 18:53 | ||
| Chirag | i didnt understand this last bit .. why not? | 18:56 | |
| rurban | because it would be wrong to add Parrot_pcc_set_call_from_c_args for VTABLE methods | 19:00 | |
| Chirag | rurban: I changed both ArrayIterator as well as CallContext .. but those TODO warnings still persist .. are these still false warnings? | 20:37 | |
| rurban | Chirag: yes | 22:27 | |