X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/aa14a4cddcb96b681d5c19a2ec8bad382f43b264..e85df3ff84611b7c790f9ffb46dfca77e2a717c0:/src/codegen-test.lisp diff --git a/src/codegen-test.lisp b/src/codegen-test.lisp index 4f9aa05..81fa3e0 100644 --- a/src/codegen-test.lisp +++ b/src/codegen-test.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -35,13 +35,13 @@ (codegen-push codegen) (loop for (name init) in '(("aa" 1) ("bb" 0)) - do (ensure-var codegen name (c-type int) init)) + do (ensure-var codegen name c-type-int init)) (codegen-push codegen) - (with-temporary-var (codegen r (c-type int)) + (with-temporary-var (codegen r c-type-int) (emit-inst codegen(make-set-inst r "u%v")) - (with-temporary-var (codegen q (c-type int)) + (with-temporary-var (codegen q c-type-int) (emit-inst codegen (make-set-inst q "u/v")) - (with-temporary-var (codegen a (c-type int)) + (with-temporary-var (codegen a c-type-int) (emit-insts codegen (list (make-set-inst a "aa") (make-set-inst "aa" "bb") @@ -62,8 +62,8 @@ (loop for (name init) in '(("u" "atoi(argv[1])") ("v" "atoi(argv[2])") ("a")) - do (ensure-var codegen name (c-type int) init)) - (ensure-var codegen "g" (c-type int) + do (ensure-var codegen name c-type-int init)) + (ensure-var codegen "g" c-type-int (make-call-inst "gcd" (list "u" "v" "&a"))) (emit-inst codegen (make-expr-inst (make-call-inst "printf"