Hi Slava, For some reason I couldn't get the inline_gc to work with VM_C_API, so as a stop-gap to get things working on macosx-32 I've implemented inline_gc with regparm(3):
http://github.com/phildawes/factor/commits/fix_stack_alignment In case you're interested, I've also pushed the branch with my broken VM_C_API inline_gc patch on top (just differs by the top patch): http://github.com/phildawes/factor/commits/fix_stack_alignment_VM_C_API_broken Am I doing something obviously stupid?: +M:: x86.32 %call-gc ( gc-root-count -- ) + 12 [ + push-vm-ptr + ! Pass number of roots as second parameter + temp-reg gc-root-count MOV + temp-reg PUSH + ! Pass pointer to start of GC roots as first parameter + temp-reg gc-root-base param@ LEA + temp-reg PUSH + ! Call GC + "inline_gc" f %alien-invoke + ] with-aligned-stack ; (win32 bootstrap compilation error pasted below) Many thanks, Phil [..skip bootstrap loading lines..] Compiling..................................Loading vocab:bootstrap/bootstrap-error.factor [ [ ~quotation~ dip dip ] dip -> [ in>> length ] [ out>> length ] [ ] tri [ check-datastack ] dip [ wrong-values ] curry unless ] [ swap [ call ] dip -> ] [ swap >c call -> c> drop ] [ millis default-image-name "output-image" set-global "math compiler threads help io tools ui ui.tools unicode handbook" "include" set-global "" "exclude" set-global strip-encodings (command-line) parse-command-line os wince? [ "windows.ce" require ] when os winnt? [ "windows.nt" require ] when "staging" get "deploy-vocab" get or [ "stage2: deployment mode" print ] [ "debugger" require "inspector" require "tools.errors" require "listener" require "none" require ] if load-components -> millis over - core-bootstrap-time set-global run-bootstrap-init f error set-global f error-continuation set-global millis swap - bootstrap-time set-global print-report "deploy-vocab" get [ "tools.deploy.shaker" run ] [ "staging" get ~quotation~ ~quotation~ if "output-image" get save-image-and-exit ] if ] [ iterate-step -> iterate-next (each-integer) ] [ -roll [ call ] 3dip -> ] [ load-vocab -> drop ] [ [ ~quotation~ dip dip ] dip -> [ in>> length ] [ out>> length ] [ ] tri [ check-datastack ] dip [ wrong-values ] curry unless ] [ swap [ call ] dip -> ] [ swap >c call -> c> drop ] [ dup source-loaded?>> [ dup load-source ] unless -> dup docs-loaded?>> [ dup load-docs ] unless ] [ [ compose ~quotation~ curry recover ] [ drop ] 2bi -> call ] [ [ 2keep ] dip -> call ] [ -rot [ call ] 2dip -> ] [ swap >c call -> c> drop ] [ +parsing+ >>source-loaded? dup vocab-source-path [ parse-file ] [ ~quotation~ ] if* [ +parsing+ >>source-loaded? ] dip [ % ] [ (( -- )) call-effect ] if-bootstrapping -> +done+ >>source-loaded? drop ] [ [ ~quotation~ dip dip ] dip -> [ in>> length ] [ out>> length ] [ ] tri [ check-datastack ] dip [ wrong-values ] curry unless ] [ swap [ call ] dip -> ] [ nl "Compiling..." write flush { not ? 2over roll -roll array? hashtable? vector? tuple? sbuf? tombstone? curry? compose? callable? quotation? curry compose uncurry array-nth set-array-nth length>> wrap probe namestack* layout-of } compile-unoptimized "." write flush { bitand bitor bitxor bitnot } compile-unoptimized "." write flush { + 2/ < <= > >= shift } compile-unoptimized "." write flush { new-sequence nth push pop last flip } compile-unoptimized "." write flush { hashcode* = equal? assoc-stack (assoc-stack) get set } compile-unoptimized "." write flush { memq? split harvest sift cut cut-slice start index clone set-at reverse push-all class number>string string>number like clone-like } compile-unoptimized "." write flush { lines prefix suffix unclip new-assoc update word-prop set-word-prop 1array 2array 3array ?nth } compile-unoptimized "." write flush { malloc calloc free memcpy } compile-unoptimized "." write flush vocabs [ words compile-unoptimized "." write flush ] each -> " done" print flush ] [ iterate-step -> iterate-next (each-integer) ] [ -roll [ call ] 3dip -> ] [ words compile-unoptimized -> "." write flush ] [ recompile -> modify-code-heap ] [ [ <hashed-dlist> compile-queue set ~hashtable~ clone compiled set ~quotation~ each compile-queue get compile-loop compiled get >alist ] with-scope -> "trace-compilation" get [ "--- compile done" print flush ] when ] [ swap >n call -> ndrop ] [ <hashed-dlist> compile-queue set H{ } clone compiled set [ ~quotation~ ~quotation~ bi ] each compile-queue get compile-loop -> compiled get >alist ] [ [ call ] keep -> [ loop ] curry when ] [ over [ call ] dip -> ] [ uncompose [ call ] dip -> call ] [ compile-word -> yield-hook get (( -- )) call-effect ] [ swap >n call -> ndrop ] [ iterate-step -> iterate-next (each-integer) ] [ -roll [ call ] 3dip -> ] [ iterate-step -> iterate-next (each-integer) ] [ -roll [ call ] 3dip -> ] [ [ optimize-cfg build-mr ] with-cfg -> generate save-asm ] [ swap >n call -> ndrop ] [ insert-gc-checks insert-save-contexts linear-scan -> flatten-cfg build-stack-frame ] [ 2 load-locals -1 get-local compute-live-sets -1 get-local number-instructions -1 get-local compute-live-intervals 0 get-local allocate-registers -1 get-local assign-registers -> -1 get-local resolve-data-flow -1 get-local 2 drop-locals check-numbering ] [ iterate-step -> iterate-next (each-integer) ] [ -roll [ call ] 3dip -> ] [ 1 load-locals 0 get-local 0 get-local [ 1 load-locals 0 get-local ~quotation~ curry ~vector~ 1 drop-locals make ] curry change-instructions -> 1 drop-locals drop ] [ over [ ~quotation~ dip call ] dip -> swap >>instructions ] [ swap >n call -> ndrop ] [ [ 100 swap new-resizable ~quotation~ keep ] keep -> like ] [ over [ call ] dip -> ] [ over [ call ] dip -> ] [ 1 load-locals 0 get-local begin-block -> [ ~quotation~ keep ~quotation~ keep ~quotation~ keep ~quotation~ keep drop ] each 0 get-local 1 drop-locals end-block ] [ dup basic-block set dup block-from activate-new-intervals [ live-in vregs>regs ] keep -> register-live-ins get set-at ] [ over [ call ] dip -> ] [ [ ~quotation~ compose ~vector~ assoc>map ] dip -> assoc-like ] [ [ accumulator ~quotation~ dip ] dip -> like ] [ accumulator [ assoc-each ] dip -> ] [ iterate-step -> iterate-next (each-integer) ] [ -roll [ call ] 3dip -> ] [ uncompose [ call ] dip -> call ] [ uncompose [ call ] dip -> call ] [ 63 getenv error-thread set-global continuation -> error-continuation set-global rethrow ] bad-vreg vreg 89870 ( scratchpad ) ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
