Interpreter and unit test fixes, fix Objective C exception handling
parent
6bec7ab3b8
commit
7b1cdc1e31
|
@ -4,8 +4,6 @@
|
|||
- run file dialog is broken
|
||||
- update walker for new interpreter
|
||||
- quotations should store their originating word
|
||||
- single-stepper: use highlight trick
|
||||
- plain-stream should do highlights
|
||||
- core foundation should use unicode strings
|
||||
- alien>utf16-string, utf16-string>alien words
|
||||
- can <void*> only be called with an alien?
|
||||
|
@ -15,6 +13,7 @@
|
|||
- 3 >n fep
|
||||
- code walker & exceptions
|
||||
- code walker and callbacks is broken?
|
||||
- prettyprinter's highlighting of non-leaves looks bad
|
||||
|
||||
+ io:
|
||||
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
IN: temporary
|
||||
USING: errors interpreter io kernel lists math math-internals
|
||||
USING: errors interpreter io kernel math math-internals
|
||||
namespaces prettyprint sequences test ;
|
||||
|
||||
: done-cf? ( -- ? ) meta-cf get not ;
|
||||
: done? ( -- ? ) done-cf? meta-c get empty? and ;
|
||||
: done-all? ( -- ? ) done? meta-c get empty? and ;
|
||||
|
||||
: run ( -- )
|
||||
done? [ next do run ] unless ;
|
||||
: run ( -- ) done-all? [ next do run ] unless ;
|
||||
|
||||
: init-interpreter ( -- )
|
||||
V{ } clone meta-d set
|
||||
V{ } clone meta-r set
|
||||
V{ } clone meta-c set
|
||||
namestack meta-name set
|
||||
catchstack meta-catch set
|
||||
meta-cf off
|
||||
meta-executing off ;
|
||||
catchstack meta-catch set ;
|
||||
|
||||
: test-interpreter
|
||||
init-interpreter meta-cf set run meta-d get ;
|
||||
init-interpreter (meta-call) run meta-d get ;
|
||||
|
||||
[ V{ 1 2 3 } ] [
|
||||
[ 1 2 3 ] test-interpreter
|
||||
|
|
|
@ -98,8 +98,6 @@ unit-test
|
|||
[ 0 -1 ] [ -1 -268435456 >fixnum /mod ] unit-test
|
||||
[ 14355 ] [ 1591517158873146351817850880000000 32769 mod ] unit-test
|
||||
|
||||
[ { 0 1 1 0 } ] [ [ -10 [ , ] each-bit ] { } make ] unit-test
|
||||
|
||||
[ -351382792 ] [ -43922849 3 shift ] unit-test
|
||||
|
||||
[ t ] [ 0 zero? ] unit-test
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
IN: temporary
|
||||
USING: generic kernel math memory words prettyprint
|
||||
sequences test ;
|
||||
USING: generic kernel kernel-internals math memory prettyprint
|
||||
sequences test words ;
|
||||
|
||||
TUPLE: testing x y z ;
|
||||
|
||||
|
|
|
@ -114,8 +114,11 @@ void collect_roots(void)
|
|||
|
||||
collect_callstack(stacks->call_region,stacks->call);
|
||||
|
||||
collect_callframe_triple(&stacks->callframe,
|
||||
&stacks->callframe_scan,&stacks->callframe_end);
|
||||
if(stacks != stack_chain)
|
||||
{
|
||||
collect_callframe_triple(&stacks->callframe,
|
||||
&stacks->callframe_scan,&stacks->callframe_end);
|
||||
}
|
||||
|
||||
copy_handle(&stacks->catch_save);
|
||||
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
#import "Foundation/NSException.h"
|
||||
#import "Foundation/NSString.h"
|
||||
|
||||
static CELL error;
|
||||
|
||||
/* This code is convoluted because Cocoa places restrictions on longjmp and
|
||||
exception handling. In particular, a longjmp can never cross an NS_DURING,
|
||||
NS_HANDLER or NS_ENDHANDLER. */
|
||||
void platform_run()
|
||||
{
|
||||
CELL error = F;
|
||||
error = F;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
|
|
|
@ -18,6 +18,9 @@ static bool in_page(void *fault, void *i_area, CELL area_size, int offset)
|
|||
|
||||
void signal_handler(int signal, siginfo_t* siginfo, void* uap)
|
||||
{
|
||||
printf("fucked\n");
|
||||
fflush(stdout);
|
||||
|
||||
if(in_page(siginfo->si_addr, (void *) ds_bot, 0, -1))
|
||||
general_error(ERROR_DS_UNDERFLOW,F,F,false);
|
||||
else if(in_page(siginfo->si_addr, (void *) ds_bot, ds_size, 0))
|
||||
|
|
Loading…
Reference in New Issue