1. 14 Mar, 2013 9 commits
    • Daniel Gackle's avatar
      An initial implementation of source mappings. · 053e9d45
      Daniel Gackle authored
      When consuming source code from a stream, the compiler now optionally
      collects the start and end position of each list the reader reads
      (atoms aren't tracked - see below), threads this information all the
      way through to the printer, and associates it with the start and end
      positions of the corresponding JS being generated.
      
      Note that this is an expression-based way of doing source maps as
      opposed to the line-based approach of the Google/Mozilla source map
      spec. This is a much richer and Lispier way to do it. But converting
      to the line-based format will require tracking lines in the printer.
      That work is not part of this commit.
      
      Text extents of forms are tracked in a big EQ-hash-table of which the
      forms themselves are the keys. This has the disadvantage that atomic
      tokens such as variable names don't get their source mappings tracked
      (though see note [1] below). It has the much greater advantage of
      making the source mapping implementation not be too invasive. I tried
      the alternative implementation of consing the text extents as metadata
      onto the heads of each cons to be compiled. This worked, but had the
      consequence that any compiler code that needs to pick apart the forms
      it is given must be aware of this optional (because source mappings
      may be turned off) metadata at the head - and, Lisp being what it is,
      "compiler code" here includes any PS macros that anybody writes. That
      is far too heavy a burden to place on macros even if the PS compiler
      itself could stand it. Storing the metadata on the side avoids this;
      now only those portions of the compiler that care about preserving the
      source mappings of the forms they are given need worry about them, and
      for any forms they are passing on untransformed they can just ignore
      this extra information. Similarly, macros that wish to propagate
      source mappings have the option of doing so, but also have the option
      of remaining blissfully ignorant.
      
      [1] Tricks could be applied to work around this. For example, atoms
      that appear inside conses could be uniquely identified using the cons
      plus an integer index. But this would be a lot more work, both to
      develop and more importantly at runtime, and it's not clear whether
      the more precise mappings would be worth it.
      053e9d45
    • Daniel Gackle's avatar
      Whitespace · e5705486
      Daniel Gackle authored
      e5705486
    • Daniel Gackle's avatar
      Minor refactoring; comments. · 3bbf7c27
      Daniel Gackle authored
      3bbf7c27
    • Daniel Gackle's avatar
      Undeprecated BIND because it is used by LOOP; moved BIND and BIND* · 16144f60
      Daniel Gackle authored
      into ps-loop.lisp.
      16144f60
    • Daniel Gackle's avatar
      Suppress inappropriate deprecation warnings that were arising during · b7c7791d
      Daniel Gackle authored
      the poor-man's codewalking of try-expressionizing-if?.
      
      Example:
        (try-expressionizing-if? '(for-in (label (foo))))
      
      The codewalker macroexpands (label (foo)) even though it is
      not a macro invocation. Since LABEL is a deprecated macro,
      a warning was leaking through.
      b7c7791d
    • Daniel Gackle's avatar
      Deleted dead code · a153fc86
      Daniel Gackle authored
      a153fc86
    • Daniel Gackle's avatar
      Minor refactoring: hide multiple-value vs. single-value distinction · 8f7b73a9
      Daniel Gackle authored
      inside RETURN-EXP so it presents one interface to the outside world.
      
      This makes the implementation of source mappings a little easier.
      8f7b73a9
    • Daniel Gackle's avatar
      Minor refactoring: made the order of bindings in LABELS the same as in · fa44e1d1
      Daniel Gackle authored
      FLET so the symmetry between the two is more apparent.
      fa44e1d1
    • Daniel Gackle's avatar
      Minor refactoring: removed unused gensym (was producing a compiler · d6b4a836
      Daniel Gackle authored
      warning in CCL.)
      d6b4a836
  2. 02 Mar, 2013 1 commit
  3. 25 Feb, 2013 1 commit
    • Daniel Gackle's avatar
      Refactoring: got rid of PARENTHESIZE-EQUALITY. · 4a55356d
      Daniel Gackle authored
      There is no need for PARENTHESIZE-EQUALITY as distinct from
      PRINT-OP-ARGUMENT, because the latter always parenthesizes equality
      expressions when they are an operand in some other equality
      expression. (In such a case, OP and ARG-OP have the same precedence,
      and neither is associative.)
      4a55356d
  4. 05 Feb, 2013 5 commits
  5. 31 Jan, 2013 2 commits
  6. 29 Nov, 2012 4 commits
  7. 24 Nov, 2012 4 commits
  8. 13 Oct, 2012 2 commits
  9. 10 Oct, 2012 1 commit
  10. 09 Oct, 2012 1 commit
  11. 08 Oct, 2012 2 commits
  12. 07 Oct, 2012 1 commit
  13. 22 Sep, 2012 2 commits
  14. 15 Sep, 2012 1 commit
  15. 14 Sep, 2012 2 commits
  16. 13 Sep, 2012 1 commit
  17. 12 Sep, 2012 1 commit