diff --git a/basis/bootstrap/image/primitives/primitives.factor b/basis/bootstrap/image/primitives/primitives.factor index 918dab1361..d28a096808 100644 --- a/basis/bootstrap/image/primitives/primitives.factor +++ b/basis/bootstrap/image/primitives/primitives.factor @@ -357,10 +357,6 @@ CONSTANT: all-primitives { "strip-stack-traces" ( -- ) "strip_stack_traces" { } { } f } - { - "unimplemented" ( -- * ) "unimplemented" - { } { } f - } } } { diff --git a/basis/debugger/debugger-docs.factor b/basis/debugger/debugger-docs.factor index 995cab178d..1da63ab4ec 100644 --- a/basis/debugger/debugger-docs.factor +++ b/basis/debugger/debugger-docs.factor @@ -147,6 +147,3 @@ HELP: retainstack-overflow. HELP: memory-error. { $error-description "Thrown by the Factor VM if an invalid memory access occurs." } { $notes "This can be a result of incorrect usage of C library interface words, a bug in the compiler, or a bug in the VM." } ; - -HELP: primitive-error. -{ $error-description "Thrown by the Factor VM if an unsupported primitive word is called." } ; diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index 9609782772..2a01a83943 100755 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -134,9 +134,6 @@ HOOK: signal-error. os ( obj -- ) : memory-error. ( error -- ) "Memory protection fault at address " write third .h ; -: primitive-error. ( error -- ) - "Unimplemented primitive" print drop ; - : fp-trap-error. ( error -- ) "Floating point trap" print drop ; @@ -158,7 +155,7 @@ PREDICATE: vm-error < array second { [ expired-error. ] [ io-error. ] - [ primitive-error. ] + [ drop ] [ type-check-error. ] [ divide-by-zero-error. ] [ signal-error. ] diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index 356982e068..f5c19123ab 100644 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -140,11 +140,6 @@ IN: kernel.tests [ loop ] must-fail -! Discovered on Windows -: total-failure-1 ( -- a ) "" [ ] map unimplemented ; - -[ total-failure-1 ] must-fail - { 1 1 2 2 3 3 } [ 1 2 3 [ dup ] tri@ ] unit-test { 1 4 9 } [ 1 2 3 [ sq ] tri@ ] unit-test [ [ sq ] tri@ ] must-infer diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index 74790c3d4a..4471432dfc 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -56,7 +56,6 @@ PRIMITIVE: signal-handler ( -- ) PRIMITIVE: special-object ( n -- obj ) PRIMITIVE: strip-stack-traces ( -- ) PRIMITIVE: tag ( object -- n ) -PRIMITIVE: unimplemented ( -- * ) PRIMITIVE: unwind-native-frames ( -- ) PRIVATE> diff --git a/vm/errors.cpp b/vm/errors.cpp index 54b1f63f68..74ba10056c 100644 --- a/vm/errors.cpp +++ b/vm/errors.cpp @@ -93,11 +93,6 @@ void factor_vm::type_error(cell type, cell tagged) { general_error(ERROR_TYPE, tag_fixnum(type), tagged); } -// Allocates memory -void factor_vm::not_implemented_error() { - general_error(ERROR_NOT_IMPLEMENTED, false_object, false_object); -} - void factor_vm::set_memory_protection_error(cell fault_addr, cell fault_pc) { // Called from the OS-specific top halves of the signal handlers to // make sure it's safe to dispatch to memory_signal_handler_impl. @@ -118,10 +113,6 @@ void factor_vm::divide_by_zero_error() { general_error(ERROR_DIVIDE_BY_ZERO, false_object, false_object); } -// For testing purposes -// Allocates memory -void factor_vm::primitive_unimplemented() { not_implemented_error(); } - // Allocates memory void memory_signal_handler_impl() { factor_vm* vm = current_vm(); diff --git a/vm/errors.hpp b/vm/errors.hpp index 068fa104f9..af62306a46 100644 --- a/vm/errors.hpp +++ b/vm/errors.hpp @@ -8,7 +8,7 @@ namespace factor { enum vm_error_type { ERROR_EXPIRED = 0, ERROR_IO, - ERROR_NOT_IMPLEMENTED, + ERROR_UNUSED, ERROR_TYPE, ERROR_DIVIDE_BY_ZERO, ERROR_SIGNAL, diff --git a/vm/primitives.hpp b/vm/primitives.hpp index b664a11c46..a0a0c4c22a 100644 --- a/vm/primitives.hpp +++ b/vm/primitives.hpp @@ -36,7 +36,7 @@ namespace factor { _(set_datastack) _(set_innermost_stack_frame_quotation) \ _(set_retainstack) _(set_slot) _(set_special_object) \ _(set_string_nth_fast) _(size) _(sleep) _(special_object) _(string) \ - _(strip_stack_traces) _(tuple) _(tuple_boa) _(unimplemented) \ + _(strip_stack_traces) _(tuple) _(tuple_boa) \ _(uninitialized_byte_array) _(word) _(word_code) _(word_optimized_p) \ _(wrapper) diff --git a/vm/vm.hpp b/vm/vm.hpp index 2911e0b453..cab80caa29 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -198,10 +198,8 @@ struct factor_vm { // errors void general_error(vm_error_type error, cell arg1, cell arg2); void type_error(cell type, cell tagged); - void not_implemented_error(); void set_memory_protection_error(cell fault_addr, cell fault_pc); void divide_by_zero_error(); - void primitive_unimplemented(); // bignum int bignum_equal_p(bignum* x, bignum* y);