From 6f409fdfbd3d4a0c5c540de5a9371388c585cacb Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 7 Mar 2006 19:06:41 +0000 Subject: [PATCH] 0.9.10.22: Remove spurious VOPs for translating %INSTANCE-{REF,SET}. ... These VOPs were based on SLOT-{REF,SET} and in all ports there were also translations based on DEFINE-FULL-REFFER or WORD-INDEX-REF. However, at the very least, the %INSTANCE-SET VOP based on SLOT-SET was bogus, as it did not return a value, thereby generating incorrect code. Therefore, this VOP was either disabled (#+nil) or the alternative via DEFINE-FULL-REFFER was carefully defined with a lower :GENERATOR cost so that the VOP based on SLOT-SET would never be called. This patch eliminates such magic and eliminates the corresponding %INSTANCE-REF VOP as well, since it does not appear to have any advantages over the one created via DEFINE-FULL-REFFER. ... See also sbcl-devel, 2002-02-11, "Dubious VOPs". This patch does not implement the DEFINE-VOP magic discussed in the email. --- src/compiler/alpha/cell.lisp | 12 ------------ src/compiler/hppa/cell.lisp | 14 -------------- src/compiler/mips/cell.lisp | 13 ------------- src/compiler/ppc/cell.lisp | 13 ------------- src/compiler/sparc/cell.lisp | 19 ------------------- src/compiler/x86-64/cell.lisp | 12 ------------ src/compiler/x86/cell.lisp | 12 ------------ version.lisp-expr | 2 +- 8 files changed, 1 insertion(+), 96 deletions(-) diff --git a/src/compiler/alpha/cell.lisp b/src/compiler/alpha/cell.lisp index 8347d6f..97e250e 100644 --- a/src/compiler/alpha/cell.lisp +++ b/src/compiler/alpha/cell.lisp @@ -256,18 +256,6 @@ (loadw res struct 0 instance-pointer-lowtag) (inst srl res n-widetag-bits res))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types instance (:constant index))) - -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-full-reffer instance-index-ref * instance-slots-offset instance-pointer-lowtag (descriptor-reg any-reg) * %instance-ref) diff --git a/src/compiler/hppa/cell.lisp b/src/compiler/hppa/cell.lisp index 8c16d62..607fe12 100644 --- a/src/compiler/hppa/cell.lisp +++ b/src/compiler/hppa/cell.lisp @@ -242,20 +242,6 @@ (loadw res struct 0 instance-pointer-lowtag) (inst srl res n-widetag-bits res))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types instance (:constant index))) - -#+nil ; As per usual (cf sbcl-devel discussion about this VOP which - ; appears to return no values) -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-full-reffer instance-index-ref * instance-slots-offset instance-pointer-lowtag (descriptor-reg any-reg) * %instance-ref) diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 024d1c7..79b2bbe 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -264,19 +264,6 @@ (loadw res struct 0 instance-pointer-lowtag) (inst srl res n-widetag-bits))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types instance (:constant index))) - -#+nil -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-full-reffer instance-index-ref * instance-slots-offset instance-pointer-lowtag (descriptor-reg any-reg) * %instance-ref) diff --git a/src/compiler/ppc/cell.lisp b/src/compiler/ppc/cell.lisp index 70af457..b0e1afc 100644 --- a/src/compiler/ppc/cell.lisp +++ b/src/compiler/ppc/cell.lisp @@ -254,19 +254,6 @@ (loadw temp struct 0 instance-pointer-lowtag) (inst srwi res temp n-widetag-bits))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types * (:constant index))) - -#+nil -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-vop (instance-index-ref word-index-ref) (:policy :fast-safe) (:translate %instance-ref) diff --git a/src/compiler/sparc/cell.lisp b/src/compiler/sparc/cell.lisp index 525e6cb..fc5e324 100644 --- a/src/compiler/sparc/cell.lisp +++ b/src/compiler/sparc/cell.lisp @@ -246,25 +246,6 @@ (loadw temp struct 0 instance-pointer-lowtag) (inst srl res temp n-widetag-bits))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types * (:constant index))) - -;;; This VOP has no :results; however, %instance-set must return a -;;; value. This caused, in the forward port to 0.7.x, an error in -;;; !fdefn-cold-init: "argument X is not a REAL: NIL". This VOP is -;;; commented out for now, pending the addition of checking code to -;;; the define-vop machinery to ascertain that this was indeed the -;;; problem. -- CSR, 2002-02-12 -#+nil -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types * (:constant index) *)) - (define-vop (instance-index-ref word-index-ref) (:policy :fast-safe) (:translate %instance-ref) diff --git a/src/compiler/x86-64/cell.lisp b/src/compiler/x86-64/cell.lisp index 8eac0c0..49aef07 100644 --- a/src/compiler/x86-64/cell.lisp +++ b/src/compiler/x86-64/cell.lisp @@ -448,18 +448,6 @@ (loadw res struct 0 instance-pointer-lowtag) (inst shr res n-widetag-bits))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types instance (:constant index))) - -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-full-reffer instance-index-ref * instance-slots-offset instance-pointer-lowtag (any-reg descriptor-reg) * %instance-ref) diff --git a/src/compiler/x86/cell.lisp b/src/compiler/x86/cell.lisp index 9a6950d..f2387c7 100644 --- a/src/compiler/x86/cell.lisp +++ b/src/compiler/x86/cell.lisp @@ -451,18 +451,6 @@ (loadw res struct 0 instance-pointer-lowtag) (inst shr res n-widetag-bits))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types instance (:constant index))) - -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-full-reffer instance-index-ref * instance-slots-offset instance-pointer-lowtag (any-reg descriptor-reg) * %instance-ref) diff --git a/version.lisp-expr b/version.lisp-expr index c43b287..f70433b 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.10.21" +"0.9.10.22" -- 1.7.10.4