3 ;;; Cell-Ref and Cell-Set are used to define VOPs like CAR, where the offset to
4 ;;; be read or written is a property of the VOP used. Cell-Setf is similar to
5 ;;; Cell-Set, but delivers the new value as the result. Cell-Setf-Function
6 ;;; takes its arguments as if it were a setf function (new value first, as
7 ;;; apposed to a setf macro, which takes the new value last).
10 (:args (object :scs (descriptor-reg)))
11 (:results (value :scs (descriptor-reg any-reg)))
12 (:variant-vars offset lowtag)
15 (loadw value object offset lowtag)))
17 (define-vop (cell-set)
18 (:args (object :scs (descriptor-reg))
19 (value :scs (descriptor-reg any-reg)))
20 (:variant-vars offset lowtag)
23 (storew value object offset lowtag)))
25 ;;; Slot-Ref and Slot-Set are used to define VOPs like Closure-Ref, where the
26 ;;; offset is constant at compile time, but varies for different uses. We add
27 ;;; in the stardard g-vector overhead.
29 (define-vop (slot-ref)
30 (:args (object :scs (descriptor-reg)))
31 (:results (value :scs (descriptor-reg any-reg)))
32 (:variant-vars base lowtag)
35 (loadw value object (+ base offset) lowtag)))
37 (define-vop (slot-set)
38 (:args (object :scs (descriptor-reg))
39 (value :scs (descriptor-reg any-reg)))
40 (:variant-vars base lowtag)
43 (storew value object (+ base offset) lowtag)))