Below you will find a simple Jako program along with the IMC code the Jako compiler generates. The IMC compiler generates the following error:
error:imcc:iANY file sub.imc line 36: op not found 'set_ic_ic' (set<2>) on the first ".arg x" instance in the .imc file. I'm not sure why that line of code makes imcc want to have a set_ic_ic op (although I do wonder if has something to do with the fact that we have a global ".local x" and a ".param x" for the sub we are calling)... Regards, -- Gregor # # sub.jako # # A program to demonstrate macros and poor-man's subroutine # calls. # # Copyright (C) 2001-2003 Gregor N. Purdy. All rights reserved. # This program is free software. It is subject to the same # license as Perl itself. # # $Id: sub.jako,v 1.3 2002/12/05 04:07:26 gregor Exp $ # var int x; sub printit (int x) { print("$x\n"); } x = 42; printit(x); x = 1234; printit(x); ------------------------ cut here: sub.imc follows -------------------------- ############################################################################### # This Parrot intermediate code file was produced by the Jako compiler. # # Initial comments from the source code are reproduced below. # ############################################################################### .sub __ANON_BLOCK__0 # # sub.jako # # A program to demonstrate macros and poor-man's subroutine # calls. # # Copyright (C) 2001-2003 Gregor N. Purdy. All rights reserved. # This program is free software. It is subject to the same # license as Perl itself. # # $Id: sub.jako,v 1.3 2002/12/05 04:07:26 gregor Exp $ # .local int x # var int x; printit_BEFORE: branch __ANON_BLOCK__1 # sub printit (int x) { .end .sub _printit printit_ENTER: # var int x; .param int x # (argument x) print "" # print(...); print x print "\n" printit_LEAVE: ret # } printit_AFTER: noop .end .sub __ANON_BLOCK__1 set x, 42 # x = 42 .arg x # printit(...); call _printit set x, 1234 # x = 1234 .arg x # printit(...); call _printit end .end