break;
case Baset:
- printf("Baset\n");
+ POP3;
+ res = jit_emit_call ("Faset", comp.lisp_obj_type, 3, args);
+ PUSH (gcc_jit_lvalue_as_rvalue (res));
break;
+
case Bsymbol_value:
printf("Bsymbol_value\n");
break;
(should (= (comp-tests-length-f) 3)))
-(ert-deftest comp-tests-aref ()
- "Testing aref."
- (defun comp-tests-aref-f ()
- (aref [1 2 3] 2))
- (byte-compile #'comp-tests-aref-f)
- (native-compile #'comp-tests-aref-f)
-
- (should (= (comp-tests-aref-f) 3)))
+(ert-deftest comp-tests-aref-aset ()
+ "Testing aref and aset."
+ (defun comp-tests-aref-aset-f ()
+ (let ((vec [1 2 3]))
+ (aset vec 2 100)
+ (aref vec 2)))
+ (byte-compile #'comp-tests-aref-aset-f)
+ (native-compile #'comp-tests-aref-aset-f)
+
+ (should (= (comp-tests-aref-aset-f) 100)))
(ert-deftest comp-tests-ffuncall ()
"Testing varset."