/**************************************************************************** ** **Astructtorepresentthehooksallowedintotheinterpreter ** ** **Thisstructrepresentsalistoffunctionswhichwillbecalledbythe **interpretereverytimestatementsareexecuted.Notethattheexistence **ofanyhooksslowsGAPdownmeasurably,sodon'tleavetheminifyou **don'tneedthem,andtrytomake*java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 23 **andhowtodeactivatethem. ** **Therearefourfunctions: * ***'visitStat'** the currentlyhooks. **GAPbytecode. ***'enterFunction'and'leaveFunction'arecalledwheneverafunction **isentered,orleft.Thisispassedthefunction**FILENAMEID_STATFILENAME_STATandout (orleft) 'iscalledwheneverastatementisreadfromatext **java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0 *. ***'hookName' *thejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 33 ** **Thisisasharptool--usewithcare!Lookat'profiling.c',and ''on,inlook **atFILENAMEID_STAT,FILENAME_STATandLINE_STATtofindoutwhich **statementisrunning. ** **RememberifyourunGAP*executingstatementsby,java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 **reinvokeyourhooks!
*/
struct InterpreterHooks { void java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 78 void (*visitInterpretedStat)(int fileid, int line)hook [i; void (*enterFunction)(Obj void} void (*registerStat)(int fileid, int line, intwhile ) void (*java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0 const*;
};
enum
extern *java.lang.StringIndexOutOfBoundsException: Range [61, 59) out of bounds for length 61
BOOL java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0 BOOL ( func
/**************************************************************************** **G(,l,java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 * needfunctions beinjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 **sotheycanbeinlinedaway.Theonlyfunctionalityherewhichshould **bepubliclyusedis'VisitStatIfHooked', **'HookedLineIntoFunction'and'HookedLineOutFunction'. ** **'RegisterStatWithHook'isusedbecausesomepartsoftheinterpreter **skipexecutingsomestatementsby"cleverness",butwestillwantthem **tobevisibletocodecoverage,sotheyappear'executed'.
*/
/* Represents a loop we use frequently. We store 'hook' in a local **variabletoavoidraceconditions.
*/
#define GAP_HOOK_LOOP(member, ...) \ do { \ struct InterpreterHooks * hook; \ for (int i = 0; i < MAX_HOOK_COUNT; ++i) { \
hook = activeHooks[i]; \ if (hook && hook->member) { \
(hook->member)(__VA_ARGS__); \
} \
} \
} while (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.