Smarter FORGET:
commit
c738dee88e
|
@ -5,10 +5,7 @@ USING: alien arrays byte-arrays generic hashtables
|
|||
hashtables.private io kernel math namespaces parser sequences
|
||||
strings vectors words quotations assocs layouts classes tuples
|
||||
kernel.private vocabs vocabs.loader source-files definitions
|
||||
slots classes.union words.private compiler.units ;
|
||||
|
||||
! Some very tricky code creating a bootstrap embryo in the
|
||||
! host image.
|
||||
slots classes.union compiler.units ;
|
||||
|
||||
"Creating primitives and basic runtime structures..." print flush
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ SYMBOL: with-compiler-errors?
|
|||
|
||||
: compiler-error ( error word -- )
|
||||
with-compiler-errors? get [
|
||||
compiler-errors get set-at
|
||||
compiler-errors get pick
|
||||
[ set-at ] [ delete-at drop ] if
|
||||
] [ 2drop ] if ;
|
||||
|
||||
: compiler-error. ( error word -- )
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: bootstrap.image.private kernel namespaces system
|
||||
cpu.ppc.assembler generator.fixup compiler.constants math
|
||||
layouts words vocabs ;
|
||||
cpu.ppc.assembler generator.fixup compiler.units
|
||||
compiler.constants math layouts words vocabs ;
|
||||
IN: bootstrap.ppc
|
||||
|
||||
4 \ cell set
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
! Copyright (C) 2007 Slava Pestov.
|
||||
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: bootstrap.image.private kernel namespaces system
|
||||
cpu.x86.assembler layouts compiler.units math generator.fixup
|
||||
|
|
|
@ -157,7 +157,11 @@ IN: bootstrap.syntax
|
|||
[ construct-boa ] curry define-inline
|
||||
] define-syntax
|
||||
|
||||
"FORGET:" [ scan use get assoc-stack forget ] define-syntax
|
||||
"FORGET:" [
|
||||
scan-word
|
||||
dup parsing? [ V{ } clone swap execute first ] when
|
||||
forget
|
||||
] define-syntax
|
||||
|
||||
"(" [
|
||||
parse-effect word
|
||||
|
|
Loading…
Reference in New Issue