1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
guile/module
Andy Wingo fd17cf9f72 Speed up port position access from Scheme
* libguile/ports-internal.h (scm_port_buffer_position):
  (scm_port_position_line, scm_port_position_set_line):
  (scm_port_position_column, scm_port_position_set_column): New
  helpers.
  (scm_t_port): Ports now hold position as a pair, so that Scheme can
  access it easily.
  (SCM_LINUM, SCM_COL, SCM_INCLINE, SCM_ZEROCOL, SCM_INCCOL)
  (SCM_DECCOL, SCM_TABCOL): Remove.
* libguile/ports.c (make_port_buffer): Rename from
  scm_c_make_port_buffer, make static, and take port as an argument so
  we can initialize the position field.
  (initialize_port_buffers): Adapt make_port_buffer change.
  (scm_c_make_port_with_encoding): Initialize position.
  (update_port_position): Rename from update_port_lf, and operate on
  port position objects.
  (scm_ungetc): Operate on port position objects.
  (scm_setvbuf, scm_expand_port_read_buffer_x): Adapt to
  make_port_buffer change.
  (scm_lfwrite): Adapt to call update_port_position.
  (scm_port_line, scm_set_port_line_x, scm_port_column)
  (scm_set_port_column_x): Adapt to use port positions.
* libguile/ports.h (scm_c_make_port_buffer): Remove internal decl.
* libguile/read.c: Adapt to use scm_port_line / scm_port_column instead
  of SCM_LINUM et al.
* module/ice-9/ports.scm (port-buffer-position, port-position-line)
  (port-position-column, set-port-position-line!)
  (set-port-position-column!): New accessors for the internals module.
* module/ice-9/sports.scm (advance-port-position!): Rename from
  port-advance-position! and use the new accessors.
  (read-char, port-fold-chars/iso-8859-1): Adapt to use
  advance-port-position!.
2016-05-22 18:16:19 +02:00
..
ice-9 Speed up port position access from Scheme 2016-05-22 18:16:19 +02:00
language Add integer->char and char->integer opcodes 2016-05-04 12:36:41 +02:00
oop Add #:static-slot-allocation? 2015-02-06 13:25:17 +01:00
rnrs Merge branch 'stable-2.0' 2014-04-25 02:06:01 -04:00
scripts Wire up `guild compile -O0 foo.scm' 2015-10-22 17:44:17 +00:00
srfi Merge commit '8cf2a7ba74' 2015-01-22 13:24:30 +01:00
sxml Remove duplicate definitions of call/ec' and let/ec'. 2013-04-06 15:40:19 +02:00
system Bump objcode version 2016-05-16 09:38:09 +02:00
texinfo Improve correctness and consistency of 'eval-when' usage. 2014-01-23 10:41:22 -05:00
web make-chunked-output-port buffering fix 2016-04-11 22:23:47 +02:00
Makefile.am Add (ice-9 sports) module 2016-05-13 09:22:36 +02:00
rnrs.scm Add missing R6RS `open-file-input/output-port' procedure 2012-11-12 20:47:57 +01:00
statprof.scm Update statprof documentation; deprecate `with-statprof' 2016-02-01 15:12:36 +01:00
texinfo.scm texinfo: fix @url{@@} parsing 2014-11-09 15:56:33 +00:00