/* C file produced by GAC */
#include "compiled.h"
#define FILE_CRC "5799640"
/* global variables used in handlers */
static GVar G_runtest;
/* record names used in handlers */
/* information for the functions */
static Obj NameFunc[3];
static Obj FileName;
/* handler for function 2 */
static Obj HdlrFunc2 (
Obj self )
{
Obj t_1 = 0;
Bag oldFrame;
/* allocate new stack frame */
SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);
/* return 1 + 2; */
C_SUM_INTOBJS( t_1, INTOBJ_INT(1), INTOBJ_INT(2) )
SWITCH_TO_OLD_FRAME(oldFrame);
return t_1;
}
/* handler for function 1 */
static Obj HdlrFunc1 (
Obj self )
{
Obj t_1 = 0;
Obj t_2 = 0;
Bag oldFrame;
/* allocate new stack frame */
SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);
/* runtest := function ( )
return 1 + 2;
end; */
t_1 = NewFunction( NameFunc[2], 0, 0, HdlrFunc2 );
SET_ENVI_FUNC( t_1, STATE(CurrLVars) );
t_2 = NewFunctionBody();
SET_STARTLINE_BODY(t_2, 1);
SET_ENDLINE_BODY(t_2, 3);
SET_FILENAME_BODY(t_2, FileName);
SET_BODY_FUNC(t_1, t_2);
AssGVar( G_runtest, t_1 );
/* return; */
SWITCH_TO_OLD_FRAME(oldFrame);
return 0;
}
/* 'PostRestore' restore gvars, rnams, functions */
static Int PostRestore ( StructInitInfo * module )
{
/* global variables used in handlers */
G_runtest = GVarName( "runtest" );
/* record names used in handlers */
/* information for the functions */
NameFunc[1] = 0;
NameFunc[2] = 0;
return 0;
}
/* 'InitKernel' sets up data structures, fopies, copies, handlers */
static Int InitKernel ( StructInitInfo * module )
{
/* global variables used in handlers */
/* information for the functions */
InitGlobalBag( &FileName, "plus.g:FileName(" FILE_CRC")" );
InitHandlerFunc( HdlrFunc1, "plus.g:HdlrFunc1(" FILE_CRC")" );
InitGlobalBag( &(NameFunc[1]), "plus.g:NameFunc[1](" FILE_CRC")" );
InitHandlerFunc( HdlrFunc2, "plus.g:HdlrFunc2(" FILE_CRC")" );
InitGlobalBag( &(NameFunc[2]), "plus.g:NameFunc[2](" FILE_CRC")" );
return 0;
}
/* 'InitLibrary' sets up gvars, rnams, functions */
static Int InitLibrary ( StructInitInfo * module )
{
Obj func1;
Obj body1;
/* Complete Copy/Fopy registration */
UpdateCopyFopyInfo();
FileName = MakeImmString( "plus.g" );
PostRestore(module);
/* create all the functions defined in this module */
func1 = NewFunction(NameFunc[1],0,0,HdlrFunc1);
SET_ENVI_FUNC( func1, STATE(CurrLVars) );
body1 = NewFunctionBody();
SET_BODY_FUNC( func1, body1 );
CHANGED_BAG( func1 );
CALL_0ARGS( func1 );
return 0;
}
/* <name> returns the description of this module */
static StructInitInfo module = {
.type = MODULE_DYNAMIC,
.name = "plus.g" ,
.crc = 5799640,
.initKernel = InitKernel,
.initLibrary = InitLibrary,
.postRestore = PostRestore,
};
StructInitInfo * Init__Dynamic ( void )
{
return &module;
}
/* compiled code ends here */
quality 100%
¤ Dauer der Verarbeitung: 0.24 Sekunden
(vorverarbeitet)
¤
*© Formatika GbR, Deutschland