1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Stack slots can hold a double

* libguile/frames.h (union scm_vm_stack_element): Add double member.
* libguile/frames.c (scm_frame_local_ref, scm_frame_local_set_x): Wire
  up f64 support.
This commit is contained in:
Andy Wingo 2015-10-28 17:47:48 +00:00
parent e3cc0eeb3a
commit fc87033bf0
2 changed files with 4 additions and 2 deletions

View file

@ -262,7 +262,7 @@ SCM_DEFINE (scm_frame_local_ref, "frame-local-ref", 3, 0, 0,
case STACK_ITEM_SCM:
return item->as_scm;
case STACK_ITEM_F64:
/* return item->as_f64; */
return scm_from_double (item->as_f64);
default:
abort();
}
@ -298,7 +298,8 @@ SCM_DEFINE (scm_frame_local_set_x, "frame-local-set!", 4, 0, 0,
item->as_scm = val;
break;
case STACK_ITEM_F64:
/* item->as_f64 = scm_to_double (val); */
item->as_f64 = scm_to_double (val);
break;
default:
abort();
}