cell signal_handler_addr;
// are we handling a memory error? used to detect double faults
- cell faulting_p;
+ bool faulting_p;
// Various special objects, accessed by special-object and
// set-special-object primitives
c_to_factor_func_type c_to_factor_func;
// Is profiling enabled?
- volatile cell sampling_profiler_p;
+ volatile bool sampling_profiler_p;
fixnum samples_per_second;
// Global variables used to pass fault handler state from signal handler
// State kept by the sampling profiler
std::vector<profiling_sample> samples;
- std::vector<cell> sample_callstacks;
- volatile profiling_sample_count sample_counts;
+ volatile profiling_sample current_sample;
// GC is off during heap walking
bool gc_off;
// Only set if we're performing a GC
gc_state* current_gc;
- volatile cell current_gc_p;
+ volatile bool current_gc_p;
// Set if we're in the jit
volatile fixnum current_jit_count;
static bool fatal_erroring_p;
// Two fep_p variants, one might be redundant.
- volatile cell safepoint_fep_p;
+ volatile bool safepoint_fep_p;
// Allow Ctrl-Break a busy loop in the Listener, only used on Windows
volatile bool stop_on_ctrl_break;
void record_sample(bool prolog_p);
void start_sampling_profiler(fixnum rate);
void end_sampling_profiler();
- void set_sampling_profiler(fixnum rate);
- void primitive_sampling_profiler();
+ void set_profiling(fixnum rate);
+ void primitive_set_profiling();
void primitive_get_samples();
+ array* allot_growarr();
+ void growarr_add(array *growarr_, cell value);
// 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);
size_t safe_fread(void* ptr, size_t size, size_t nitems, FILE* stream);
void safe_fputc(int c, FILE* stream);
size_t safe_fwrite(void* ptr, size_t size, size_t nitems, FILE* stream);
- int safe_ftell(FILE* stream);
+ off_t safe_ftell(FILE* stream);
void safe_fseek(FILE* stream, off_t offset, int whence);
void safe_fflush(FILE* stream);
void primitive_fopen();
void primitive_innermost_stack_frame_executing();
void primitive_innermost_stack_frame_scan();
void primitive_set_innermost_stack_frame_quotation();
+ void primitive_callstack_bounds();
template <typename Iterator, typename Fixup>
void iterate_callstack(context* ctx, Iterator& iterator, Fixup& fixup);