From: Chris Hanson Date: Thu, 13 Apr 2017 05:23:52 +0000 (-0700) Subject: Eliminate condition for open-coding integer->char. X-Git-Tag: mit-scheme-pucked-9.2.12~158^2~49 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=30ecd5e3191e0787a9e455d66627fe12db27ad10;p=mit-scheme.git Eliminate condition for open-coding integer->char. --- diff --git a/src/compiler/rtlgen/opncod.scm b/src/compiler/rtlgen/opncod.scm index 686200207..c16f4d958 100644 --- a/src/compiler/rtlgen/opncod.scm +++ b/src/compiler/rtlgen/opncod.scm @@ -504,7 +504,9 @@ USA. (define (raw-indexed-memory-reference index-locative) (lambda (name base-type value-type generator) + name base-type value-type (lambda (combination expressions finish) + combination (index-locative (car expressions) (cadr expressions) (lambda (locative) (generator locative expressions finish)))))) @@ -1146,28 +1148,24 @@ USA. ;;;; Characters (define-open-coder/value 'INTEGER->CHAR - (conditional-open-coder - (lambda (operands primitive block) - operands - (not (block/generate-range-checks? block primitive))) - (simple-open-coder - (lambda (combination expressions finish) - (let ((arg (car expressions))) - (open-code:with-checks - combination - (list (open-code:type-check arg - (ucode-type fixnum) - 'INTEGER->CHAR - (combination/block combination))) - (finish - (rtl:make-cons-non-pointer - (rtl:make-machine-constant (ucode-type character)) - (rtl:make-object->datum arg))) - finish - 'INTEGER->CHAR - expressions))) - '(0) - internal-close-coding-for-type-checks))) + (simple-open-coder + (lambda (combination expressions finish) + (let ((arg (car expressions))) + (open-code:with-checks + combination + (list (open-code:type-check arg + (ucode-type fixnum) + 'INTEGER->CHAR + (combination/block combination))) + (finish + (rtl:make-cons-non-pointer + (rtl:make-machine-constant (ucode-type character)) + (rtl:make-object->datum arg))) + finish + 'INTEGER->CHAR + expressions))) + '(0) + internal-close-coding-for-type-checks)) (define-open-coder/value 'CHAR->INTEGER (simple-open-coder