]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: give the exception handling special object a real name
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 30 Aug 2015 10:44:33 +0000 (12:44 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 2 Sep 2015 19:54:33 +0000 (21:54 +0200)
basis/bootstrap/assembler/x86.32.windows.factor
core/kernel/kernel-docs.factor
core/kernel/kernel.factor
vm/factor.cpp
vm/objects.hpp

index 6f2ade1ebecbdc89e365357784d77d3925b11c15..e3e7af531b776a1e7e1c2af8a1ab17de54355c33 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: compiler.codegen.relocation compiler.constants
-cpu.x86.assembler cpu.x86.assembler.operands kernel layouts
-locals parser sequences ;
+USING: compiler.codegen.relocation compiler.constants cpu.x86.assembler
+cpu.x86.assembler.operands kernel kernel.private layouts locals parser
+sequences ;
 IN: bootstrap.x86
 
 : tib-segment ( -- ) FS ;
@@ -16,7 +16,7 @@ IN: bootstrap.x86
     ! Clobbers tib-temp.
     ! Align stack
     ESP 3 bootstrap-cells ADD
-    tib-temp EBX 50 vm-special-object-offset [+] MOV
+    tib-temp EBX WIN-EXCEPTION-HANDLER vm-special-object-offset [+] MOV
     tib-temp tib-temp alien-offset [+] MOV
     tib-temp PUSH
 
index 3389d9727cf55924f1c0f19e327b14aafc92e8a5..9e4c794c36d3d17d58a27880de5c4eef567d7fc7 100644 (file)
@@ -1,7 +1,10 @@
-USING: arrays classes combinators help.markup help.syntax
-kernel.private layouts math quotations words ;
+USING: alien arrays classes combinators help.markup help.syntax
+kernel.private layouts math quotations system words ;
 IN: kernel
 
+HELP: WIN-EXCEPTION-HANDLER
+{ $description "This special object is an " { $link alien } " containing a pointer to the processes global exception handler. Only applicable on " { $link windows } "." } ;
+
 HELP: eq?
 { $values { "obj1" object } { "obj2" object } { "?" boolean } }
 { $description "Tests if two references point at the same object." } ;
index faf18493732807125693876c676d1a80bec14f5d..bf8187636716598b3202e8688332b2ed199f104b 100644 (file)
@@ -367,6 +367,7 @@ CONSTANT: GET-FPU-STATE-WORD 46
 CONSTANT: SET-FPU-STATE-WORD 47
 CONSTANT: SIGNAL-HANDLER-WORD 48
 CONSTANT: LEAF-SIGNAL-HANDLER-WORD 49
+CONSTANT: WIN-EXCEPTION-HANDLER 50
 
 CONSTANT: REDEFINITION-COUNTER 52
 
index eb96d0da8d44f04120d24d5ec8c73890dd2e176d..f78999dc82192d39c9cf0ed636ff50ec5d5c2bdc 100644 (file)
@@ -155,7 +155,7 @@ void factor_vm::init_factor(vm_parameters* p) {
     {OBJ_VM_GIT_LABEL,    (cell)FACTOR_STRINGIZE(FACTOR_GIT_LABEL)},
     {OBJ_VM_VERSION,      (cell)FACTOR_STRINGIZE(FACTOR_VERSION)},
 #if defined(WINDOWS)
-    {UNUSED1,              (cell)&factor::exception_handler}
+    {WIN_EXCEPTION_HANDLER, (cell)&factor::exception_handler}
 #endif
   };
   int n_items = sizeof(aliens) / sizeof(cell[2]);
index 02b9f3de4c4131c176f8c388ed21a98f00e4f0c3..9696be26276f5af72687b84d006cf1521d1dcc25 100644 (file)
@@ -64,7 +64,7 @@ enum special_object {
   SET_FPU_STATE_WORD,
   SIGNAL_HANDLER_WORD,
   LEAF_SIGNAL_HANDLER_WORD,
-  UNUSED1,
+  WIN_EXCEPTION_HANDLER,
   UNUSED2,
 
   /* Incremented on every modify-code-heap call; invalidates call( inline