1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +02:00
guile/module/language/cps
Andy Wingo d238566d0e CPS compiler reduces eq? on constant to eq-constant?
* module/language/cps/compile-bytecode.scm (compile-function): Expect
  eq-constant? instead of eq-null?, etc.
* module/language/cps/effects-analysis.scm: Likewise.
* module/language/cps/reify-primitives.scm (reify-primitives): For
  eq-constant?, reify a $const unless the constant is an immediate whose
  encoding fits in 16 bits.
* module/language/cps/type-fold.scm (materialize-constant): Helper to
  make a constant from a type, min, and max.
  (fold-eq-constant?): New helper.
  (eq-constant?): New folder.
  (undefined?): Define specifically.
  (define-nullish-predicate-folder): Renamd from
  define-special-immediate-predicate-folder.  Use only for null?, false,
  and nil?.
  (*branch-reducers*): New mechanism.  Reduce eq? to eq-constant? if
  possible.
  (local-type-fold): Refactor to use materialize-constant, and to allow
  reducing branches.
* module/language/cps/types.scm (constant-type): Return three values
  instead of a type entry.
  (constant-type-entry): New function that returns a type entry.  Adapt
  callers.
  (infer-constant-comparison): New helper.
  (eq-constant?): New inferrer.
  (undefined?): New inferrer.
* module/language/tree-il/compile-bytecode.scm (eq-constant?): Fix
  truncate-bits signed arg.
  (define-immediate-type-predicate): Adapt to visit-immediate-tags
  change.
* module/language/tree-il/compile-cps.scm (convert): Convert eq? to
  constant to eq-constant?.  Advantaged is that it gets fixnums and
  chars in addition to special immediates.
* module/language/tree-il/cps-primitives.scm (define-immediate-type-predicate):
  Adapt to allow #f as pred.
* module/system/base/types/internal.scm (immediate-tags): Use #f as pred
  for false, nil, etc.
  (immediate-bits->scm): Adapt.
* module/system/vm/assembler.scm (emit-eq-null?, emit-eq-nil?)
  (emit-eq-false?, emit-eq-true?, emit-unspecified?, emit-eof-object?):
  Remove specialized emitters.
* module/system/vm/assembler.scm (define-immediate-tag=?-macro-assembler):
  Allow for pred to be #f.
* module/system/vm/disassembler.scm (define-immediate-tag-annotation):
  Adapt to pred being #f.
2020-08-03 22:19:18 +02:00
..
closure-conversion.scm Fix bug in closure conversion 2020-01-11 11:50:44 +01:00
compile-bytecode.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
contification.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
cse.scm Make CSE more robust 2020-06-12 15:58:54 +02:00
dce.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
devirtualize-integers.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
effects-analysis.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
graphs.scm Slight optimization to invert-bijectiono 2020-05-28 10:58:09 +02:00
intmap.scm Fix intmap-intersect edge case 2019-06-11 12:56:23 +02:00
intset.scm Replace bit-position with bitvector-position 2020-04-12 22:39:55 +02:00
licm.scm Rename $closure to $const-fun 2018-10-03 22:58:45 +02:00
loop-instrumentation.scm Emit instrument-loop in loops. 2018-07-29 15:47:07 +02:00
optimize.scm Fix optimizers after language lowerer refactor 2020-05-13 09:04:16 +02:00
peel-loops.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
prune-top-level-scopes.scm cache-current-module, etc use immediate primcall parameters 2017-11-05 15:00:16 +01:00
reify-primitives.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
renumber.scm 'sort-labels-locally' uses a transient intset. 2020-03-23 22:49:47 +01:00
rotate-loops.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
self-references.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
simplify.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
slot-allocation.scm Remove duplicate procedure in slot-allocation.scm. 2020-02-08 11:28:59 +01:00
spec.scm Define new "lowering" phase in compiler 2020-05-08 17:07:56 +02:00
specialize-numbers.scm Fix fixpoint computation in compute-significant-bits 2020-03-23 14:49:03 +01:00
specialize-primcalls.scm Compiler allocates boxed flonums in unmarked space 2019-08-26 10:19:24 +02:00
split-rec.scm Add compiler support for eliding closure bindings 2019-06-07 17:01:37 +02:00
type-checks.scm $branch is now a distinct CPS term type 2018-01-03 16:16:39 +01:00
type-fold.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
types.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
utils.scm Split graph utilities out of (language cps utils) 2019-08-13 12:53:10 +02:00
verify.scm Add support no closure in $callk 2019-06-07 17:01:43 +02:00
with-cps.scm Add missing files 2015-07-22 18:27:37 +02:00