Removed the unused ASSERT()-related code and changed a warning where BREAKPOINT() was used to an error

svn-id: r44041
This commit is contained in:
Filippos Karapetis 2009-09-12 17:31:29 +00:00
parent 5e57474eb9
commit 358b5649ce
4 changed files with 1 additions and 25 deletions

View file

@ -98,15 +98,6 @@ enum {
s->visual->print(s->visual, 0); s->visual->print(s->visual, 0);
#endif #endif
#define ASSERT(x) { \
int val = !!(x); \
if (!val) { \
error("Fatal error condition on \"" #x "\""); \
BREAKPOINT(); \
vm_handle_fatal_error(s, __LINE__, __FILE__); \
} \
}
static inline int sign_extend_byte(int value) { static inline int sign_extend_byte(int value) {
if (value & 0x80) if (value & 0x80)
return value - 256; return value - 256;

View file

@ -303,9 +303,7 @@ void CloneTable::listAllOutgoingReferences(reg_t addr, void *param, NoteCallback
// assert(addr.segment == _segId); // assert(addr.segment == _segId);
if (!clone_table->isValidEntry(addr.offset)) { if (!clone_table->isValidEntry(addr.offset)) {
warning("Unexpected request for outgoing references from clone at %04x:%04x", PRINT_REG(addr)); error("Unexpected request for outgoing references from clone at %04x:%04x", PRINT_REG(addr));
// BREAKPOINT();
return;
} }
clone = &(clone_table->_table[addr.offset]); clone = &(clone_table->_table[addr.offset]);

View file

@ -462,10 +462,6 @@ ExecStack *add_exec_stack_entry(EngineState *s, reg_t pc, StackPtr sp, reg_t obj
# define kernel_matches_signature(a, b, c, d) 1 # define kernel_matches_signature(a, b, c, d) 1
#endif #endif
void vm_handle_fatal_error(EngineState *s, int line, const char *file) {
error("Fatal VM error in %s, L%d; aborting...", file, line);
}
static reg_t pointer_add(EngineState *s, reg_t base, int offset) { static reg_t pointer_add(EngineState *s, reg_t base, int offset) {
MemObject *mobj = s->segMan->getMemObject(base.segment); MemObject *mobj = s->segMan->getMemObject(base.segment);

View file

@ -394,15 +394,6 @@ ExecStack *add_exec_stack_varselector(EngineState *s, reg_t objp, int argc,
*/ */
void run_vm(EngineState *s, int restoring); void run_vm(EngineState *s, int restoring);
/**
* Handles a fatal error condition
* @param[in] s The state to recover from
* @param[in] line Source code line number the error occured in
* @param[in] file File the error occured in
*/
void vm_handle_fatal_error(EngineState *s, int line, const char *file);
/** /**
* Debugger functionality * Debugger functionality
* @param[in] s The state at which debugging should take place * @param[in] s The state at which debugging should take place