Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ecl
ecl
Commits
0abe27af
Commit
0abe27af
authored
Jun 05, 2010
by
Juan Jose Garcia Ripoll
Browse files
The object associated to the VV location is now stored in it
parent
4d71ab1b
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/cmp/cmpct.lsp
View file @
0abe27af
...
...
@@ -68,12 +68,13 @@
(single-float 'single-float-value)
(double-float 'double-float-value)
(long-float 'long-float-value)))
(location (make-vv :location c-value)))
(location (make-vv :location c-value
:value value
)))
(cons value (make-c1form* 'LOCATION :type type
:args (list loc-type value location)))))
(t
(cons name (make-c1form* 'LOCATION :type (type-of name)
:args (make-vv :location c-value)))))
:args (make-vv :location c-value
:value name)))))
+optimizable-constants+)))
(reverse
`((MOST-POSITIVE-SHORT-FLOAT "FLT_MAX")
...
...
src/cmp/cmpffi.lsp
View file @
0abe27af
...
...
@@ -214,6 +214,7 @@
(defun loc-type (loc)
(cond ((eq loc NIL) 'NULL)
((var-p loc) (var-type loc))
((vv-p loc) (vv-type loc))
((si::fixnump loc) 'fixnum)
((atom loc) 'T)
(t
...
...
@@ -234,6 +235,7 @@
(defun loc-representation-type (loc)
(cond ((member loc '(NIL T)) :object)
((var-p loc) (var-rep-type loc))
((vv-p loc) :object)
((si::fixnump loc) :fixnum)
((eq loc 'TRASH) :void)
((atom loc) :object)
...
...
src/cmp/cmploc.lsp
View file @
0abe27af
...
...
@@ -106,7 +106,7 @@
((ext:fixnump loc)
(values t loc))
((vv-p loc)
(let ((value (v
t-loc
-value loc)))
(let ((value (v
v
-value loc)))
(if (or (null value) (ext:fixnump value))
(values nil nil)
(values t value))))
...
...
src/cmp/cmptypes.lsp
View file @
0abe27af
...
...
@@ -252,4 +252,5 @@
(defstruct vv
(location nil)
(used-p nil)
(permanent-p t))
(permanent-p t)
(value nil))
src/cmp/cmpwt.lsp
View file @
0abe27af
...
...
@@ -134,7 +134,8 @@
(cond ((add-static-constant object))
((and x duplicate)
(setq x (make-vv :location next-ndx :used-p forced
:permanent-p permanent))
:permanent-p permanent
:value object))
(vector-push-extend (list object x next-ndx) array)
x)
(x
...
...
@@ -145,7 +146,8 @@
x)
(t
(setq x (make-vv :location next-ndx :used-p forced
:permanent-p permanent))
:permanent-p permanent
:value object))
(vector-push-extend (list object x next-ndx) array)
(unless *compiler-constants*
(add-load-form object x))
...
...
@@ -262,23 +264,7 @@
(when builder
(let* ((c-name (format nil "_ecl_static_~D" (length *static-constants*))))
(push (list object c-name builder) *static-constants*)
(make-vv :location c-name))))))))
(defun vt-loc-value (loc)
(flet ((static-constant-value (index)
(first (find index *static-constants* :key #'second
:test #'string=))))
(if (not (vv-permanent-p loc))
(aref *temporary-objects* (vv-location index))
(if (vv-p loc)
(let ((index (vv-location loc)))
(if (stringp index)
(static-constant-value index)
(aref *permanent-objects* index)))
nil
#+nil
(baboon :format-control "VT-LOC-VALUE got an invalid location ~A"
:format-arguments (list loc))))))
(make-vv :location c-name :value object))))))))
(defun wt-vv-index (index permanent-p)
(cond ((not (numberp index))
...
...
@@ -300,3 +286,9 @@
(defun set-vv (loc vv-loc)
(setf (vv-used-p vv-loc) t)
(set-vv-index loc (vv-location vv-loc) (vv-permanent-p vv-loc)))
(defun vv-type (loc)
(let ((value (vv-value loc)))
(if (and value (not (si::fixnump value)))
(type-of value)
t)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment