(defconst comp-debug t)
+(defvar comp-speed 2)
+
(defconst comp-passes '(comp-recuparate-lap
comp-limplify)
"Passes to be executed in order.")
(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)))
(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)
-
-;; (should (= (comp-tests-symbol-value-f) 3)))
+(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)))
;; (ert-deftest comp-tests-concat ()
;; "Testing concatX opcodes."