1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

Remove integer->char op

* libguile/vm-engine.c (integer->char): Remove unused op.
* module/language/cps/types.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/compile-bytecode.scm (compile-function): Remove
  integer->char cases.
* module/system/vm/assembler.scm: Remove emit-integer->char.
This commit is contained in:
Andy Wingo 2018-04-10 13:33:13 +02:00
parent 880d68ea22
commit 9355985154
5 changed files with 1 additions and 30 deletions

View file

@ -2837,32 +2837,12 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
VM_DEFINE_OP (172, unused_172, NULL, NOP)
VM_DEFINE_OP (173, unused_173, NULL, NOP)
VM_DEFINE_OP (174, unused_174, NULL, NOP)
VM_DEFINE_OP (175, unused_175, NULL, NOP)
{
vm_error_bad_instruction (op);
abort (); /* never reached */
}
/* integer->char a:12 b:12
*
* Convert the U64 value in B to a Scheme character, and return it in
* A.
*/
VM_DEFINE_OP (175, integer_to_char, "integer->char", OP1 (X8_S12_S12) | OP_DST)
{
scm_t_uint16 dst, src;
scm_t_uint64 x;
UNPACK_12_12 (op, dst, src);
x = SP_REF_U64 (src);
VM_ASSERT (x <= (scm_t_uint64) SCM_CODEPOINT_MAX,
vm_error_out_of_range_uint64 ("integer->char", x));
SP_SET (dst, SCM_MAKE_ITAG8 ((scm_t_bits) (scm_t_wchar) x, scm_tc8_char));
NEXT (1);
}
/* char->integer a:12 b:12
*
* Untag the character in B to U64, and return it in A.