Compiler fixes

slava 2006-08-18 05:35:04 +00:00
parent 500b97708f
commit b4683b1985
4 changed files with 14 additions and 7 deletions

View File

@ -12,7 +12,6 @@
- roundoff is still not quite right with tracks
- fix top level window positioning
- fix contribs: boids, automata
- graphical module manager tool
- see if alien calls can be made faster
- sometimes darcs get fails with the httpd
- gdb triggers 'mutliple i/o ops on port' error
@ -52,6 +51,7 @@
+ ui:
- graphical module manager tool
- figure out what goes in the .app and what doesn't
- should be possible to drop an image file on the .app to run it
- the UI listener has a shitty design. perhaps it should not call out
@ -98,6 +98,8 @@
+ compiler/ffi:
- compiler tests are not as reliable now because of try-compile usage
- we can just do [ t ] [ \ foo compiled? ] unit-test
- [ [ dup call ] dup call ] infer hangs
- callstack overflow when compiling mutually recursive inline words
- test what is done in the case of an invalid declaration on an inline
@ -119,8 +121,6 @@
+ misc:
- compiler tests are not as reliable now because of try-compile usage
- we can just do [ t ] [ \ foo compiled? ] unit-test
- growable data heap
- incremental GC
- UDP

View File

@ -5,10 +5,17 @@ USING: errors generic hashtables inference io kernel math
namespaces optimizer parser prettyprint sequences test threads
words ;
: word-dataflow ( word -- dataflow )
[
dup dup add-recursive-state
dup specialized-def (dataflow)
swap current-effect check-effect
] with-infer ;
: (compile) ( word -- )
dup compiling? not over compound? and [
"Compiling " write dup . flush
dup specialized-def dataflow optimize generate
dup word-dataflow optimize generate
] [
drop
] if ;

View File

@ -158,7 +158,7 @@ M: symbol apply-object apply-literal ;
#! Handle a recursive call, by either applying a previously
#! inferred base case, or raising an error. If the recursive
#! call is to a local block, emit a label call node.
dup "infer-effect" word-prop [ ] [ declared-effect ] if ;
dup "infer-effect" word-prop [ ] [ declared-effect ] ?if ;
M: compound apply-object
#! Apply the word's stack effect to the inferencer state.

View File

@ -135,7 +135,7 @@ USE: optimizer
[ class-compare ] sort min-class
] unit-test
GENERIC: xyz
GENERIC: xyz ( obj -- obj )
M: array xyz xyz ;
[ ] [ \ xyz compile ] unit-test
@ -220,7 +220,7 @@ TUPLE: pred-test ;
[ 0 ] [ 10 double-label-2 ] unit-test
! regression
GENERIC: void-generic
GENERIC: void-generic ( obj -- * )
: breakage "hi" void-generic ;
[ ] [ \ breakage compile ] unit-test
[ breakage ] unit-test-fails