]> gitweb.factorcode.org Git - factor.git/commitdiff
Dev checkpoint
authorPhil Dawes <phil@phildawes.net>
Tue, 18 Aug 2009 19:03:11 +0000 (20:03 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:16:29 +0000 (08:16 +0100)
vm/os-windows-nt.cpp
vm/vm.hpp

index b50c9b7af8936a1a5ac02519a0ee372c37ca3792..8a8b2132ad3828f1e7e0856cf7a0fdab0722fbdd 100755 (executable)
@@ -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()
 {
 }
index 4257d17fd95eee8cc30a0c730e23770aeefe0a4f..fa4c365da62aaba19151ee28751541e84f2c9f41 100644 (file)
--- a/vm/vm.hpp
+++ b/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
 
 };