Dev checkpoint
parent
1431ae806f
commit
9ec000c570
|
|
@ -3,7 +3,7 @@
|
|||
namespace factor
|
||||
{
|
||||
|
||||
s64 current_micros()
|
||||
s64 factorvm::current_micros()
|
||||
{
|
||||
FILETIME t;
|
||||
GetSystemTimeAsFileTime(&t);
|
||||
|
|
@ -11,6 +11,11 @@ s64 current_micros()
|
|||
- EPOCH_OFFSET) / 10;
|
||||
}
|
||||
|
||||
s64 current_micros()
|
||||
{
|
||||
return vm->current_micros();
|
||||
}
|
||||
|
||||
FACTOR_STDCALL LONG exception_handler(PEXCEPTION_POINTERS pe)
|
||||
{
|
||||
PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord;
|
||||
|
|
@ -58,7 +63,7 @@ FACTOR_STDCALL LONG exception_handler(PEXCEPTION_POINTERS pe)
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
|
||||
void c_to_factor_toplevel(cell quot)
|
||||
void factorvm::c_to_factor_toplevel(cell quot)
|
||||
{
|
||||
if(!AddVectoredExceptionHandler(0, (PVECTORED_EXCEPTION_HANDLER)exception_handler))
|
||||
fatal_error("AddVectoredExceptionHandler failed", 0);
|
||||
|
|
@ -66,6 +71,15 @@ void c_to_factor_toplevel(cell quot)
|
|||
RemoveVectoredExceptionHandler((void *)exception_handler);
|
||||
}
|
||||
|
||||
void c_to_factor_toplevel(cell quot)
|
||||
{
|
||||
return vm->c_to_factor_toplevel(quot);
|
||||
}
|
||||
|
||||
void factorvm::open_console()
|
||||
{
|
||||
}
|
||||
|
||||
void open_console()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
18
vm/vm.hpp
18
vm/vm.hpp
|
|
@ -649,7 +649,7 @@ struct factorvm {
|
|||
|
||||
|
||||
// os-windows
|
||||
#if defined(WINDOWS)
|
||||
#if defined(WINDOWS)
|
||||
void init_ffi();
|
||||
void ffi_dlopen(dll *dll);
|
||||
void *ffi_dlsym(dll *dll, symbol_char *symbol);
|
||||
|
|
@ -663,8 +663,20 @@ struct factorvm {
|
|||
const vm_char *default_image_path();
|
||||
void windows_image_path(vm_char *full_path, vm_char *temp_path, unsigned int length);
|
||||
bool windows_stat(vm_char *path);
|
||||
// next method here:
|
||||
#endif
|
||||
|
||||
#if defined(WINCE)
|
||||
#else /* WINNT */
|
||||
s64 current_micros();
|
||||
void c_to_factor_toplevel(cell quot);
|
||||
void open_console();
|
||||
// next method here:
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FACTOR_X86
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue