VM: give the exception handling special object a real name

db4
Björn Lindqvist 2015-08-30 12:44:33 +02:00
parent 22887c5816
commit de4917e6a1
5 changed files with 12 additions and 8 deletions

View 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

View 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." } ;

View 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

View 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]);

View 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