From ab689c098b0db66e6980f43829ec5eb9c4b60e40 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 24 Nov 2008 08:16:14 -0600 Subject: [PATCH] Clean up direct literal code and make a first attempt at PowerPC support --- basis/bootstrap/image/image.factor | 9 +++---- basis/compiler/cfg/def-use/def-use.factor | 7 ++++-- basis/compiler/cfg/hats/hats.factor | 6 ++--- .../cfg/instructions/instructions.factor | 6 ++--- .../value-numbering/rewrite/rewrite.factor | 11 +++++---- .../value-numbering-tests.factor | 21 ++++++++++++---- basis/compiler/codegen/codegen.factor | 3 ++- basis/compiler/codegen/fixup/fixup.factor | 3 --- basis/compiler/constants/constants.factor | 13 +++++----- basis/cpu/architecture/architecture.factor | 6 ++--- basis/cpu/ppc/bootstrap.factor | 15 +++--------- basis/cpu/ppc/ppc.factor | 6 ++--- basis/cpu/x86/32/32.factor | 2 -- basis/cpu/x86/64/64.factor | 2 -- basis/cpu/x86/bootstrap.factor | 24 +++++++------------ basis/cpu/x86/x86.factor | 16 ++++++------- vm/code_heap.c | 2 -- vm/code_heap.h | 2 -- vm/quotations.c | 6 ++--- vm/run.h | 3 +-- 20 files changed, 71 insertions(+), 92 deletions(-) diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index 3adebbcd44..e2203031aa 100644 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -124,7 +124,6 @@ SYMBOL: jit-primitive-word SYMBOL: jit-primitive SYMBOL: jit-word-jump SYMBOL: jit-word-call -SYMBOL: jit-push-literal SYMBOL: jit-push-immediate SYMBOL: jit-if-word SYMBOL: jit-if-1 @@ -156,9 +155,9 @@ SYMBOL: undefined-quot { jit-primitive 25 } { jit-word-jump 26 } { jit-word-call 27 } - { jit-push-literal 28 } - { jit-if-word 29 } - { jit-if-1 30 } + { jit-if-word 28 } + { jit-if-1 29 } + { jit-if-2 30 } { jit-dispatch-word 31 } { jit-dispatch 32 } { jit-epilog 33 } @@ -173,7 +172,6 @@ SYMBOL: undefined-quot { jit-2dip 47 } { jit-3dip-word 48 } { jit-3dip 49 } - { jit-if-2 50 } { undefined-quot 60 } } ; inline @@ -471,7 +469,6 @@ M: quotation ' jit-primitive jit-word-jump jit-word-call - jit-push-literal jit-push-immediate jit-if-word jit-if-1 diff --git a/basis/compiler/cfg/def-use/def-use.factor b/basis/compiler/cfg/def-use/def-use.factor index 7553407e00..7584931cf7 100644 --- a/basis/compiler/cfg/def-use/def-use.factor +++ b/basis/compiler/cfg/def-use/def-use.factor @@ -12,9 +12,12 @@ M: ##write-barrier defs-vregs [ card#>> ] [ table>> ] bi 2array ; M: ##unary/temp defs-vregs dst/tmp-vregs ; M: ##allot defs-vregs dst/tmp-vregs ; M: ##dispatch defs-vregs temp>> 1array ; -M: ##slot defs-vregs [ dst>> ] [ temp>> ] bi 2array ; +M: ##slot defs-vregs dst/tmp-vregs ; M: ##set-slot defs-vregs temp>> 1array ; -M: ##string-nth defs-vregs [ dst>> ] [ temp>> ] bi 2array ; +M: ##string-nth defs-vregs dst/tmp-vregs ; +M: ##compare defs-vregs dst/tmp-vregs ; +M: ##compare-imm defs-vregs dst/tmp-vregs ; +M: ##compare-float defs-vregs dst/tmp-vregs ; M: insn defs-vregs drop f ; M: ##unary uses-vregs src>> 1array ; diff --git a/basis/compiler/cfg/hats/hats.factor b/basis/compiler/cfg/hats/hats.factor index e6e05abbd5..4b98ccb0ae 100644 --- a/basis/compiler/cfg/hats/hats.factor +++ b/basis/compiler/cfg/hats/hats.factor @@ -65,9 +65,9 @@ IN: compiler.cfg.hats : ^^alien-cell ( src -- dst ) ^^i1 ##alien-cell ; inline : ^^alien-float ( src -- dst ) ^^d1 ##alien-float ; inline : ^^alien-double ( src -- dst ) ^^d1 ##alien-double ; inline -: ^^compare ( src1 src2 cc -- dst ) ^^i3 ##compare ; inline -: ^^compare-imm ( src1 src2 cc -- dst ) ^^i3 ##compare-imm ; inline -: ^^compare-float ( src1 src2 cc -- dst ) ^^i3 ##compare-float ; inline +: ^^compare ( src1 src2 cc -- dst ) ^^i3 i ##compare ; inline +: ^^compare-imm ( src1 src2 cc -- dst ) ^^i3 i ##compare-imm ; inline +: ^^compare-float ( src1 src2 cc -- dst ) ^^i3 i ##compare-float ; inline : ^^offset>slot ( vreg -- vreg' ) cell 4 = [ 1 ^^shr-imm ] when ; inline : ^^tag-fixnum ( src -- dst ) ^^i1 ##tag-fixnum ; inline : ^^untag-fixnum ( src -- dst ) ^^i1 ##untag-fixnum ; inline diff --git a/basis/compiler/cfg/instructions/instructions.factor b/basis/compiler/cfg/instructions/instructions.factor index b2c752e612..ce1f6b7e85 100644 --- a/basis/compiler/cfg/instructions/instructions.factor +++ b/basis/compiler/cfg/instructions/instructions.factor @@ -198,11 +198,11 @@ TUPLE: ##conditional-branch < insn { src1 vreg } { src2 vreg } cc ; INSN: ##compare-branch < ##conditional-branch ; INSN: ##compare-imm-branch { src1 vreg } { src2 integer } cc ; -INSN: ##compare < ##binary cc ; -INSN: ##compare-imm < ##binary-imm cc ; +INSN: ##compare < ##binary cc temp ; +INSN: ##compare-imm < ##binary-imm cc temp ; INSN: ##compare-float-branch < ##conditional-branch ; -INSN: ##compare-float < ##binary cc ; +INSN: ##compare-float < ##binary cc temp ; ! Instructions used by machine IR only. INSN: _prologue stack-frame ; diff --git a/basis/compiler/cfg/value-numbering/rewrite/rewrite.factor b/basis/compiler/cfg/value-numbering/rewrite/rewrite.factor index 5f67f8097e..990543ed7a 100644 --- a/basis/compiler/cfg/value-numbering/rewrite/rewrite.factor +++ b/basis/compiler/cfg/value-numbering/rewrite/rewrite.factor @@ -2,6 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: kernel sequences layouts accessors combinators namespaces math fry +compiler.cfg.hats compiler.cfg.instructions compiler.cfg.value-numbering.graph compiler.cfg.value-numbering.simplify @@ -63,7 +64,7 @@ M: ##compare-imm-branch rewrite-tagged-comparison M: ##compare-imm rewrite-tagged-comparison [ dst>> ] [ (rewrite-tagged-comparison) ] bi - f \ ##compare-imm boa ; + i f \ ##compare-imm boa ; M: ##compare-imm-branch rewrite dup rewrite-boolean-comparison? [ rewrite-boolean-comparison ] when @@ -78,7 +79,7 @@ M: ##compare-imm-branch rewrite [ dst>> ] [ src2>> ] [ src1>> vreg>vn vn>constant ] tri - cc= f \ ##compare-imm boa ; + cc= f i \ ##compare-imm boa ; M: ##compare rewrite dup flip-comparison? [ @@ -95,9 +96,9 @@ M: ##compare rewrite : rewrite-redundant-comparison ( insn -- insn' ) [ cc>> ] [ dst>> ] [ src1>> vreg>expr dup op>> ] tri { - { \ ##compare [ >compare-expr< f \ ##compare boa ] } - { \ ##compare-imm [ >compare-imm-expr< f \ ##compare-imm boa ] } - { \ ##compare-float [ >compare-expr< f \ ##compare-float boa ] } + { \ ##compare [ >compare-expr< i f \ ##compare boa ] } + { \ ##compare-imm [ >compare-imm-expr< i f \ ##compare-imm boa ] } + { \ ##compare-float [ >compare-expr< i f \ ##compare-float boa ] } } case swap cc= eq? [ [ negate-cc ] change-cc ] when ; diff --git a/basis/compiler/cfg/value-numbering/value-numbering-tests.factor b/basis/compiler/cfg/value-numbering/value-numbering-tests.factor index b73736ed14..8adeaa21f4 100644 --- a/basis/compiler/cfg/value-numbering/value-numbering-tests.factor +++ b/basis/compiler/cfg/value-numbering/value-numbering-tests.factor @@ -1,6 +1,17 @@ IN: compiler.cfg.value-numbering.tests USING: compiler.cfg.value-numbering compiler.cfg.instructions -compiler.cfg.registers cpu.architecture tools.test kernel math ; +compiler.cfg.registers cpu.architecture tools.test kernel math +combinators.short-circuit accessors sequences ; + +: trim-temps ( insns -- insns ) + [ + dup { + [ ##compare? ] + [ ##compare-imm? ] + [ ##compare-float? ] + } 1|| [ f >>temp ] when + ] map ; + [ { T{ ##peek f V int-regs 45 D 1 } @@ -82,7 +93,7 @@ compiler.cfg.registers cpu.architecture tools.test kernel math ; T{ ##compare f V int-regs 4 V int-regs 2 V int-regs 1 cc> } T{ ##compare-imm f V int-regs 6 V int-regs 4 7 cc/= } T{ ##replace f V int-regs 6 D 0 } - } value-numbering + } value-numbering trim-temps ] unit-test [ @@ -100,7 +111,7 @@ compiler.cfg.registers cpu.architecture tools.test kernel math ; T{ ##compare f V int-regs 4 V int-regs 2 V int-regs 1 cc<= } T{ ##compare-imm f V int-regs 6 V int-regs 4 7 cc= } T{ ##replace f V int-regs 6 D 0 } - } value-numbering + } value-numbering trim-temps ] unit-test [ @@ -122,7 +133,7 @@ compiler.cfg.registers cpu.architecture tools.test kernel math ; T{ ##compare-float f V int-regs 12 V double-float-regs 10 V double-float-regs 11 cc< } T{ ##compare-imm f V int-regs 14 V int-regs 12 7 cc= } T{ ##replace f V int-regs 14 D 0 } - } value-numbering + } value-numbering trim-temps ] unit-test [ @@ -138,5 +149,5 @@ compiler.cfg.registers cpu.architecture tools.test kernel math ; T{ ##peek f V int-regs 30 D -2 } T{ ##compare f V int-regs 33 V int-regs 29 V int-regs 30 cc<= } T{ ##compare-imm-branch f V int-regs 33 7 cc/= } - } value-numbering + } value-numbering trim-temps ] unit-test diff --git a/basis/compiler/codegen/codegen.factor b/basis/compiler/codegen/codegen.factor index 9f6e8e9c9b..bfb47ba330 100644 --- a/basis/compiler/codegen/codegen.factor +++ b/basis/compiler/codegen/codegen.factor @@ -491,9 +491,10 @@ M: _label generate-insn M: _branch generate-insn label>> lookup-label %jump-label ; -: >compare< ( insn -- label cc src1 src2 ) +: >compare< ( insn -- dst temp cc src1 src2 ) { [ dst>> register ] + [ temp>> register ] [ cc>> ] [ src1>> register ] [ src2>> ?register ] diff --git a/basis/compiler/codegen/fixup/fixup.factor b/basis/compiler/codegen/fixup/fixup.factor index a7f83941fd..06abec5968 100755 --- a/basis/compiler/codegen/fixup/fixup.factor +++ b/basis/compiler/codegen/fixup/fixup.factor @@ -66,9 +66,6 @@ SYMBOL: literal-table : rel-primitive ( word class -- ) >r def>> first r> rt-primitive rel-fixup ; -: rel-literal ( literal class -- ) - >r add-literal r> rt-literal rel-fixup ; - : rel-immediate ( literal class -- ) >r add-literal r> rt-immediate rel-fixup ; diff --git a/basis/compiler/constants/constants.factor b/basis/compiler/constants/constants.factor index 86c1f65049..48ea958818 100644 --- a/basis/compiler/constants/constants.factor +++ b/basis/compiler/constants/constants.factor @@ -39,13 +39,12 @@ IN: compiler.constants ! Relocation types : rt-primitive 0 ; inline : rt-dlsym 1 ; inline -: rt-literal 2 ; inline -: rt-dispatch 3 ; inline -: rt-xt 4 ; inline -: rt-here 5 ; inline -: rt-label 6 ; inline -: rt-immediate 7 ; inline -: rt-stack-chain 8 ; inline +: rt-dispatch 2 ; inline +: rt-xt 3 ; inline +: rt-here 4 ; inline +: rt-label 5 ; inline +: rt-immediate 6 ; inline +: rt-stack-chain 7 ; inline : rc-absolute? ( n -- ? ) [ rc-absolute-ppc-2/2 = ] diff --git a/basis/cpu/architecture/architecture.factor b/basis/cpu/architecture/architecture.factor index d26e7f6ff7..3d6195d9eb 100644 --- a/basis/cpu/architecture/architecture.factor +++ b/basis/cpu/architecture/architecture.factor @@ -119,9 +119,9 @@ HOOK: %gc cpu ( -- ) HOOK: %prologue cpu ( n -- ) HOOK: %epilogue cpu ( n -- ) -HOOK: %compare cpu ( dst cc src1 src2 -- ) -HOOK: %compare-imm cpu ( dst cc src1 src2 -- ) -HOOK: %compare-float cpu ( dst cc src1 src2 -- ) +HOOK: %compare cpu ( dst temp cc src1 src2 -- ) +HOOK: %compare-imm cpu ( dst temp cc src1 src2 -- ) +HOOK: %compare-float cpu ( dst temp cc src1 src2 -- ) HOOK: %compare-branch cpu ( label cc src1 src2 -- ) HOOK: %compare-imm-branch cpu ( label cc src1 src2 -- ) diff --git a/basis/cpu/ppc/bootstrap.factor b/basis/cpu/ppc/bootstrap.factor index 512fff798b..c753050b8e 100644 --- a/basis/cpu/ppc/bootstrap.factor +++ b/basis/cpu/ppc/bootstrap.factor @@ -24,7 +24,6 @@ big-endian on [ 0 6 LOAD32 - 6 dup 0 LWZ 11 6 profile-count-offset LWZ 11 11 1 tag-fixnum ADDI 11 6 profile-count-offset STW @@ -32,7 +31,7 @@ big-endian on 11 11 compiled-header-size ADDI 11 MTCTR BCTR -] rc-absolute-ppc-2/2 rt-literal 1 jit-profiling jit-define +] rc-absolute-ppc-2/2 rt-immediate 1 jit-profiling jit-define [ 0 6 LOAD32 @@ -44,12 +43,6 @@ big-endian on 0 1 lr-save stack-frame + STW ] rc-absolute-ppc-2/2 rt-label 1 jit-prolog jit-define -[ - 0 6 LOAD32 - 6 dup 0 LWZ - 6 ds-reg 4 STWU -] rc-absolute-ppc-2/2 rt-literal 1 jit-push-literal jit-define - [ 0 6 LOAD32 6 ds-reg 4 STWU @@ -90,14 +83,13 @@ big-endian on [ 0 3 LOAD32 - 3 3 0 LWZ 6 ds-reg 0 LWZ 6 6 1 SRAWI 3 3 6 ADD 3 3 array-start-offset LWZ ds-reg dup 4 SUBI jit-jump-quot -] rc-absolute-ppc-2/2 rt-literal 1 jit-dispatch jit-define +] rc-absolute-ppc-2/2 rt-immediate 1 jit-dispatch jit-define : jit->r ( -- ) 4 ds-reg 0 LWZ @@ -317,7 +309,6 @@ big-endian on ! Comparisons : jit-compare ( insn -- ) 0 3 LOAD32 - 3 3 0 LWZ 4 ds-reg 0 LWZ 5 ds-reg -4 LWZU 5 0 4 CMP @@ -326,7 +317,7 @@ big-endian on 3 ds-reg 0 STW ; : define-jit-compare ( insn word -- ) - [ [ jit-compare ] curry rc-absolute-ppc-2/2 rt-literal 1 ] dip + [ [ jit-compare ] curry rc-absolute-ppc-2/2 rt-immediate 1 ] dip define-sub-primitive ; \ BEQ \ eq? define-jit-compare diff --git a/basis/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor index c656ae4d89..43663ffffd 100644 --- a/basis/cpu/ppc/ppc.factor +++ b/basis/cpu/ppc/ppc.factor @@ -34,10 +34,8 @@ M: ppc two-operand? f ; M: ppc %load-immediate ( reg n -- ) swap LOAD ; -M:: ppc %load-indirect ( reg obj -- ) - 0 reg LOAD32 - obj rc-absolute-ppc-2/2 rel-literal - reg reg 0 LWZ ; +M: ppc %load-indirect ( reg obj -- ) + [ 0 swap LOAD32 ] [ rc-absolute-ppc-2/2 rel-immediate ] bi* ; : ds-reg 29 ; inline : rs-reg 30 ; inline diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index f892271fd5..217047e4b6 100644 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -88,8 +88,6 @@ M: float-regs store-return-reg [ [ align-sub ] [ call ] bi* ] [ [ align-add ] [ drop ] bi* ] 2bi ; inline -M: x86.32 rel-literal-x86 rc-absolute-cell rel-literal ; - M: x86.32 %prologue ( n -- ) dup PUSH 0 PUSH rc-absolute-cell rel-this diff --git a/basis/cpu/x86/64/64.factor b/basis/cpu/x86/64/64.factor index 75c808b50a..9ddad23004 100644 --- a/basis/cpu/x86/64/64.factor +++ b/basis/cpu/x86/64/64.factor @@ -44,8 +44,6 @@ M:: x86.64 %dispatch ( src temp offset -- ) M: int-regs return-reg drop RAX ; M: float-regs return-reg drop XMM0 ; -M: x86.64 rel-literal-x86 rc-relative rel-literal ; - M: x86.64 %prologue ( n -- ) temp-reg-1 0 MOV rc-absolute-cell rel-this dup PUSH diff --git a/basis/cpu/x86/bootstrap.factor b/basis/cpu/x86/bootstrap.factor index 6377578ea0..d5fc64de00 100644 --- a/basis/cpu/x86/bootstrap.factor +++ b/basis/cpu/x86/bootstrap.factor @@ -30,13 +30,6 @@ big-endian off stack-reg stack-frame-size 3 bootstrap-cells - SUB ! alignment ] rc-absolute-cell rt-label 1 rex-length + jit-prolog jit-define -[ - arg0 0 MOV ! load literal - arg0 dup [] MOV - ds-reg bootstrap-cell ADD ! increment datastack pointer - ds-reg [] arg0 MOV ! store literal on datastack -] rc-absolute-cell rt-literal 1 rex-length + jit-push-literal jit-define - [ arg0 0 MOV ! load literal ds-reg bootstrap-cell ADD ! increment datastack pointer @@ -294,9 +287,8 @@ big-endian off ! Comparisons : jit-compare ( insn -- ) - arg1 0 MOV ! load t - arg1 dup [] MOV - temp-reg \ f tag-number MOV ! load f + temp-reg 0 MOV ! load t + arg1 \ f tag-number MOV ! load f arg0 ds-reg [] MOV ! load first value ds-reg bootstrap-cell SUB ! adjust stack pointer ds-reg [] arg0 CMP ! compare with second value @@ -305,14 +297,14 @@ big-endian off ; : define-jit-compare ( insn word -- ) - [ [ jit-compare ] curry rc-absolute-cell rt-literal 1 rex-length + ] dip + [ [ jit-compare ] curry rc-absolute-cell rt-immediate 1 rex-length + ] dip define-sub-primitive ; -\ CMOVNE \ eq? define-jit-compare -\ CMOVL \ fixnum>= define-jit-compare -\ CMOVG \ fixnum<= define-jit-compare -\ CMOVLE \ fixnum> define-jit-compare -\ CMOVGE \ fixnum< define-jit-compare +\ CMOVE \ eq? define-jit-compare +\ CMOVGE \ fixnum>= define-jit-compare +\ CMOVLE \ fixnum<= define-jit-compare +\ CMOVG \ fixnum> define-jit-compare +\ CMOVL \ fixnum< define-jit-compare ! Math : jit-math ( insn -- ) diff --git a/basis/cpu/x86/x86.factor b/basis/cpu/x86/x86.factor index e3f73dd203..f0f156a57d 100644 --- a/basis/cpu/x86/x86.factor +++ b/basis/cpu/x86/x86.factor @@ -16,8 +16,6 @@ HOOK: temp-reg-2 cpu ( -- reg ) M: x86 %load-immediate MOV ; -HOOK: rel-literal-x86 cpu ( literal -- ) - M: x86 %load-indirect swap 0 MOV rc-absolute-cell rel-immediate ; HOOK: ds-reg cpu ( -- reg ) @@ -401,12 +399,12 @@ HOOK: stack-reg cpu ( -- reg ) M: x86 %epilogue ( n -- ) cell - incr-stack-reg ; -: %boolean ( dst word -- ) - over \ f tag-number MOV - 0 [] swap execute - \ t rel-literal-x86 ; inline +:: %boolean ( dst temp word -- ) + dst \ f tag-number MOV + temp 0 MOV \ t rc-absolute-cell rel-immediate + dst temp word execute ; inline -M: x86 %compare ( dst cc src1 src2 -- ) +M: x86 %compare ( dst temp cc src1 src2 -- ) CMP { { cc< [ \ CMOVL %boolean ] } { cc<= [ \ CMOVLE %boolean ] } @@ -416,10 +414,10 @@ M: x86 %compare ( dst cc src1 src2 -- ) { cc/= [ \ CMOVNE %boolean ] } } case ; -M: x86 %compare-imm ( dst cc src1 src2 -- ) +M: x86 %compare-imm ( dst temp cc src1 src2 -- ) %compare ; -M: x86 %compare-float ( dst cc src1 src2 -- ) +M: x86 %compare-float ( dst temp cc src1 src2 -- ) UCOMISD { { cc< [ \ CMOVB %boolean ] } { cc<= [ \ CMOVBE %boolean ] } diff --git a/vm/code_heap.c b/vm/code_heap.c index d742f48d1d..6ed5ea4309 100755 --- a/vm/code_heap.c +++ b/vm/code_heap.c @@ -61,8 +61,6 @@ INLINE CELL compute_code_rel(F_REL *rel, return (CELL)primitives[REL_ARGUMENT(rel)]; case RT_DLSYM: return (CELL)get_rel_symbol(rel,literals_start); - case RT_LITERAL: - return CREF(literals_start,REL_ARGUMENT(rel)); case RT_IMMEDIATE: return get(CREF(literals_start,REL_ARGUMENT(rel))); case RT_XT: diff --git a/vm/code_heap.h b/vm/code_heap.h index 867d733ba0..d167ece7fa 100755 --- a/vm/code_heap.h +++ b/vm/code_heap.h @@ -3,8 +3,6 @@ typedef enum { RT_PRIMITIVE, /* arg is a literal table index, holding an array pair (symbol/dll) */ RT_DLSYM, - /* an indirect literal from the word's literal table */ - RT_LITERAL, /* a pointer to a compiled word reference */ RT_DISPATCH, /* a compiled word reference */ diff --git a/vm/quotations.c b/vm/quotations.c index ef24c072d3..e0c5a9af78 100755 --- a/vm/quotations.c +++ b/vm/quotations.c @@ -232,7 +232,7 @@ void jit_compile(CELL quot, bool relocate) case WRAPPER_TYPE: wrapper = untag_object(obj); GROWABLE_ARRAY_ADD(literals,wrapper->object); - EMIT(userenv[JIT_PUSH_LITERAL],literals_count - 1); + EMIT(userenv[JIT_PUSH_IMMEDIATE],literals_count - 1); break; case FIXNUM_TYPE: if(jit_primitive_call_p(untag_object(array),i)) @@ -404,7 +404,7 @@ F_FIXNUM quot_code_offset_to_scan(CELL quot, F_FIXNUM offset) COUNT(userenv[JIT_WORD_CALL],i) break; case WRAPPER_TYPE: - COUNT(userenv[JIT_PUSH_LITERAL],i) + COUNT(userenv[JIT_PUSH_IMMEDIATE],i) break; case FIXNUM_TYPE: if(jit_primitive_call_p(untag_object(array),i)) @@ -470,7 +470,7 @@ F_FIXNUM quot_code_offset_to_scan(CELL quot, F_FIXNUM offset) break; } default: - COUNT(userenv[immediate_p(obj) ? JIT_PUSH_IMMEDIATE : JIT_PUSH_LITERAL],i) + COUNT(userenv[JIT_PUSH_IMMEDIATE],i) break; } } diff --git a/vm/run.h b/vm/run.h index b4118b09d8..f156ba3f03 100755 --- a/vm/run.h +++ b/vm/run.h @@ -39,9 +39,9 @@ typedef enum { JIT_PRIMITIVE, JIT_WORD_JUMP, JIT_WORD_CALL, - JIT_PUSH_LITERAL, JIT_IF_WORD, JIT_IF_1, + JIT_IF_2, JIT_DISPATCH_WORD, JIT_DISPATCH, JIT_EPILOG, @@ -56,7 +56,6 @@ typedef enum { JIT_2DIP, JIT_3DIP_WORD, JIT_3DIP, - JIT_IF_2, STACK_TRACES_ENV = 59,