[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/21: %read-char speedup
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/21: %read-char speedup |
Date: |
Mon, 16 May 2016 07:39:33 +0000 (UTC) |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit a8fe0f42f3483e79ac633d2e7451ad186d5a3b79
Author: Andy Wingo <address@hidden>
Date: Tue May 10 16:30:50 2016 +0200
%read-char speedup
* module/ice-9/ports.scm (%read-char): Always call update-position! with
the same continuation, so that it will contify.
---
module/ice-9/ports.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/module/ice-9/ports.scm b/module/ice-9/ports.scm
index 43283e7..27a5708 100644
--- a/module/ice-9/ports.scm
+++ b/module/ice-9/ports.scm
@@ -492,9 +492,10 @@ interpret its input and output."
(let ((buf (port-read-buffer port)))
(set-port-buffer-cur! buf (+ (port-buffer-cur buf) len))
(if (eq? char the-eof-object)
- (set-port-buffer-has-eof?! buf #f)
- (update-position! char))
- char))))
+ (begin
+ (set-port-buffer-has-eof?! buf #f)
+ char)
+ (update-position! char))))))
(define (fast-path buf bv cur buffered)
(let ((u8 (bytevector-u8-ref bv cur))
(enc (%port-encoding port)))
- [Guile-commits] branch wip-port-refactor updated (d28d1a5 -> da456d2), Andy Wingo, 2016/05/16
- [Guile-commits] 07/21: Embed scm_t_port in scm_t_port_internal, Andy Wingo, 2016/05/16
- [Guile-commits] 21/21: Bump objcode version, Andy Wingo, 2016/05/16
- [Guile-commits] 02/21: Implement lookahead-u8, get-u8 in Scheme, Andy Wingo, 2016/05/16
- [Guile-commits] 10/21: Make scm_t_port private, Andy Wingo, 2016/05/16
- [Guile-commits] 17/21: Update port mode bits documentation., Andy Wingo, 2016/05/16
- [Guile-commits] 08/21: Make file/line/column fields of ports private, Andy Wingo, 2016/05/16
- [Guile-commits] 20/21: Update NEWS for release, Andy Wingo, 2016/05/16
- [Guile-commits] 18/21: Document scm_c_make_port and friends, Andy Wingo, 2016/05/16
- [Guile-commits] 01/21: %read-char speedup,
Andy Wingo <=
- [Guile-commits] 12/21: Update port documentation, Andy Wingo, 2016/05/16
- [Guile-commits] 04/21: Add (ice-9 sports) module, Andy Wingo, 2016/05/16
- [Guile-commits] 13/21: Make scm_t_ptob_descriptor private., Andy Wingo, 2016/05/16
- [Guile-commits] 15/21: Update port type documentation, Andy Wingo, 2016/05/16
- [Guile-commits] 09/21: Make port buffering fields private, Andy Wingo, 2016/05/16
- [Guile-commits] 16/21: Add SCM_OPN to mode bits when making ports, Andy Wingo, 2016/05/16
- [Guile-commits] 03/21: Beginnings of shunting ports-in-scheme off to a module, Andy Wingo, 2016/05/16
- [Guile-commits] 14/21: Use heap-allocated port types instead of ptobnums, Andy Wingo, 2016/05/16
- [Guile-commits] 11/21: Remove scm_t_port_internal, Andy Wingo, 2016/05/16
- [Guile-commits] 06/21: Remove SCM backlink in port structure, Andy Wingo, 2016/05/16