Changes between Version 5 and Version 6 of RewritingPMCsInNQP
- Timestamp:
- 07/02/09 06:57:05 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RewritingPMCsInNQP
v5 v6 17 17 $nextkey := key_next($INTERP, $key); 18 18 19 /* possible alternative syntax */ 20 $nextkey := cfunc:key_next($INTERP, $key); 21 22 /* Another alternative syntax. Doesn't require parsing adjustment, iiuc. Any function in "C" namespace */ 19 /* Alternative syntax requiring special-case treatement of "c" namespace */ 23 20 $nextkey := c::key_next($INTERP, $key); 24 21 }}} … … 51 48 52 49 The equivalent L1 code will need to deal with C calling conventions and efficiently looking up (and caching) the appropriate symbol. 50 51 == PMC Creation == 52 53 === nqp syntax === 54 {{{ 55 /* original C code */ 56 PMC *p = pmc_new(INTERP, enum_class_Env); 57 58 /* possible nqp function */ 59 my $p := pmc_new('Env'); /* 60 }}}