From db8827d86c211705e3a0a4069e4843ab66c29678 Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 30 Sep 2006 04:03:46 +0000 Subject: [PATCH] Dataflow visualizer fixes --- TODO.FACTOR.txt | 30 ++++++++++------------ library/compiler/inference/dataflow.factor | 2 +- library/ui/tools/dataflow.factor | 2 +- library/ui/tools/operations.factor | 22 +++++++++++----- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index d769b82c4e..6c667a998f 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,19 +1,13 @@ - auto-invoke code gc -- code gc sig11 -- cocoa: support real redefinition -- fix this: - [ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 ] . -[ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 -] -- prettier printing of hashtable literals, alists, cond, ... -- ui quick start doc -- x11: scroll up/down wiggles caret -- slider needs to be modelized -- more compact relocation info -- hashed generic method dispatch +- signal 4 on datastack underflow on mac intel?? +- fix alien-callback/SEH bug on win32 + ui: +- nested presentation mouse over is not right +- ui quick start doc +- x11: scroll up/down wiggles caret +- slider needs to be modelized - [ ] write in the UI breaks stuff - some way of intercepting all gestures - pane output in UI should use less memory @@ -28,7 +22,6 @@ - keyboard navigation - ui browser: show currently selected vocab & words - keyboard-navigatable list gadget of some kind -- tuple= in dataflow view - auto-update browser and help when sources reload - how do we refer to command shortcuts in the docs? - figure out if we need both set-model and set-model* @@ -43,7 +36,6 @@ - double/triple click - autoscroll - transpose char/word/line - - drag scroll - more efficient multi-line inserts - write "foo| " and put caret at | then select word element: selects space @@ -77,6 +69,8 @@ + compiler/ffi: +- more compact relocation info +- cocoa: support real redefinition - problem if major gc happens during relocation - in fact relocation should not cons at all - stdcall callbacks @@ -102,8 +96,12 @@ + misc: -- signal 4 on datastack underflow on mac intel?? -- fix alien-callback/SEH bug on win32 +- hashed generic method dispatch +- fix this: + [ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 ] . +[ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 +] +- prettier printing of hashtable literals, alists, cond, ... - minor GC takes too long now, we should card mark code heap - buffer-ptr should be an alien - swap nappend ==> nappend diff --git a/library/compiler/inference/dataflow.factor b/library/compiler/inference/dataflow.factor index dc08244ba1..fd4212da29 100644 --- a/library/compiler/inference/dataflow.factor +++ b/library/compiler/inference/dataflow.factor @@ -96,7 +96,7 @@ C: #dispatch make-node ; TUPLE: #merge ; C: #merge make-node ; -: #merge ( -- node ) meta-d get clone out-node <#merge> ; +: #merge ( -- node ) meta-d-node <#merge> ; TUPLE: #terminate ; C: #terminate make-node ; diff --git a/library/ui/tools/dataflow.factor b/library/ui/tools/dataflow.factor index 29203aaaf1..a31600e4e8 100644 --- a/library/ui/tools/dataflow.factor +++ b/library/ui/tools/dataflow.factor @@ -148,9 +148,9 @@ DEFER: (compute-heights) : (compute-heights) ( node -- ) [ d-height get over 2array , - dup compute-child-heights dup node-out-d length over node-in-d length - d-height [ + ] change + dup compute-child-heights node-successor (compute-heights) ] when* ; diff --git a/library/ui/tools/operations.factor b/library/ui/tools/operations.factor index 53e99bcdc5..6a944e1834 100644 --- a/library/ui/tools/operations.factor +++ b/library/ui/tools/operations.factor @@ -105,6 +105,12 @@ M: operation invoke-command ( target operation -- ) { +listener+ t } } define-operation +[ word? ] H{ + { +name+ "Word dataflow" } + { +keyboard+ T{ key-down f { A+ } "d" } } + { +quot+ [ word-def show-dataflow ] } +} define-operation + ! Vocabularies [ vocab-link? ] H{ { +mouse+ T{ button-up f f 1 } } @@ -166,7 +172,7 @@ M: operation invoke-command ( target operation -- ) } define-operation [ quotation? ] H{ - { +name+ "Dataflow" } + { +name+ "Quotation dataflow" } { +keyboard+ T{ key-down f { C+ A+ } "d" } } { +quot+ [ show-dataflow ] } { +listener+ t } @@ -187,18 +193,20 @@ M: operation invoke-command ( target operation -- ) } define-operation ! Dataflow nodes -[ word? ] H{ - { +name+ "Dataflow" } - { +keyboard+ T{ key-down f { A+ } "d" } } - { +quot+ [ word-def show-dataflow ] } -} define-operation [ [ node? ] is? ] H{ { +mouse+ T{ button-up f f 1 } } - { +name+ "Quotation dataflow" } + { +name+ "Show dataflow" } { +quot+ [ dataflow-gadget call-tool ] } } define-operation +[ [ node? ] is? ] H{ + { +mouse+ T{ button-up f { S+ } 3 } } + { +name+ "Inspect" } + { +quot+ [ inspect ] } + { +listener+ t } +} define-operation + ! Define commands in terms of operations ! Tile commands