it boots!
parent
de95f233de
commit
ccdbccc139
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
ERROR: I/O error: [ "primitive_read_line_fd_8" "Resource temporarily unavailable" ]
|
||||
|
||||
- fixup-words is crusty
|
||||
- decide if overflow is a fatal error
|
||||
- f >n: crashes
|
||||
- typecases: type error reporting bad
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ USE: words
|
|||
! Eg : foo [ 5 | foo ] ;
|
||||
|
||||
: fixup-word-later ( word -- )
|
||||
image vector-length cons "word-fixups" cons@ ;
|
||||
image vector-length cons "word-fixups" get vector-push ;
|
||||
|
||||
: fixup-word ( where word -- )
|
||||
dup pooled-object dup [
|
||||
|
|
@ -140,7 +140,7 @@ USE: words
|
|||
] ifte ;
|
||||
|
||||
: fixup-words ( -- )
|
||||
"word-fixups" get [ unswons fixup-word ] each ;
|
||||
"word-fixups" get [ unswons fixup-word ] vector-each ;
|
||||
|
||||
: 'word ( word -- pointer )
|
||||
dup pooled-object dup [
|
||||
|
|
@ -148,7 +148,7 @@ USE: words
|
|||
] [
|
||||
drop
|
||||
! Remember where we are, and add the reference later
|
||||
fixup-word-later f
|
||||
dup fixup-word-later
|
||||
] ifte ;
|
||||
|
||||
( Conses )
|
||||
|
|
@ -318,6 +318,10 @@ IN: cross-compiler
|
|||
300000 <vector> "image" set
|
||||
521 <hashtable> "objects" set
|
||||
namespace-buckets <hashtable> "vocabularies" set
|
||||
! Note that this is a vector that we can side-effect,
|
||||
! since ; ends up using this variable from nested
|
||||
! parser namespaces.
|
||||
1000 <vector> "word-fixups" set
|
||||
begin call end
|
||||
"image" get
|
||||
] bind ;
|
||||
|
|
|
|||
|
|
@ -136,6 +136,6 @@ USE: strings
|
|||
[
|
||||
interpreter-loop
|
||||
] [
|
||||
default-error-handler suspend
|
||||
[ default-error-handler suspend ] when*
|
||||
] catch
|
||||
] when ;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,11 @@ USE: vocabularies
|
|||
: describe-namespace ( namespace -- )
|
||||
[ vars-values ] bind describe-assoc ;
|
||||
|
||||
: ?unparse ( obj -- str )
|
||||
dup string? [ unparse ] unless ;
|
||||
|
||||
: describe-hashtable ( hashtables -- )
|
||||
hash>alist describe-assoc ;
|
||||
hash>alist [ unswons ?unparse swons ] inject describe-assoc ;
|
||||
|
||||
: describe ( obj -- )
|
||||
[
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ IN: cross-compiler
|
|||
USE: lists
|
||||
USE: namespaces
|
||||
USE: parser
|
||||
USE: prettyprint
|
||||
USE: stack
|
||||
|
||||
: cross-compile-resource ( resource -- )
|
||||
<namespace> [
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ typedef unsigned char BYTE;
|
|||
#define BYTES 1
|
||||
|
||||
/* Memory heap size */
|
||||
#define DEFAULT_ARENA (4 * 1024 * 1024)
|
||||
#define DEFAULT_ARENA (128 * 1024 * 1024)
|
||||
#define STACK_SIZE 1024
|
||||
|
||||
#include "error.h"
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ void primitive_write_fd_8(void)
|
|||
switch(type)
|
||||
{
|
||||
case FIXNUM_TYPE:
|
||||
case BIGNUM_TYPE:
|
||||
write_fd_char_8(h,to_fixnum(text));
|
||||
break;
|
||||
case STRING_TYPE:
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ CELL allot(CELL a)
|
|||
}
|
||||
else if(active->here > active->alarm)
|
||||
{
|
||||
printf("GC\n");
|
||||
/* Execute the 'garbage-collection' word */
|
||||
cpush(env.cf);
|
||||
env.cf = env.user[GC_ENV];
|
||||
|
|
|
|||
Loading…
Reference in New Issue