From 00328c85e0b8300aad551e0a105ba4e91485455f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 20 Jan 2010 17:06:49 +1300 Subject: [PATCH] vm: remove vm-ptr primitive --- basis/stack-checker/known-words/known-words.factor | 4 +--- core/bootstrap/primitives.factor | 1 - vm/alien.cpp | 5 ----- vm/primitives.cpp | 1 - vm/primitives.hpp | 1 - vm/vm.hpp | 1 - 6 files changed, 1 insertion(+), 12 deletions(-) diff --git a/basis/stack-checker/known-words/known-words.factor b/basis/stack-checker/known-words/known-words.factor index d7556adaa0..9bc61c6353 100644 --- a/basis/stack-checker/known-words/known-words.factor +++ b/basis/stack-checker/known-words/known-words.factor @@ -13,7 +13,7 @@ words.private definitions assocs summary compiler.units system.private combinators combinators.short-circuit locals locals.backend locals.types combinators.private stack-checker.values generic.single generic.single.private -alien.libraries tools.dispatch.private tools.profiler.private vm +alien.libraries tools.dispatch.private tools.profiler.private stack-checker.alien stack-checker.state stack-checker.errors @@ -739,6 +739,4 @@ M: bad-executable summary \ (exit) { integer } { } define-primitive -\ vm-ptr { } { alien } define-primitive - \ quot-compiled? { quotation } { object } define-primitive diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index ef02340e9e..dde5463c0f 100644 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -530,7 +530,6 @@ tuple { "dispatch-stats" "tools.dispatch.private" "primitive_dispatch_stats" (( -- stats )) } { "reset-dispatch-stats" "tools.dispatch.private" "primitive_reset_dispatch_stats" (( -- )) } { "profiling" "tools.profiler.private" "primitive_profiling" (( ? -- )) } - { "vm-ptr" "vm" "primitive_vm_ptr" (( -- ptr )) } { "optimized?" "words" "primitive_optimized_p" (( word -- ? )) } { "word-code" "words" "primitive_word_code" (( word -- start end )) } { "(word)" "words.private" "primitive_word" (( name vocab -- word )) } diff --git a/vm/alien.cpp b/vm/alien.cpp index b15ffee2c9..38078b6679 100755 --- a/vm/alien.cpp +++ b/vm/alien.cpp @@ -253,9 +253,4 @@ VM_C_API cell from_medium_struct(cell x1, cell x2, cell x3, cell x4, cell size, return parent->from_medium_struct(x1, x2, x3, x4, size); } -void factor_vm::primitive_vm_ptr() -{ - ctx->push(allot_alien(this)); -} - } diff --git a/vm/primitives.cpp b/vm/primitives.cpp index 2159e1d081..f288a796c2 100644 --- a/vm/primitives.cpp +++ b/vm/primitives.cpp @@ -129,7 +129,6 @@ PRIMITIVE(tuple) PRIMITIVE(tuple_boa) PRIMITIVE(unimplemented) PRIMITIVE(uninitialized_byte_array) -PRIMITIVE(vm_ptr) PRIMITIVE(word) PRIMITIVE(word_code) PRIMITIVE(wrapper) diff --git a/vm/primitives.hpp b/vm/primitives.hpp index c1dd0e30dc..1ace3c0f7e 100644 --- a/vm/primitives.hpp +++ b/vm/primitives.hpp @@ -125,7 +125,6 @@ DECLARE_PRIMITIVE(tuple) DECLARE_PRIMITIVE(tuple_boa) DECLARE_PRIMITIVE(unimplemented) DECLARE_PRIMITIVE(uninitialized_byte_array) -DECLARE_PRIMITIVE(vm_ptr) DECLARE_PRIMITIVE(word) DECLARE_PRIMITIVE(word_code) DECLARE_PRIMITIVE(wrapper) diff --git a/vm/vm.hpp b/vm/vm.hpp index 8fb866dbef..6f826ed9e0 100755 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -587,7 +587,6 @@ struct factor_vm void primitive_dlsym(); void primitive_dlclose(); void primitive_dll_validp(); - void primitive_vm_ptr(); char *alien_offset(cell obj); void to_value_struct(cell src, void *dest, cell size); cell from_value_struct(void *src, cell size);