More load fixes
parent
56d272df9e
commit
a5ff214d67
|
@ -35,7 +35,7 @@ nl
|
||||||
roll -roll declare not
|
roll -roll declare not
|
||||||
|
|
||||||
array? hashtable? vector?
|
array? hashtable? vector?
|
||||||
tuple? sbuf? node? tombstone?
|
tuple? sbuf? tombstone?
|
||||||
|
|
||||||
array-nth set-array-nth
|
array-nth set-array-nth
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel namespaces arrays sequences io debugger words
|
USING: kernel namespaces arrays sequences io debugger words
|
||||||
compiler.units continuations vocabs assocs dlists definitions
|
compiler.units continuations vocabs assocs dlists definitions
|
||||||
math compiler.errors threads graphs generic combinators dequeues
|
math threads graphs generic combinators dequeues search-dequeues
|
||||||
search-dequeues ;
|
stack-checker stack-checker.state compiler.generator
|
||||||
|
compiler.errors compiler.tree.builder compiler.tree.optimizer ;
|
||||||
IN: compiler
|
IN: compiler
|
||||||
|
|
||||||
SYMBOL: +failed+
|
SYMBOL: +failed+
|
||||||
|
@ -51,8 +52,8 @@ SYMBOL: +failed+
|
||||||
{
|
{
|
||||||
[ compile-begins ]
|
[ compile-begins ]
|
||||||
[
|
[
|
||||||
[ word-dataflow ] [ compile-failed return ] recover
|
[ build-tree-from-word ] [ compile-failed return ] recover
|
||||||
optimize
|
optimize-tree
|
||||||
]
|
]
|
||||||
[ dup generate ]
|
[ dup generate ]
|
||||||
[ compile-succeeded ]
|
[ compile-succeeded ]
|
||||||
|
|
|
@ -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.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays assocs classes classes.private classes.algebra
|
USING: arrays assocs classes classes.private classes.algebra
|
||||||
combinators cpu.architecture generator.fixup hashtables kernel
|
combinators hashtables kernel layouts math namespaces quotations
|
||||||
layouts math namespaces quotations sequences system vectors
|
sequences system vectors words effects alien byte-arrays
|
||||||
words effects alien byte-arrays
|
accessors sets math.order cpu.architecture
|
||||||
accessors sets math.order ;
|
compiler.generator.fixup ;
|
||||||
IN: compiler.generator.registers
|
IN: compiler.generator.registers
|
||||||
|
|
||||||
SYMBOL: +input+
|
SYMBOL: +input+
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien.c-types arrays cpu.x86.assembler
|
||||||
cpu.x86.architecture cpu.x86.intrinsics cpu.x86.allot
|
cpu.x86.architecture cpu.x86.intrinsics cpu.x86.allot
|
||||||
cpu.architecture kernel kernel.private math namespaces sequences
|
cpu.architecture kernel kernel.private math namespaces sequences
|
||||||
compiler.generator.registers compiler.generator.fixup
|
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
|
command-line compiler compiler.units io vocabs.loader accessors
|
||||||
init ;
|
init ;
|
||||||
IN: cpu.x86.32
|
IN: cpu.x86.32
|
||||||
|
|
|
@ -289,45 +289,45 @@ IN: cpu.x86.intrinsics
|
||||||
{ +clobber+ { "n" } }
|
{ +clobber+ { "n" } }
|
||||||
} define-intrinsic
|
} define-intrinsic
|
||||||
|
|
||||||
\ (tuple) [
|
! \ (tuple) [
|
||||||
tuple "layout" get size>> 2 + cells [
|
! tuple "layout" get size>> 2 + cells [
|
||||||
! Store layout
|
! ! Store layout
|
||||||
"layout" get "scratch" get load-literal
|
! "layout" get "scratch" get load-literal
|
||||||
1 object@ "scratch" operand MOV
|
! 1 object@ "scratch" operand MOV
|
||||||
! Store tagged ptr in reg
|
! ! Store tagged ptr in reg
|
||||||
"tuple" get tuple %store-tagged
|
! "tuple" get tuple %store-tagged
|
||||||
] %allot
|
! ] %allot
|
||||||
] H{
|
! ] H{
|
||||||
{ +input+ { { [ ] "layout" } } }
|
! { +input+ { { [ ] "layout" } } }
|
||||||
{ +scratch+ { { f "tuple" } { f "scratch" } } }
|
! { +scratch+ { { f "tuple" } { f "scratch" } } }
|
||||||
{ +output+ { "tuple" } }
|
! { +output+ { "tuple" } }
|
||||||
} define-intrinsic
|
! } define-intrinsic
|
||||||
|
!
|
||||||
\ (array) [
|
! \ (array) [
|
||||||
array "n" get 2 + cells [
|
! array "n" get 2 + cells [
|
||||||
! Store length
|
! ! Store length
|
||||||
1 object@ "n" operand MOV
|
! 1 object@ "n" operand MOV
|
||||||
! Store tagged ptr in reg
|
! ! Store tagged ptr in reg
|
||||||
"array" get object %store-tagged
|
! "array" get object %store-tagged
|
||||||
] %allot
|
! ] %allot
|
||||||
] H{
|
! ] H{
|
||||||
{ +input+ { { [ ] "n" } } }
|
! { +input+ { { [ ] "n" } } }
|
||||||
{ +scratch+ { { f "array" } } }
|
! { +scratch+ { { f "array" } } }
|
||||||
{ +output+ { "array" } }
|
! { +output+ { "array" } }
|
||||||
} define-intrinsic
|
! } define-intrinsic
|
||||||
|
!
|
||||||
\ (byte-array) [
|
! \ (byte-array) [
|
||||||
byte-array "n" get 2 cells + [
|
! byte-array "n" get 2 cells + [
|
||||||
! Store length
|
! ! Store length
|
||||||
1 object@ "n" operand MOV
|
! 1 object@ "n" operand MOV
|
||||||
! Store tagged ptr in reg
|
! ! Store tagged ptr in reg
|
||||||
"array" get object %store-tagged
|
! "array" get object %store-tagged
|
||||||
] %allot
|
! ] %allot
|
||||||
] H{
|
! ] H{
|
||||||
{ +input+ { { [ ] "n" } } }
|
! { +input+ { { [ ] "n" } } }
|
||||||
{ +scratch+ { { f "array" } } }
|
! { +scratch+ { { f "array" } } }
|
||||||
{ +output+ { "array" } }
|
! { +output+ { "array" } }
|
||||||
} define-intrinsic
|
! } define-intrinsic
|
||||||
|
|
||||||
\ <ratio> [
|
\ <ratio> [
|
||||||
ratio 3 cells [
|
ratio 3 cells [
|
||||||
|
|
Loading…
Reference in New Issue