Skip to content
Browse files
actually use a VOP
the cross-compiler is built knowing that some functions (usually as a
result of code transformations) should never be compiled as calls, but
should instead be /translated/ using one of our Virtual OPerations.
DATA-VECTOR-REF, which the AREF in our scratch.lisp file translates to
because of the type declarations, is one such function, so we need to
define it: and also define it in such a way that it will be used no
matter what the current compiler policy.
  • Loading branch information
csrhodes committed Aug 7, 2018
1 parent 506323c commit 76186a40c9627309f311f6919555d29724b17aab
Showing with 5 additions and 1 deletion.
  1. +4 −1 src/compiler/rv32/array.lisp
  2. +1 −0 src/compiler/rv32/macros.lisp
@@ -13,8 +13,11 @@

((def-full-data-vector-frobs (type element-type &rest scs)
(let ((setname (symbolicate "DATA-VECTOR-SET/" type)))
(let ((refname (symbolicate "DATA-VECTOR-REF/" type))
(setname (symbolicate "DATA-VECTOR-SET/" type)))
(define-full-reffer ,refname ,type
vector-data-offset other-pointer-lowtag ,scs ,element-type data-vector-ref)
(define-full-setter ,setname ,type
vector-data-offset other-pointer-lowtag ,scs ,element-type data-vector-set))))
(def-partial-data-vector-frobs (type element-type size signed &rest scs)
@@ -15,6 +15,7 @@
(define-vop (,name)
,@(when translate `((:translate ,translate)))
(:policy :fast-safe)
(:args (object :scs (descriptor-reg)) (index :scs (any-reg)))
(:arg-types ,type tagged-num)
(:results (value :scs ,scs))

0 comments on commit 76186a4

Please sign in to comment.