handle SIGFPE and allow the registered signal handler to do recovery
rather than bail
progs.h, pr_exec.c, pr_load.c:
if pr_faultchecks is 1 (0 is default), handle division by 0 gracefully
by loading the maximum representable number into the answer
Closes: #58
the rest:
kill the SIGFPE stuff
methods directly or setup the progs struct for a normal function call to
call a progs method rather than recursively calling PR_ExecuteProgram. This
will reduce method call overhead (both cpu and stack usage), fix the loss
of tracing when calling a method and makes it possible to break out of the
progs engine simply if threaded progs are ever implemented.
o add ev_uniteger to the types enum
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
progs.h:
o add uinteger accessors
pr_exec.c:
o implement ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
pr_opcode.c:
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
expr.h:
o prototype inc_users
qfcc.h:
o add externs for op_ifbe, op_ifb, op_ifae and op_ifa
emit.c:
o don't bother emiting an assignment to a temp def that's only used once
(ie, it's never read, only written to)
o support the new if* instructions
expr.c:
o support the new if* insructions
o dectect expression loops in append_expr
o support unsigned integers
o re-work temp def usage counting
pr_def.c
o debugging for temp def usage counts
pr_opcode.c:
o support the new if* instructions
qc-parse.y:
o provide defines for IFBE IFB IFAE IFA
switch.c:
o do binary searches for strings, floats and ints if there are more than
8 cases in a switch. Strings need more testing.
- new opcodes for pointers
progs.h:
- prototype PR_Check_Opcodes
pr_edict.c:
- move the static bounds checking to PR_Check_Opcodes in pr_opcode.c
pr_exec.c:
- vector instruction cleanup
- temporarily nuke bounds checking from storep.*
- move base of address results from pr->edicts to pr->pr_globals
- implement new pointer related instructions
- nuke proposed global pointer instructions (not flexible enough)
pr_opcode.c:
- add new pointer instuctions
- re-implement static bounds/invalid opcode checking. no more multiple
case statements to keep track of.
value
- switch some prints over NUM_FOR_BAD_EDICT
- change NUM_FOR_EDICT to call PR_RunError on error, instead of
PR_Error. That was it prints out a backtrace.
(I did it in reverse order ;)