diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index ad382dbd56..09ba0e4eb3 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,6 +1,5 @@ + 0.84: -- fix amd64 backend - fix contribs: boids, automata - sometimes darcs get fails with the httpd - gdb triggers 'mutliple i/o ops on port' error @@ -67,6 +66,7 @@ - variable width word wrap - slider needs to be modelized - structure editor +- listener tab completion + module system: @@ -87,6 +87,7 @@ + compiler/ffi: +- more compact relocation info - UI dataflow visualizer - ppc64 backend - we need to optimize [ dup array? [ array? ] [ array? ] if ] diff --git a/library/compiler/compiler.factor b/library/compiler/compiler.factor index 105b338c2e..afa192b4fd 100644 --- a/library/compiler/compiler.factor +++ b/library/compiler/compiler.factor @@ -5,19 +5,15 @@ USING: errors hashtables inference io kernel math namespaces optimizer prettyprint sequences test threads words ; : (compile) ( word -- ) - dup specialized-def dataflow optimize generate ; - -: inform-compile ( word -- ) "Compiling " write . flush ; - -: compile-postponed ( -- ) - compile-words get dup empty? [ - drop + dup compiling? not over compound? and [ + "Compiling " write dup . flush + dup specialized-def dataflow optimize generate ] [ - pop dup inform-compile (compile) compile-postponed + drop ] if ; : compile ( word -- ) - [ postpone-word compile-postponed ] with-compiler ; + [ (compile) ] with-compiler ; : compiled ( -- ) "compile" get [ word compile ] when ; parsing @@ -31,8 +27,6 @@ optimizer prettyprint sequences test threads words ; : compile-all ( -- ) vocabs compile-vocabs ; -: recompile ( word -- ) dup update-xt compile ; - : compile-quot ( quot -- word ) define-temp "compile" get [ dup compile ] when ; diff --git a/library/compiler/compiler.facts b/library/compiler/compiler.facts index 89b5b5c0b4..c215a8b1c8 100644 --- a/library/compiler/compiler.facts +++ b/library/compiler/compiler.facts @@ -27,10 +27,6 @@ HELP: compile-vocabs "( seq -- )" HELP: compile-all "( -- )" { $description "Compile all words in the dictionary which have not already been compiled. Compile errors are logged to the default stream." } ; -HELP: recompile "( word -- )" -{ $values { "word" "a word" } } -{ $description "Compiles a word, discarding a previous compiled definition first." } ; - HELP: compile-quot "( quot -- word )" { $values { "quot" "a quotation" } { "word" "a new, uninterned word" } } { $description "Creates a new uninterned word having the given quotation as its definition, and compiles it. The returned word can be passed to " { $link execute } "." } diff --git a/library/compiler/generator/generator.factor b/library/compiler/generator/generator.factor index 3ed77b1780..5a40cb136e 100644 --- a/library/compiler/generator/generator.factor +++ b/library/compiler/generator/generator.factor @@ -42,8 +42,7 @@ UNION: #terminal : init-generator ( -- ) V{ } clone relocation-table set V{ } clone literal-table set - V{ } clone label-table set - V{ } clone label-relocation-table set ; + V{ } clone label-table set ; : generate-1 ( word node quot -- | quot: node -- ) #! Generate the code, then dump three vectors to pass to diff --git a/library/compiler/generator/xt.factor b/library/compiler/generator/xt.factor index ef6351d757..ca415e11d9 100644 --- a/library/compiler/generator/xt.factor +++ b/library/compiler/generator/xt.factor @@ -5,16 +5,13 @@ USING: arrays assembler errors generic hashtables kernel kernel-internals math namespaces prettyprint queues sequences strings vectors words ; +DEFER: (compile) + : compiled-offset ( -- n ) building get length code-format * ; -TUPLE: label # offset ; +TUPLE: label offset ; -SYMBOL: label-table - -: push-label ( label -- ) - label-table get dup length pick set-label-# push ; - -C: label ( -- label ) dup push-label ; +C: label ( -- label ) ; : define-label ( name -- )