1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 13:00:26 +02:00
guile/module/system/vm
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
..
assembler.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
coverage.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00
debug.scm Fix frame-call-representation for callees without closures 2019-11-27 15:04:55 +01:00
disassembler.scm CPS compiler reduces eq? on constant to eq-constant? 2020-08-03 22:19:18 +02:00
dwarf.scm Rename "RTL" to "bytecode" 2013-12-02 21:31:47 +01:00
elf.scm elf: Add missing argument in 'elf-segment'. 2015-03-30 15:19:58 +02:00
frame.scm bitvector-flip-all-bits! replaces bit-invert! 2020-04-18 22:16:31 +02:00
inspect.scm Remove assembly language. 2013-11-08 16:45:10 +01:00
linker.scm Fix linker bug that could fail to find the shstrtab 2018-10-08 10:08:33 +02:00
loader.scm Rename objcodes?.{scm,c,h} to loader.{scm,c,h} 2013-11-19 21:45:07 +01:00
program.scm Add instrumentation to VM builtins 2018-08-17 08:50:33 +02:00
trace.scm Remove push continuation hook; return hook runs before FP pop 2018-08-06 17:00:45 +02:00
trap-state.scm No more VM objects visible to Scheme 2013-11-21 16:45:03 +01:00
traps.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00
vm.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00