namespace factor
{
-s64 current_micros()
+s64 factorvm::current_micros()
{
FILETIME t;
GetSystemTimeAsFileTime(&t);
- 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;
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);
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()
{
}
// os-windows
-#if defined(WINDOWS)
+ #if defined(WINDOWS)
void init_ffi();
void ffi_dlopen(dll *dll);
void *ffi_dlsym(dll *dll, symbol_char *symbol);
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
};