From c55a6ef87324d1a22fa0f5e935d9575005e15bd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 21 Nov 2016 22:30:20 +0100 Subject: [PATCH] VM: removing the unused callstack-bounds primitive Probably needs new boot images --- basis/bootstrap/image/primitives/primitives.factor | 4 ---- core/kernel/kernel.factor | 1 - vm/callstack.cpp | 6 ------ vm/primitives.hpp | 2 +- vm/vm.hpp | 1 - 5 files changed, 1 insertion(+), 13 deletions(-) diff --git a/basis/bootstrap/image/primitives/primitives.factor b/basis/bootstrap/image/primitives/primitives.factor index aaa5cdaeb9..918dab1361 100644 --- a/basis/bootstrap/image/primitives/primitives.factor +++ b/basis/bootstrap/image/primitives/primitives.factor @@ -313,10 +313,6 @@ CONSTANT: all-primitives { { object } { fixnum } f } { "become" ( old new -- ) "become" { array array } { } f } - { - "callstack-bounds" ( -- start end ) "callstack_bounds" - { } { alien alien } make-flushable - } { "check-datastack" ( array in# out# -- ? ) "check_datastack" { array integer integer } { object } make-flushable diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index c685dcbed0..74790c3d4a 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -37,7 +37,6 @@ PRIMITIVE: (execute) ( word -- ) PRIMITIVE: (identity-hashcode) ( obj -- code ) PRIMITIVE: become ( old new -- ) PRIMITIVE: c-to-factor ( -- ) -PRIMITIVE: callstack-bounds ( -- start end ) PRIMITIVE: check-datastack ( array in# out# -- ? ) PRIMITIVE: compute-identity-hashcode ( obj -- ) PRIMITIVE: context-object ( n -- obj ) diff --git a/vm/callstack.cpp b/vm/callstack.cpp index 45caa01315..89f67e5c0e 100644 --- a/vm/callstack.cpp +++ b/vm/callstack.cpp @@ -108,10 +108,4 @@ void factor_vm::primitive_set_innermost_stack_frame_quotation() { *(cell*)inner = quot->entry_point + offset; } -// Allocates memory (allot_alien) -void factor_vm::primitive_callstack_bounds() { - ctx->push(allot_alien(ctx->callstack_seg->start)); - ctx->push(allot_alien(ctx->callstack_seg->end)); -} - } diff --git a/vm/primitives.hpp b/vm/primitives.hpp index 03a76929bb..b664a11c46 100644 --- a/vm/primitives.hpp +++ b/vm/primitives.hpp @@ -11,7 +11,7 @@ namespace factor { _(bignum_shift) _(bignum_subtract) _(bignum_to_fixnum) \ _(bignum_to_fixnum_strict) _(bignum_xor) _(bits_double) _(bits_float) \ _(byte_array) _(callback) _(callback_room) \ - _(callstack_bounds) _(callstack_for) _(callstack_to_array) \ + _(callstack_for) _(callstack_to_array) \ _(check_datastack) _(clone) _(code_blocks) _(code_room) \ _(compact_gc) _(compute_identity_hashcode) _(context_object) \ _(context_object_for) _(current_callback) _(data_room) \ diff --git a/vm/vm.hpp b/vm/vm.hpp index 1fdff17b77..06aefee99b 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -609,7 +609,6 @@ struct factor_vm { void primitive_innermost_stack_frame_executing(); void primitive_innermost_stack_frame_scan(); void primitive_set_innermost_stack_frame_quotation(); - void primitive_callstack_bounds(); template void iterate_callstack(context* ctx, Iterator& iterator, Fixup& fixup); -- 2.34.1