1. 22 Jun, 2017 5 commits
    • Ken Raeburn's avatar
      Create less garbage to collect while reading symbols. · 59f3c866
      Ken Raeburn authored
      * src/lread.c (read1): When interning a symbol, only create a new
      string object for the name if we're going to use it for a new symbol
      object.
      59f3c866
    • Ken Raeburn's avatar
      Replace read_objects assoc list with two hash tables. · b9145563
      Ken Raeburn authored
      For larger input files with lots of shared data structures, an
      association list is too slow.
      
      * src/lread.c (read_objects_map, read_objects_completed): New
      variables, replacing read_objects.
      (readevalloop): Initialize them with hash tables before starting a
      top-level read, if they're not already empty hash tables, and reset
      them to Qnil afterwards if something was added to the hash tables.
      (read_internal_start): Likewise.
      (read1): Store first the placeholder and later the newly read object
      into read_objects_map under the specified object number.  If the new
      object can contain a reference to itself, store it in
      read_objects_completed.
      (substitute_objects_recurse): Check read_objects_completed instead of
      read_objects for the known possibly-recursive objects.
      (syms_of_lread): Update initializations.
      b9145563
    • Ken Raeburn's avatar
      Use getc_unlocked. · efe200c1
      Ken Raeburn authored
      * configure.ac: Check for getc_unlocked.
      * src/charset.c (read_hex, load_charset_map_from_file): Use
      getc_unlocked instead of getc.
      (getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc.
      * src/lread.c (readbyte_from_file, Fget_file_char, read1,
      getc_unlocked): Likewise.
      efe200c1
    • Stefan Monnier's avatar
      Reduce lread substitutions. · 6af67b4a
      Stefan Monnier authored
      * src/lread.c (read1): After reading an object using the "#n=" syntax,
      if the read object is a cons cell, instead of recursively substituting
      the placeholder with the new object, mutate the placeholder cons cell
      itself to have the correct car and cdr values.
      6af67b4a
    • Ken Raeburn's avatar
      Short-circuit substitutions for some simple types. · 0b3a0f30
      Ken Raeburn authored
      Values that don't contain other values cannot be circular, so checking
      for circular objects is a waste of cycles.
      
      * src/lread.c (substitute_object_recurse): If the subtree being
      examined is a symbol, number, or property-less string, just return
      it.
      0b3a0f30
  2. 14 Jun, 2017 5 commits
  3. 13 Jun, 2017 10 commits
  4. 12 Jun, 2017 20 commits