diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 26548784a3..6e3e02facc 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -25,11 +25,12 @@ - dipping seq-2nmap, seq-2each - array sort - tiled window manager -- PPC #box-float #unbox-float +- redo new compiler backend for PowerPC - weird bug uncovered during bootstrap stress-test - images saved from plugin do not work - making an image from plugin hangs - generic skip +- inference needs to be more robust with heavily recursive code + plugin: diff --git a/library/alien/c-types.factor b/library/alien/c-types.factor index 8d2efe0363..d1e619a363 100644 --- a/library/alien/c-types.factor +++ b/library/alien/c-types.factor @@ -1,8 +1,9 @@ ! Copyright (C) 2004, 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. IN: alien -USING: assembler compiler errors generic hashtables kernel lists -math namespaces parser sequences strings words ; +USING: assembler compiler compiler-backend errors generic +hashtables kernel lists math namespaces parser sequences strings +words ; : ( -- type ) [ diff --git a/library/alien/compiler.factor b/library/alien/compiler.factor index 42f477a1c5..e7a1f83a5e 100644 --- a/library/alien/compiler.factor +++ b/library/alien/compiler.factor @@ -1,8 +1,9 @@ ! Copyright (C) 2004, 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. IN: alien -USING: assembler compiler errors generic inference kernel lists -math namespaces sequences stdio strings unparser words ; +USING: assembler compiler compiler-backend errors generic +inference kernel lists math namespaces sequences stdio strings +unparser words ; ! ! ! WARNING ! ! ! ! Reloading this file into a running Factor instance on Win32 diff --git a/library/bootstrap/boot-stage3.factor b/library/bootstrap/boot-stage3.factor index bb9efe1ff0..5b76939734 100644 --- a/library/bootstrap/boot-stage3.factor +++ b/library/bootstrap/boot-stage3.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2004, 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. USING: alien assembler command-line compiler io-internals kernel -lists namespaces parser sequences stdio unparser words ; +lists math namespaces parser sequences stdio unparser words ; "Compiling base..." print @@ -31,6 +31,7 @@ init-assembler compile? [ \ car compile + \ * compile \ length compile \ = compile \ unparse compile diff --git a/library/compiler/compiler.factor b/library/compiler/compiler.factor index 000d4ba510..c24a5c1b04 100644 --- a/library/compiler/compiler.factor +++ b/library/compiler/compiler.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2004, 2005 Slava Pestov. IN: compiler -USING: errors inference kernel lists namespaces prettyprint -stdio words ; +USING: compiler-backend compiler-frontend errors inference +kernel lists namespaces prettyprint stdio words ; : supported-cpu? ( -- ? ) cpu "unknown" = not ; diff --git a/library/compiler/generator.factor b/library/compiler/generator.factor index a6556611cb..d569cb67a8 100644 --- a/library/compiler/generator.factor +++ b/library/compiler/generator.factor @@ -1,8 +1,11 @@ ! Copyright (C) 2004, 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. -IN: compiler -USING: assembler errors inference kernel lists math namespaces -sequences strings vectors words ; +IN: compiler-backend +USING: assembler compiler errors inference kernel lists math +namespaces sequences strings vectors words ; + +! Compile a VOP. +GENERIC: generate-node ( vop -- ) : generate-code ( word linear -- length ) compiled-offset >r diff --git a/library/compiler/intrinsics.factor b/library/compiler/intrinsics.factor index 29986cb7bb..ad2d719eed 100644 --- a/library/compiler/intrinsics.factor +++ b/library/compiler/intrinsics.factor @@ -1,9 +1,9 @@ ! Copyright (C) 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. -IN: compiler -USING: assembler generic hashtables inference kernel -kernel-internals lists math math-internals namespaces sequences -words ; +IN: compiler-frontend +USING: assembler compiler-backend generic hashtables inference +kernel kernel-internals lists math math-internals namespaces +sequences words ; : immediate? ( obj -- ? ) #! fixnums and f have a pointerless representation, and @@ -171,6 +171,7 @@ words ; [[ fixnum< %fixnum< ]] [[ fixnum>= %fixnum>= ]] [[ fixnum> %fixnum> ]] + [[ eq? %eq? ]] ] [ uncons over intrinsic [ literal, 0 , \ binary-op , ] make-list diff --git a/library/compiler/linearizer.factor b/library/compiler/linearizer.factor index dfec8a9ebc..4a5c799f5b 100644 --- a/library/compiler/linearizer.factor +++ b/library/compiler/linearizer.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2004, 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. -IN: compiler -USING: inference kernel lists math namespaces words strings -errors prettyprint kernel-internals ; +IN: compiler-frontend +USING: compiler-backend inference kernel lists math namespaces +words strings errors prettyprint kernel-internals ; : >linear ( node -- ) #! Dataflow OPs have a linearizer word property. This @@ -21,12 +21,6 @@ errors prettyprint kernel-internals ; #! rest is arguments. [ %prologue , (linearize) ] make-list ; -: