mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 21:32:49 -08:00
VT-LOC-VALUE, used to retrieve the constant value of C locations, did not handle statically allocated constants
This commit is contained in:
parent
49d45942c5
commit
a01e56cf83
1 changed files with 12 additions and 5 deletions
|
|
@ -138,11 +138,6 @@
|
|||
(add-load-form object x))
|
||||
x))))
|
||||
|
||||
(defun vt-loc-value (loc)
|
||||
(case (car loc)
|
||||
(VV (aref *permanent-objects* (second loc)))
|
||||
(VV-TEMP (aref *temporary-objects* (second loc)))))
|
||||
|
||||
(defun add-symbol (symbol)
|
||||
(add-object symbol :duplicate nil :permanent t))
|
||||
|
||||
|
|
@ -208,3 +203,15 @@
|
|||
(let* ((c-name (format nil "_ecl_static_~D" (length *static-constants*))))
|
||||
(push (list object c-name builder) *static-constants*)
|
||||
`(VV ,c-name))))))))
|
||||
|
||||
(defun vt-loc-value (loc)
|
||||
(flet ((static-constant-value (index)
|
||||
(first (find loc *static-constants* :key #'second
|
||||
:test #'string=))))
|
||||
(let ((index (second loc)))
|
||||
(cond ((stringp index)
|
||||
(static-constant-value index))
|
||||
((eq (car loc) 'VV)
|
||||
(aref *permanent-objects* index))
|
||||
(t
|
||||
(VV-TEMP (aref *temporary-objects* index)))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue