view runtime/main_mid.c @ 186:ba35ab624ec2

Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
author Mike Pavone <pavone@retrodev.com>
date Fri, 07 Oct 2011 00:10:02 -0700
parents
children
line wrap: on
line source

#ifdef RAW_FUNC
	ret = f_List(0, inout);
	inout[0] = ret.retvals[0];
	for (idx = 0; idx < argc; ++idx)
	{
		inout[1] = make_String(argv[idx]);
		ret = f_Append(2, inout);
		inout[0] = ret.retvals[0];
	}
	ret = f_Main(1, inout);
	numret = ret.num_ret;
	if (numret)
		inout[0] = ret.retvals[0];
#else

	rhope(FUNC_List, inout, 0, 1);
	for (idx = 0; idx < argc; ++idx)
	{
		inout[1] = make_String(argv[idx]);
		rhope(FUNC_Append, inout, 2, 2);
	}
	numret = rhope(FUNC_Main, inout, 1, 1);
#endif