定义来自sbcl的src/code/array.lisp。看起来像是无限循环?我没有找到任何线索来获取它。有什么提示吗?谢谢你!
(defun row-major-aref (array index) |
#!+sb-doc |
"Return the element of array corressponding to the row-major index. This is |
SETF'able." |
(declare (optimize (safety 1))) |
(row-major-aref array index))
Run Code Online (Sandbox Code Playgroud)
您还src/compiler/array-tran.lisp
可以找到以下代码:
(deftransform row-major-aref ((array index))
`(hairy-data-vector-ref array
(%check-bound array (array-total-size array) index)))
Run Code Online (Sandbox Code Playgroud)
我不是 SBCL 内部的专家,但我认为row-major-aref
编译器将其视为“基本”操作,不会简化为其他 Lisp 函数调用,而是转换为机器代码。
归档时间: |
|
查看次数: |
178 次 |
最近记录: |