diff --git a/core/bootstrap/stage1.factor b/core/bootstrap/stage1.factor index 5c55bb15ca..9a0f8f9d1f 100755 --- a/core/bootstrap/stage1.factor +++ b/core/bootstrap/stage1.factor @@ -19,8 +19,13 @@ load-help? off [ [ ! Rehash hashtables, since bootstrap.image creates them - ! using the host image's hashing algorithms - [ hashtable? ] instances [ rehash ] each + ! using the host image's hashing algorithms. We don't + ! use each-object here since the catch stack isn't yet + ! set up. + begin-scan + [ hashtable? ] pusher [ (each-object) ] dip + end-scan + [ rehash ] each boot ] % diff --git a/core/cpu/ppc/bootstrap.factor b/core/cpu/ppc/bootstrap.factor index 705ddac06d..49955d9f38 100755 --- a/core/cpu/ppc/bootstrap.factor +++ b/core/cpu/ppc/bootstrap.factor @@ -14,13 +14,13 @@ big-endian on : ds-reg 14 ; : rs-reg 15 ; -: factor-area-size 4 bootstrap-cells ; +: factor-area-size ( -- n ) 4 bootstrap-cells ; -: stack-frame +: stack-frame ( -- n ) factor-area-size c-area-size + 4 bootstrap-cells align ; -: next-save stack-frame bootstrap-cell - ; -: xt-save stack-frame 2 bootstrap-cells - ; +: next-save ( -- n ) stack-frame bootstrap-cell - ; +: xt-save ( -- n ) stack-frame 2 bootstrap-cells - ; [ 0 6 LOAD32 diff --git a/core/cpu/ppc/linux/bootstrap.factor b/core/cpu/ppc/linux/bootstrap.factor index 3900ca7f88..e0f8bf0b21 100755 --- a/core/cpu/ppc/linux/bootstrap.factor +++ b/core/cpu/ppc/linux/bootstrap.factor @@ -3,8 +3,8 @@ USING: parser layouts system kernel ; IN: bootstrap.ppc -: c-area-size 10 bootstrap-cells ; -: lr-save bootstrap-cell ; +: c-area-size ( -- n ) 10 bootstrap-cells ; +: lr-save ( -- n ) bootstrap-cell ; << "resource:core/cpu/ppc/bootstrap.factor" parse-file parsed >> call diff --git a/core/cpu/ppc/macosx/bootstrap.factor b/core/cpu/ppc/macosx/bootstrap.factor index db5e3a343f..06b02d3182 100755 --- a/core/cpu/ppc/macosx/bootstrap.factor +++ b/core/cpu/ppc/macosx/bootstrap.factor @@ -3,8 +3,8 @@ USING: parser layouts system kernel ; IN: bootstrap.ppc -: c-area-size 14 bootstrap-cells ; -: lr-save 2 bootstrap-cells ; +: c-area-size ( -- n ) 14 bootstrap-cells ; +: lr-save ( -- n ) 2 bootstrap-cells ; << "resource:core/cpu/ppc/bootstrap.factor" parse-file parsed >> call diff --git a/core/memory/memory-tests.factor b/core/memory/memory-tests.factor index 2b5b1333c0..3fe1387582 100755 --- a/core/memory/memory-tests.factor +++ b/core/memory/memory-tests.factor @@ -23,3 +23,6 @@ TUPLE: testing x y z ; ] when* ] each ] unit-test + +! Erg's bug +2 [ [ [ 3 throw ] instances ] must-fail ] times diff --git a/core/memory/memory.factor b/core/memory/memory.factor index 227aa1f9dc..cb5c5bf7e4 100644 --- a/core/memory/memory.factor +++ b/core/memory/memory.factor @@ -1,17 +1,15 @@ -! Copyright (C) 2005, 2007 Slava Pestov. +! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. +USING: kernel continuations sequences arrays system ; IN: memory -USING: arrays kernel sequences vectors system hashtables -kernel.private sbufs growable assocs namespaces quotations -math strings combinators ; : (each-object) ( quot: ( obj -- ) -- ) [ next-object dup ] swap [ drop ] while ; inline : each-object ( quot -- ) - begin-scan (each-object) end-scan ; inline + begin-scan [ (each-object) ] [ end-scan ] [ ] cleanup ; inline : instances ( quot -- seq ) - pusher >r each-object r> >array ; inline + pusher [ each-object ] dip >array ; inline : save ( -- ) image save-image ; diff --git a/extra/automata/ui/ui.factor b/extra/automata/ui/ui.factor index 8dd3c7ece5..cfb0462877 100644 --- a/extra/automata/ui/ui.factor +++ b/extra/automata/ui/ui.factor @@ -72,13 +72,13 @@ DEFER: automata-window "5 - Random Rule" [ random-rule ] view-button add-gadget "n - New" [ automata-window ] view-button add-gadget - @top grid-add* + @top grid-add C[ display ] { 400 400 } >>pdim dup >slate - @center grid-add* + @center grid-add diff --git a/extra/boids/ui/ui.factor b/extra/boids/ui/ui.factor index 6d57bb32ac..064eda841b 100755 --- a/extra/boids/ui/ui.factor +++ b/extra/boids/ui/ui.factor @@ -100,72 +100,68 @@ VARS: population-label cohesion-label alignment-label separation-label ; : boids-window* ( -- ) init-variables init-world-size init-boids loop on - C[ display ] >slate - t slate> set-gadget-clipped? - { 600 400 } slate> set-slate-pdim - C[ [ run ] in-thread ] slate> set-slate-graft - C[ loop off ] slate> set-slate-ungraft - ""