diff --git a/basis/bootstrap/compiler/compiler.factor b/basis/bootstrap/compiler/compiler.factor index 2ee4cf0644..cc6b4d1e81 100755 --- a/basis/bootstrap/compiler/compiler.factor +++ b/basis/bootstrap/compiler/compiler.factor @@ -35,7 +35,7 @@ nl roll -roll declare not array? hashtable? vector? - tuple? sbuf? node? tombstone? + tuple? sbuf? tombstone? array-nth set-array-nth diff --git a/basis/compiler/compiler.factor b/basis/compiler/compiler.factor index 9c0e9e1d82..a15c5b9b8f 100755 --- a/basis/compiler/compiler.factor +++ b/basis/compiler/compiler.factor @@ -2,8 +2,9 @@ ! See http://factorcode.org/license.txt for BSD license. USING: kernel namespaces arrays sequences io debugger words compiler.units continuations vocabs assocs dlists definitions -math compiler.errors threads graphs generic combinators dequeues -search-dequeues ; +math threads graphs generic combinators dequeues search-dequeues +stack-checker stack-checker.state compiler.generator +compiler.errors compiler.tree.builder compiler.tree.optimizer ; IN: compiler SYMBOL: +failed+ @@ -51,8 +52,8 @@ SYMBOL: +failed+ { [ compile-begins ] [ - [ word-dataflow ] [ compile-failed return ] recover - optimize + [ build-tree-from-word ] [ compile-failed return ] recover + optimize-tree ] [ dup generate ] [ compile-succeeded ] diff --git a/basis/compiler/generator/registers/registers.factor b/basis/compiler/generator/registers/registers.factor index dc32afb264..064f027531 100755 --- a/basis/compiler/generator/registers/registers.factor +++ b/basis/compiler/generator/registers/registers.factor @@ -1,10 +1,10 @@ -! Copyright (C) 2006, 2007 Slava Pestov. +! Copyright (C) 2006, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: arrays assocs classes classes.private classes.algebra -combinators cpu.architecture generator.fixup hashtables kernel -layouts math namespaces quotations sequences system vectors -words effects alien byte-arrays -accessors sets math.order ; +combinators hashtables kernel layouts math namespaces quotations +sequences system vectors words effects alien byte-arrays +accessors sets math.order cpu.architecture +compiler.generator.fixup ; IN: compiler.generator.registers SYMBOL: +input+ diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index 8a7413cfef..5c81636789 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -4,7 +4,7 @@ USING: alien.c-types arrays cpu.x86.assembler cpu.x86.architecture cpu.x86.intrinsics cpu.x86.allot cpu.architecture kernel kernel.private math namespaces sequences compiler.generator.registers compiler.generator.fixup -compiler.generator system layouts alien.compiler combinators +compiler.generator system layouts combinators command-line compiler compiler.units io vocabs.loader accessors init ; IN: cpu.x86.32 diff --git a/basis/cpu/x86/intrinsics/intrinsics.factor b/basis/cpu/x86/intrinsics/intrinsics.factor index f69be2edfd..203fe7ac67 100755 --- a/basis/cpu/x86/intrinsics/intrinsics.factor +++ b/basis/cpu/x86/intrinsics/intrinsics.factor @@ -289,45 +289,45 @@ IN: cpu.x86.intrinsics { +clobber+ { "n" } } } define-intrinsic -\ (tuple) [ - tuple "layout" get size>> 2 + cells [ - ! Store layout - "layout" get "scratch" get load-literal - 1 object@ "scratch" operand MOV - ! Store tagged ptr in reg - "tuple" get tuple %store-tagged - ] %allot -] H{ - { +input+ { { [ ] "layout" } } } - { +scratch+ { { f "tuple" } { f "scratch" } } } - { +output+ { "tuple" } } -} define-intrinsic - -\ (array) [ - array "n" get 2 + cells [ - ! Store length - 1 object@ "n" operand MOV - ! Store tagged ptr in reg - "array" get object %store-tagged - ] %allot -] H{ - { +input+ { { [ ] "n" } } } - { +scratch+ { { f "array" } } } - { +output+ { "array" } } -} define-intrinsic - -\ (byte-array) [ - byte-array "n" get 2 cells + [ - ! Store length - 1 object@ "n" operand MOV - ! Store tagged ptr in reg - "array" get object %store-tagged - ] %allot -] H{ - { +input+ { { [ ] "n" } } } - { +scratch+ { { f "array" } } } - { +output+ { "array" } } -} define-intrinsic +! \ (tuple) [ +! tuple "layout" get size>> 2 + cells [ +! ! Store layout +! "layout" get "scratch" get load-literal +! 1 object@ "scratch" operand MOV +! ! Store tagged ptr in reg +! "tuple" get tuple %store-tagged +! ] %allot +! ] H{ +! { +input+ { { [ ] "layout" } } } +! { +scratch+ { { f "tuple" } { f "scratch" } } } +! { +output+ { "tuple" } } +! } define-intrinsic +! +! \ (array) [ +! array "n" get 2 + cells [ +! ! Store length +! 1 object@ "n" operand MOV +! ! Store tagged ptr in reg +! "array" get object %store-tagged +! ] %allot +! ] H{ +! { +input+ { { [ ] "n" } } } +! { +scratch+ { { f "array" } } } +! { +output+ { "array" } } +! } define-intrinsic +! +! \ (byte-array) [ +! byte-array "n" get 2 cells + [ +! ! Store length +! 1 object@ "n" operand MOV +! ! Store tagged ptr in reg +! "array" get object %store-tagged +! ] %allot +! ] H{ +! { +input+ { { [ ] "n" } } } +! { +scratch+ { { f "array" } } } +! { +output+ { "array" } } +! } define-intrinsic \ [ ratio 3 cells [ diff --git a/unfinished/stack-checker/alien/alien.factor b/basis/stack-checker/alien/alien.factor similarity index 100% rename from unfinished/stack-checker/alien/alien.factor rename to basis/stack-checker/alien/alien.factor