From: Taylor R Campbell Date: Fri, 11 Dec 2009 00:39:15 +0000 (-0500) Subject: Use PRIMITIVE-OBJECT-SET-TYPE, not OBJECT-SET-TYPE, in EOF-OBJECT. X-Git-Tag: 20100708-Gtk~217 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2d8c79f3867dfd1673ce381452805d942923ea45;p=mit-scheme.git Use PRIMITIVE-OBJECT-SET-TYPE, not OBJECT-SET-TYPE, in EOF-OBJECT. Neither is constant-folded, but PRIMITIVE-OBJECT-SET-TYPE is open-coded while OBJECT-SET-TYPE is not. (Is there a reason for this? An artefact of Multischeme?) --- diff --git a/src/runtime/input.scm b/src/runtime/input.scm index 966c06e76..297c0bad8 100644 --- a/src/runtime/input.scm +++ b/src/runtime/input.scm @@ -117,15 +117,15 @@ USA. (define-integrable (accum-count a) (cdr a)) -(define (make-eof-object port) +(define-integrable (make-eof-object port) port (eof-object)) -(define (eof-object) - (object-new-type (ucode-type constant) 6)) +(define-integrable (eof-object) + ((ucode-primitive primitive-object-set-type) (ucode-type constant) 6)) -(define (eof-object? object) - (eq? object (object-new-type (ucode-type constant) 6))) +(define-integrable (eof-object? object) + (eq? object (eof-object))) (define (input-port/eof? port) (let ((eof? (port/operation port 'EOF?)))