{"push_id":1484362076,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"996aa733cb76ebfac3b73c36f92fd0b57a21d55c","before":"990a6a8368a224b0a91878863efae98c4d562ccb","commits":[{"sha":"996aa733cb76ebfac3b73c36f92fd0b57a21d55c","author":{"name":"Steffen Mueller","email":"5286f633a2b8438ae9d362bedb5d5c56dfca07cb@cpan.org"},"message":"Build and invoke custom OPs slightly more efficiently\n\nIn a nutshell, this changes goes from executing two OPs (CONST puts\nfunction pointer on stack, XOP pops it off and executes it) to a single\nOP: We simply shove the function pointer into one of the unused struct\nmembers, op_targ.\n\nThe normal purpose of op_targ (targ, short for target, sigh) is to store\nan offset into the PADLIST for re-using SVs in the functions lexical\n(scratch)pad for passing data between OPs instead of using the stack.\nBecause all the pushing, popping, and especially repeated SV allocation\ncomes at a cost.\n\nThat's the \"t3\" in the following example OP tree:\n\n  $ perl -MO=Concise -e 'my $x = $_/2;'\n  8  <@> leave[1 ref] vKP/REFC ->(end)\n  1     <0> enter ->2\n  2     <;> nextstate(main 1 -e:1) v:{ ->3\n  7     <2> sassign vKS/2 ->8\n  5        <2> divide[t3] sK/2 ->6\n  -           <1> ex-rv2sv sK/1 ->4\n  3              <#> gvsv[*_] s ->4\n  4           <$> const[IV 2] s ->5\n  6        <0> padsv[$x:1,2] sRM*/LVINTRO ->7\n  -e syntax OK\n\nIt's kind of a cool optimization, really. :)\n\nThe one gotcha is that perl normally helpfully frees the targeted\nscratchpads, so we have to define an OP free hook that sets it to 0 to\nprevent funny free's.","distinct":true,"url":"https://api.github.com/repos/tsee/C-Blocks/commits/996aa733cb76ebfac3b73c36f92fd0b57a21d55c"}]}
{"actor":{"display_login":"tsee"}}