VM: signal_error and fp_trap_error not needed, call general_error directly
parent
73956db33a
commit
504be0c7cb
|
@ -133,21 +133,11 @@ void factor_vm::memory_protection_error(cell pc, cell addr) {
|
|||
general_error(ERROR_MEMORY, from_unsigned_cell(addr), false_object);
|
||||
}
|
||||
|
||||
/* Allocates memory */
|
||||
void factor_vm::signal_error(cell signal) {
|
||||
general_error(ERROR_SIGNAL, from_unsigned_cell(signal), false_object);
|
||||
}
|
||||
|
||||
/* Allocates memory */
|
||||
void factor_vm::divide_by_zero_error() {
|
||||
general_error(ERROR_DIVIDE_BY_ZERO, false_object, false_object);
|
||||
}
|
||||
|
||||
/* Allocates memory */
|
||||
void factor_vm::fp_trap_error(unsigned int fpu_status) {
|
||||
general_error(ERROR_FP_TRAP, tag_fixnum(fpu_status), false_object);
|
||||
}
|
||||
|
||||
/* For testing purposes */
|
||||
/* Allocates memory */
|
||||
void factor_vm::primitive_unimplemented() { not_implemented_error(); }
|
||||
|
@ -169,7 +159,7 @@ void memory_signal_handler_impl() {
|
|||
|
||||
/* Allocates memory */
|
||||
void factor_vm::synchronous_signal_handler_impl() {
|
||||
signal_error(signal_number);
|
||||
general_error(ERROR_SIGNAL, from_unsigned_cell(signal_number), false_object);
|
||||
}
|
||||
|
||||
/* Allocates memory */
|
||||
|
@ -182,7 +172,7 @@ void factor_vm::fp_signal_handler_impl() {
|
|||
/* Clear pending exceptions to avoid getting stuck in a loop */
|
||||
set_fpu_state(get_fpu_state());
|
||||
|
||||
fp_trap_error(signal_fpu_status);
|
||||
general_error(ERROR_FP_TRAP, tag_fixnum(signal_fpu_status), false_object);
|
||||
}
|
||||
|
||||
/* Allocates memory */
|
||||
|
|
|
@ -218,9 +218,7 @@ struct factor_vm {
|
|||
void not_implemented_error();
|
||||
void verify_memory_protection_error(cell addr);
|
||||
void memory_protection_error(cell pc, cell addr);
|
||||
void signal_error(cell signal);
|
||||
void divide_by_zero_error();
|
||||
void fp_trap_error(unsigned int fpu_status);
|
||||
void primitive_unimplemented();
|
||||
void memory_signal_handler_impl();
|
||||
void synchronous_signal_handler_impl();
|
||||
|
|
Loading…
Reference in New Issue