# New Ticket Created by Kenneth Graves # Please include the string: [perl #23299] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23299 >
.sub __main $S0 = "PerlInt" find_type $I0, $S0 new $P0, $I0 $P0 = 42 print $P0 print "\n" .end Fails with: error:imcc:iANY file stdlib/test.imc line 4: op not found 'new' (new<0>) Changing $I0->I0 and $P0->P0 allows it to work, but loses the advantages of PIR. (I'd like to have $P0 = new $S0 do what I want. Failing that, I'd at least like the find_type workaround.) The following tiny patch "fixes" my problem, but I'm worried it creates problems for something else. Doesn't break any tests, though. --kag --- imcc.y.~1.80.~ 2003-08-09 19:00:11.000000000 -0400 +++ imcc.y 2003-08-12 22:07:25.000000000 -0400 @@ -730,7 +730,7 @@ R2($1, mk_address($4,U_add_once))); } | target '=' GLOBAL string { $$ = MK_I(interp, "find_global",R2($1,$4)); } | GLOBAL string '=' var { $$ = MK_I(interp, "store_global",R2($2,$4)); }- | NEW { expect_pasm = 1; } + | NEW { /*expect_pasm = 1;*/ } pasm_args { $$ = iANY(interp, "new",0,regs,1); } | DEFINED target COMMA var { $$ = MK_I(interp, "defined", R2($2, $4)); } | DEFINED target COMMA var '[' keylist ']' { keyvec=KEY_BIT(2);