Wearing my coding standard police hat -
You should remove your cuddled else statements:
i.e. if {
} else {
}
becomes
if {
}
else {
}
other than that, it looks good.
-----Original Message-----
From: Gregor N. Purdy
To: [EMAIL PROTECTED]
Sent: 9/17/2001 11:37 AM
Subject: [PATCH AGAIN] Revised op tracing patch
[UPDATED: patch actually attached this time]
All --
I am attaching a revised op tracing patch based on the feedback I got.
Its features are:
* Provides macros in interp_guts.h for setting up arrays with
op names and op arg counts (done via build_interp_starter.pl).
These are used in the op tracing
* The functions in bytecode.[hc] pass around a pointer to the length
of the bytecode so that later when we get to runops, we know
how much bytecode we've got and we can detect out-of-bounds
jumping. The documentation is updated, too.
* runops in interpreter.c now looks at interpreter->flags to
decide if the core of runops should be runops_trace_core or
runops_notrace_core. These new functions contain just the
while-loop portion of runops. A new function runops_generic
does any other setup (such as checking the bytecode
fingerprint) or wrapup (such as complaining if we ended up
out-of-bounds). NOTE: I didn't know what we should do for
functions in here that are not part of the api, so I gave
them docs with 'TODO' marks mentioning they really aren't
part of the api. Guidance appreciated.
* test_main.c now checks for '-t' arg and sets the tracing flag
on its interpreter instance as appropriate.
I'd like to commit this soon to clear out my sandbox so I can go
back and re-commit the constant comparison ops. So, if there
aren't any objections...
Regards,
-- Gregor
_____________________________________________________________________
/ perl -e 'srand(-2091643526); print chr rand 90 for (0..4)' \
Gregor N. Purdy [EMAIL PROTECTED]
Focus Research, Inc. http://www.focusresearch.com/
8080 Beckett Center Drive #203 513-860-3570 vox
West Chester, OH 45069 513-860-3579 fax
\_____________________________________________________________________/
<<traceop.diff>>