[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to make a function inline?



Example is below. am i doing something wrong? My understanding
is that the line 

	static LnkT0(){ call_or_link(VV[0],&Lnk0);} /* FOO */

would not present in the disassembled code if foo were being
compiled inline.

tnx, f

;;***************   example ***********************

PAM>(proclaim '(inline foo))
NIL

PAM>(defun foo (x) (car x))
FOO

PAM>(proclaim '(inline foo))
NIL

PAM>(defun bar (x) (foo x))
BAR

PAM>(disassemble 'bar)
Compiling gazonk3.lsp.
End of Pass 1.  
End of Pass 2.  
OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
Finished compiling gazonk3.lsp.
#include <cmpinclude.h>
#include "gazonk3.h"
init_gazonk3(){do_init(VV);}
/*	function definition for BAR	*/

static L1()
{register object *base=vs_base;
	register object *sup=base+VM1; VC1
	vs_check;
	{object V1;
	V1=(base[0]);
	vs_top=sup;
TTL:;
	base[1]= (V1);
	vs_top=(vs_base=base+1)+1;
	(void) (*Lnk0)();
	return;
	}
}
static LnkT0(){ call_or_link(VV[0],&Lnk0);} /* FOO */
       
#(
#(pam::foo (system::%init . #((system::mf 'pam::bar 0) (system::debug 'pam::bar '(pam::x)))))
)

static L1();
#define VC1
#define VM1 2
static char * VVi[2]={
#define Cdata VV[1]
(char *)(&L1)
};
#define VV ((object *)VVi)
static  LnkT0() ;
static  (*Lnk0)() = LnkT0;
T

PAM>