inline void factorvm::vmprim_dlopen()
{
gc_root<byte_array> path(dpop(),this);
- path.untag_check();
+ path.untag_check(this);
gc_root<dll> library(allot<dll>(sizeof(dll)),this);
library->path = path.value();
ffi_dlopen(library.untagged());
{
gc_root<object> library(dpop(),this);
gc_root<byte_array> name(dpop(),this);
- name.untag_check();
+ name.untag_check(this);
symbol_char *sym = name->data<symbol_char>();
stack_frame *factorvm::innermost_stack_frame_quot(callstack *callstack)
{
stack_frame *inner = innermost_stack_frame(callstack);
- tagged<quotation>(frame_executing(inner)).untag_check();
+ tagged<quotation>(frame_executing(inner)).untag_check(this);
return inner;
}
gc_root<callstack> callstack(dpop(),this);
gc_root<quotation> quot(dpop(),this);
- callstack.untag_check();
- quot.untag_check();
+ callstack.untag_check(this);
+ quot.untag_check(this);
jit_compile(quot.value(),true);
gc();
gc_root<byte_array> path(dpop(),this);
- path.untag_check();
+ path.untag_check(this);
save_image((vm_char *)(path.untagged() + 1));
}
where we might throw an error, so we have to throw an error here since
later steps destroy the current image. */
gc_root<byte_array> path(dpop(),this);
- path.untag_check();
+ path.untag_check(this);
/* strip out userenv data which is set on startup anyway */
for(cell i = 0; i < USER_ENV; i++)
namespace factor
{
-// I've had to copy inline implementations here to make dependencies work. Hopefully this can be better factored
+// I've had to copy inline implementations here to make dependencies work. Am hoping to move this code back into include files
// once the rest of the reentrant changes are done. -PD
-//tagged.hpp
-
// write_barrier.hpp
inline card *factorvm::addr_to_card(cell a)
{
gc_root<byte_array> mode(dpop(),this);
gc_root<byte_array> path(dpop(),this);
- mode.untag_check();
- path.untag_check();
+ mode.untag_check(this);
+ path.untag_check(this);
for(;;)
{
inline void factorvm::vmprim_quot_compiled_p()
{
tagged<quotation> quot(dpop());
- quot.untag_check();
+ quot.untag_check(this);
dpush(tag_boolean(quot->code != NULL));
}
bool type_p(cell type_) const { return type() == type_; }
- TYPE *untag_check() const {
+ TYPE *untag_check(factorvm *myvm) const {
if(TYPE::type_number != TYPE_COUNT && !type_p(TYPE::type_number))
- type_error(TYPE::type_number,value_);
+ myvm->type_error(TYPE::type_number,value_);
return untagged();
}
template <typename TYPE> TYPE *factorvm::untag_check(cell value)
{
- return tagged<TYPE>(value).untag_check();
+ return tagged<TYPE>(value).untag_check(this);
}
template <typename TYPE> TYPE *untag_check(cell value)