From: Paul Khuong Date: Sun, 3 Jul 2011 01:05:31 +0000 (-0400) Subject: Differentiate between object slot initialisation and mutation X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=57d30b9b5a4b2be52431e0a8daaf81d409d146a9;p=sbcl.git Differentiate between object slot initialisation and mutation INIT-SLOT and SET-SLOT VOPs do the same thing on every platform for now. --- diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 348bd69..87b6362 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -357,7 +357,7 @@ of SBCL which maintained the CMU-CL-style split into two packages.)" "MAKE-FUNCALLABLE-INSTANCE-TRAMP" "RETURN-SINGLE" "NOTE-NEXT-INSTRUCTION" - "SET-SLOT" + "SET-SLOT" "INIT-SLOT" "LOCATION-NUMBER" "*COMPONENT-BEING-COMPILED*" "BLOCK-NUMBER" diff --git a/src/compiler/alpha/cell.lisp b/src/compiler/alpha/cell.lisp index 26dae0e..3cd8558 100644 --- a/src/compiler/alpha/cell.lisp +++ b/src/compiler/alpha/cell.lisp @@ -35,6 +35,8 @@ (storew value object offset lowtag)) #!-gengc (storew value object offset lowtag))) + +(define-vop (init-slot set-slot)) ;;;; symbol hacking VOPs diff --git a/src/compiler/generic/vm-ir2tran.lisp b/src/compiler/generic/vm-ir2tran.lisp index a089050..4254f3d 100644 --- a/src/compiler/generic/vm-ir2tran.lisp +++ b/src/compiler/generic/vm-ir2tran.lisp @@ -69,7 +69,7 @@ (macrolet ((make-case () `(ecase raw-type ((t) - (vop set-slot node block object arg-tn + (vop init-slot node block object arg-tn name (+ sb!vm:instance-slots-offset slot) lowtag)) ,@(mapcar (lambda (rsd) `(,(sb!kernel::raw-slot-data-raw-type rsd) @@ -82,11 +82,11 @@ nil)))) (make-case)))) (:dd - (vop set-slot node block object + (vop init-slot node block object (emit-constant (sb!kernel::dd-layout-or-lose slot)) name sb!vm:instance-slots-offset lowtag)) (otherwise - (vop set-slot node block object + (vop init-slot node block object (ecase kind (:arg (aver args) diff --git a/src/compiler/hppa/cell.lisp b/src/compiler/hppa/cell.lisp index d6ba897..c5e21b2 100644 --- a/src/compiler/hppa/cell.lisp +++ b/src/compiler/hppa/cell.lisp @@ -30,6 +30,8 @@ (:results) (:generator 1 (storew value object offset lowtag))) + +(define-vop (init-slot set-slot)) ;;;; Symbol hacking VOPs: diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 24edd3d..04689c3 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -31,6 +31,7 @@ (:generator 1 (storew value object offset lowtag))) +(define-vop (init-slot set-slot)) ;;;; Symbol hacking VOPs: diff --git a/src/compiler/ppc/cell.lisp b/src/compiler/ppc/cell.lisp index c461fe4..2da18ed 100644 --- a/src/compiler/ppc/cell.lisp +++ b/src/compiler/ppc/cell.lisp @@ -31,6 +31,8 @@ (:generator 1 (storew value object offset lowtag))) +(define-vop (init-slot set-slot)) + #!+compare-and-swap-vops (define-vop (compare-and-swap-slot) (:args (object :scs (descriptor-reg)) diff --git a/src/compiler/sparc/cell.lisp b/src/compiler/sparc/cell.lisp index e773231..c9613aa 100644 --- a/src/compiler/sparc/cell.lisp +++ b/src/compiler/sparc/cell.lisp @@ -29,6 +29,8 @@ (:results) (:generator 1 (storew value object offset lowtag))) + +(define-vop (init-slot set-slot)) ;;;; Symbol hacking VOPs: diff --git a/src/compiler/x86-64/cell.lisp b/src/compiler/x86-64/cell.lisp index 2c22d08..0857ff6 100644 --- a/src/compiler/x86-64/cell.lisp +++ b/src/compiler/x86-64/cell.lisp @@ -47,6 +47,8 @@ ;; Else, value not immediate. (storew value object offset lowtag)))) +(define-vop (init-slot set-slot)) + (define-vop (compare-and-swap-slot) (:args (object :scs (descriptor-reg) :to :eval) (old :scs (descriptor-reg any-reg) :target rax) diff --git a/src/compiler/x86/cell.lisp b/src/compiler/x86/cell.lisp index bb82a39..5be6b34 100644 --- a/src/compiler/x86/cell.lisp +++ b/src/compiler/x86/cell.lisp @@ -30,6 +30,8 @@ (:generator 1 (storew (encode-value-if-immediate value) object offset lowtag))) +(define-vop (init-slot set-slot)) + (define-vop (compare-and-swap-slot) (:args (object :scs (descriptor-reg) :to :eval) (old :scs (descriptor-reg any-reg) :target eax)