Compiler and module system fix
parent
61e1dff787
commit
577f4b26ff
|
@ -105,6 +105,7 @@
|
||||||
|
|
||||||
+ misc:
|
+ misc:
|
||||||
|
|
||||||
|
- loading the image should not exhaust nursery space
|
||||||
- compiler tests are not as reliable now
|
- compiler tests are not as reliable now
|
||||||
- problem if major gc happens during relocation
|
- problem if major gc happens during relocation
|
||||||
- in fact relocation should not cons at all
|
- in fact relocation should not cons at all
|
||||||
|
|
|
@ -83,8 +83,7 @@ SYMBOL: label-table
|
||||||
{
|
{
|
||||||
{ [ dup compiled-xts get hash-member? ] [ drop t ] }
|
{ [ dup compiled-xts get hash-member? ] [ drop t ] }
|
||||||
{ [ dup changed-words get hash-member? ] [ drop f ] }
|
{ [ dup changed-words get hash-member? ] [ drop f ] }
|
||||||
{ [ dup compiled? ] [ drop t ] }
|
{ [ t ] [ compiled? ] }
|
||||||
{ [ t ] [ drop f ] }
|
|
||||||
} cond ;
|
} cond ;
|
||||||
|
|
||||||
: with-compiler ( quot -- )
|
: with-compiler ( quot -- )
|
||||||
|
|
|
@ -28,8 +28,10 @@ H{ } clone modules set-global
|
||||||
: module modules get hash ;
|
: module modules get hash ;
|
||||||
|
|
||||||
: load-module ( name -- )
|
: load-module ( name -- )
|
||||||
|
[
|
||||||
"Loading module " write dup write "..." print
|
"Loading module " write dup write "..." print
|
||||||
[ dup module-def run-resource ] assert-depth drop ;
|
[ dup module-def run-resource ] assert-depth drop
|
||||||
|
] no-parse-hook ;
|
||||||
|
|
||||||
: (require) ( name -- )
|
: (require) ( name -- )
|
||||||
dup module [ drop ] [ load-module ] if ;
|
dup module [ drop ] [ load-module ] if ;
|
||||||
|
|
|
@ -4,7 +4,6 @@ USING: compiler kernel math math-internals sequences test ;
|
||||||
: empty-loop-0 ( n -- )
|
: empty-loop-0 ( n -- )
|
||||||
dup 0 fixnum< [ drop ] [ 1 fixnum-fast empty-loop-0 ] if ;
|
dup 0 fixnum< [ drop ] [ 1 fixnum-fast empty-loop-0 ] if ;
|
||||||
|
|
||||||
|
|
||||||
: empty-loop-1 ( n -- )
|
: empty-loop-1 ( n -- )
|
||||||
[ ] times ;
|
[ ] times ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue