From df0f325c0032b75de14e419659dd0f38d1055305 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 16 May 2018 14:15:45 -0400 Subject: [PATCH] Issue #55 --- scheme/cyclone/primitives.sld | 10 +++++----- tests/debug/test-sizes.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scheme/cyclone/primitives.sld b/scheme/cyclone/primitives.sld index 30bcc279..084bd4b0 100644 --- a/scheme/cyclone/primitives.sld +++ b/scheme/cyclone/primitives.sld @@ -705,11 +705,11 @@ ;; Determine if primitive receives a pointer to a local C variable (define (prim/c-var-pointer p) (cond - ((eq? p 'Cyc-fast-plus) "double_type") - ((eq? p 'Cyc-fast-sub) "double_type") - ((eq? p 'Cyc-fast-mul) "double_type") - ((eq? p 'Cyc-fast-div) "double_type") - ((member p *udf-prims*) "double_type") + ((eq? p 'Cyc-fast-plus) "complex_num_type") + ((eq? p 'Cyc-fast-sub) "complex_num_type") + ((eq? p 'Cyc-fast-mul) "complex_num_type") + ((eq? p 'Cyc-fast-div) "complex_num_type") + ((member p *udf-prims*) "complex_num_type") (else #f))) ;; Determine if primitive assigns (allocates) a C variable diff --git a/tests/debug/test-sizes.c b/tests/debug/test-sizes.c index 5c9679c4..b6219166 100644 --- a/tests/debug/test-sizes.c +++ b/tests/debug/test-sizes.c @@ -28,6 +28,7 @@ void main() { print_stats("cond_var_type ", sizeof(cond_var_type ), gc_heap_align(sizeof(cond_var_type )) ); print_stats("cvar_type ", sizeof(cvar_type ), gc_heap_align(sizeof(cvar_type )) ); print_stats("double_type ", sizeof(double_type ), gc_heap_align(sizeof(double_type )) ); + print_stats("complex_num_type ", sizeof(complex_num_type ), gc_heap_align(sizeof(complex_num_type )) ); print_stats("integer_type ", sizeof(integer_type ), gc_heap_align(sizeof(integer_type )) ); print_stats("macro_type ", sizeof(macro_type ), gc_heap_align(sizeof(macro_type )) ); print_stats("mutex_type ", sizeof(mutex_type ), gc_heap_align(sizeof(mutex_type )) );