Commit 81632a9f authored by Guy Watson's avatar Guy Watson
Browse files

Concretize the type when in the renderer

parent 2bac6b29
......@@ -378,17 +378,10 @@
(random (ast-child 'localcount (get-func-node n))))
;; Convenience function for getting the name of the type
;; This function checks to see if a type can be concretized, then does so and
;; returns the symbol of the type
;; This function is only used in the renderer, so it will concretize
;; the type and return its name as a symbol
(define (get-base-type-name n)
(let ([type (att-value 'xsmith_type n)])
(if (concrete-type? type)
(base-type-name (concretize-type type))
(eprintf (format "Non-concrete type encountered in renderer\n"))
(eprintf (format "Node: ~a Types: ~a\n\n" (node-type n) (att-value 'xsmith_type n)))
(base-type-name (concretize-type (att-value 'xsmith_type n))))
;; Combines an node's base type and a given string. Returns a symbol.
;; This is useful for constructing symbols like i32.add
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment