Better error message when vocab top level forms leave crap on the stack

db4
Slava Pestov 2008-11-16 19:47:52 -06:00
parent 9e82f1f8dd
commit f29300c6ba
4 changed files with 10 additions and 3 deletions

View File

@ -1,9 +1,9 @@
! Unit tests for vocabs.loader vocabulary
IN: vocabs.loader.tests
USING: vocabs.loader tools.test continuations vocabs math
kernel arrays sequences namespaces io.streams.string
parser source-files words assocs classes.tuple definitions
debugger compiler.units tools.vocabs accessors eval ;
debugger compiler.units tools.vocabs accessors eval
combinators ;
! This vocab should not exist, but just in case...
[ ] [
@ -151,3 +151,8 @@ forget-junk
[ "xabbabbja" forget-vocab ] with-compilation-unit
forget-junk
[ ] [ [ "vocabs.loader.test.e" forget-vocab ] with-compilation-unit ] unit-test
[ "vocabs.loader.test.e" require ]
[ relative-overflow? ] must-fail-with

View File

@ -55,7 +55,7 @@ SYMBOL: load-help?
f over set-vocab-source-loaded?
[ vocab-source-path [ parse-file ] [ [ ] ] if* ] keep
t swap set-vocab-source-loaded?
[ % ] [ call ] if-bootstrapping ;
[ % ] [ assert-depth ] if-bootstrapping ;
: load-docs ( vocab -- vocab )
load-help? get [

View File

@ -0,0 +1 @@
1 2 3

View File

@ -0,0 +1 @@
unportable