symbol-value +1 test

This commit is contained in:
Andrea Corallo 2019-07-13 17:24:44 +02:00 committed by Andrea Corallo
parent 2e20dca7a0
commit fdbdf3da7f
2 changed files with 13 additions and 10 deletions

View file

@ -37,6 +37,8 @@
(defconst comp-debug t)
(defvar comp-speed 2)
(defconst comp-passes '(comp-recuparate-lap
comp-limplify)
"Passes to be executed in order.")
@ -268,15 +270,16 @@ VAL is known at compile time."
(comp-pop 1))
('byte-dup
(comp-push-slot-n (comp-sp)))
('byte-symbol-value
(comp-emit-set-call `(call Fsymbol_value ,(comp-slot))))
('byte-varref
(comp-push-call `(call Fsymbol_value ,(make-comp-mvar
:const-vld t
:constant (cadr inst)))))
('byte-varset
(comp-emit `(call set_internal
,(make-comp-mvar
:const-vld t
:constant (cadr inst))
,(make-comp-mvar :const-vld t
:constant (cadr inst))
,(comp-slot))))
('byte-constant
(comp-push-const (cadr inst)))

View file

@ -123,14 +123,14 @@
(should (= (comp-tests-aref-aset-f) 100)))
;; (ert-deftest comp-tests-symbol-value ()
;; "Testing aref and aset."
;; (defvar comp-tests-var2 3)
;; (defun comp-tests-symbol-value-f ()
;; (symbol-value 'comp-tests-var2))
;; (native-compile #'comp-tests-symbol-value-f)
(ert-deftest comp-tests-symbol-value ()
"Testing aref and aset."
(defvar comp-tests-var2 3)
(defun comp-tests-symbol-value-f ()
(symbol-value 'comp-tests-var2))
(native-compile #'comp-tests-symbol-value-f)
;; (should (= (comp-tests-symbol-value-f) 3)))
(should (= (comp-tests-symbol-value-f) 3)))
;; (ert-deftest comp-tests-concat ()
;; "Testing concatX opcodes."