diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index d016712149..3ce1374491 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -250,10 +250,10 @@ M:: x86.32 %unbox-large-struct ( n c-type -- ) ] with-aligned-stack ; M: x86.32 %nest-stacks ( -- ) + ! Save current frame. See comment in vm/contexts.hpp + EAX stack-reg stack-frame get total-size>> 3 cells - [+] LEA 8 [ push-vm-ptr - ! Save current frame. See comment in vm/contexts.hpp - EAX stack-reg stack-frame get total-size>> [+] LEA EAX PUSH "nest_stacks" f %alien-invoke ] with-aligned-stack ; diff --git a/basis/math/vectors/simd/functor/functor.factor b/basis/math/vectors/simd/functor/functor.factor index 514c2f62aa..fdb742a721 100644 --- a/basis/math/vectors/simd/functor/functor.factor +++ b/basis/math/vectors/simd/functor/functor.factor @@ -283,8 +283,10 @@ simd new { { +vector+ +scalar+ -> +vector+ } A-vn->v-op } { { +vector+ +literal+ -> +vector+ } A-vn->v-op } { { +vector+ +vector+ -> +scalar+ } A-vv->n-op } + { { +vector+ +vector+ -> +boolean+ } A-vv->n-op } { { +vector+ -> +vector+ } A-v->v-op } { { +vector+ -> +scalar+ } A-v->n-op } + { { +vector+ -> +boolean+ } A-v->n-op } { { +vector+ -> +nonnegative+ } A-v->n-op } } >>schema-wrappers (define-simd-128) diff --git a/basis/math/vectors/simd/simd-tests.factor b/basis/math/vectors/simd/simd-tests.factor index 71ad09e002..7803c00954 100644 --- a/basis/math/vectors/simd/simd-tests.factor +++ b/basis/math/vectors/simd/simd-tests.factor @@ -48,11 +48,6 @@ cpu x86? [ float-4{ 0 1 0 2 } [ { float-4 } declare dup v+ underlying>> double-2 boa dup v+ ] compile-call ] unit-test - - [ 33.0 ] [ - double-2{ 1 2 } double-2{ 10 20 } - [ { double-2 double-2 } declare v+ underlying>> 3.0 float* ] compile-call - ] unit-test ] when ! Fuzz testing @@ -193,22 +188,18 @@ CONSTANT: simd-classes '[ first2 inputs _ _ check-vector-op ] ] dip check-optimizer ; inline -: approx= ( x y -- ? ) +: (approx=) ( x y -- ? ) { { [ 2dup [ fp-nan? ] both? ] [ 2drop t ] } - { [ 2dup [ float? ] both? ] [ -1.e8 ~ ] } + { [ 2dup [ fp-nan? ] either? ] [ 2drop f ] } { [ 2dup [ fp-infinity? ] either? ] [ fp-bitwise= ] } - { [ 2dup [ sequence? ] both? ] [ - [ - { - { [ 2dup [ fp-nan? ] both? ] [ 2drop t ] } - { [ 2dup [ fp-infinity? ] either? ] [ fp-bitwise= ] } - { [ 2dup [ fp-nan? ] either? not ] [ -1.e8 ~ ] } - } cond - ] 2all? - ] } + { [ 2dup [ float? ] both? ] [ -1.e8 ~ ] } } cond ; +: approx= ( x y -- ? ) + 2dup [ sequence? ] both? + [ [ (approx=) ] 2all? ] [ (approx=) ] if ; + : exact= ( x y -- ? ) { { [ 2dup [ float? ] both? ] [ fp-bitwise= ] } diff --git a/basis/math/vectors/specialization/specialization.factor b/basis/math/vectors/specialization/specialization.factor index e51d8c4553..62ebecff36 100644 --- a/basis/math/vectors/specialization/specialization.factor +++ b/basis/math/vectors/specialization/specialization.factor @@ -7,13 +7,14 @@ namespaces assocs fry splitting classes.algebra generalizations locals compiler.tree.propagation.info ; IN: math.vectors.specialization -SYMBOLS: -> +vector+ +scalar+ +nonnegative+ +literal+ ; +SYMBOLS: -> +vector+ +scalar+ +boolean+ +nonnegative+ +literal+ ; : signature-for-schema ( array-type elt-type schema -- signature ) [ { { +vector+ [ drop ] } { +scalar+ [ nip ] } + { +boolean+ [ 2drop boolean ] } { +nonnegative+ [ nip ] } { +literal+ [ 2drop f ] } } case @@ -32,6 +33,7 @@ SYMBOLS: -> +vector+ +scalar+ +nonnegative+ +literal+ ; { { +vector+ [ drop <class-info> ] } { +scalar+ [ nip <class-info> ] } + { +boolean+ [ 2drop boolean <class-info> ] } { +nonnegative+ [ @@ -115,9 +117,9 @@ H{ { v> { +vector+ +vector+ -> +vector+ } } { v>= { +vector+ +vector+ -> +vector+ } } { vunordered? { +vector+ +vector+ -> +vector+ } } - { vany? { +vector+ -> +scalar+ } } - { vall? { +vector+ -> +scalar+ } } - { vnone? { +vector+ -> +scalar+ } } + { vany? { +vector+ -> +boolean+ } } + { vall? { +vector+ -> +boolean+ } } + { vnone? { +vector+ -> +boolean+ } } } PREDICATE: vector-word < word vector-words key? ; diff --git a/extra/typed/authors.txt b/basis/typed/authors.txt similarity index 100% rename from extra/typed/authors.txt rename to basis/typed/authors.txt diff --git a/extra/typed/debugger/debugger.factor b/basis/typed/debugger/debugger.factor similarity index 100% rename from extra/typed/debugger/debugger.factor rename to basis/typed/debugger/debugger.factor diff --git a/extra/typed/prettyprint/prettyprint.factor b/basis/typed/prettyprint/prettyprint.factor similarity index 100% rename from extra/typed/prettyprint/prettyprint.factor rename to basis/typed/prettyprint/prettyprint.factor diff --git a/extra/typed/summary.txt b/basis/typed/summary.txt similarity index 100% rename from extra/typed/summary.txt rename to basis/typed/summary.txt diff --git a/extra/typed/typed-docs.factor b/basis/typed/typed-docs.factor similarity index 100% rename from extra/typed/typed-docs.factor rename to basis/typed/typed-docs.factor diff --git a/extra/typed/typed-tests.factor b/basis/typed/typed-tests.factor similarity index 100% rename from extra/typed/typed-tests.factor rename to basis/typed/typed-tests.factor diff --git a/extra/typed/typed.factor b/basis/typed/typed.factor similarity index 100% rename from extra/typed/typed.factor rename to basis/typed/typed.factor diff --git a/extra/terrain/deploy.factor b/extra/terrain/deploy.factor index c27e7b3c84..42e2fd68ab 100644 --- a/extra/terrain/deploy.factor +++ b/extra/terrain/deploy.factor @@ -5,7 +5,7 @@ H{ { deploy-c-types? f } { deploy-unicode? f } { deploy-io 2 } - { deploy-reflection 2 } + { deploy-reflection 1 } { "stop-after-last-window?" t } { deploy-word-props? f } { deploy-math? t }