Skip to content
  • BT Templeton's avatar
    add `nil?' primitive · 9348168e
    BT Templeton authored
    * libguile/boolean.c (scm_nil_p): New function.
    
    * libguile/vm-i-scheme.c (nilp, not_nilp):
    * libguile/vm-i-system.c (br_if_nil, br_if_not_nil): New instructions.
      Renumber other ops.
    
    * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Increment.
    
    * module/language/assembly/compile-bytecode.scm (compile-bytecode): Add
      support for writing `br-if-nil' and `br-if-not-nil' instructions.
    
    * module/language/assembly/disassemble.scm (code-annotation): Add
      `br-if-nil' and `br-if-not-nil' to the list of branch instructions.
    
    * module/language/tree-il/compile-glil.scm: Add `nil?' to
      `*primcall-ops*'.
      (flatten): Use the new branch instructions for `nil?' conditionals.
    
    * module/language/tree-il/primitives.scm: Add `nil?' to
      `*interesting-primitive-names*', `*effect-free-primitives', and
      `*effect+exception-free-primitives*'.
    9348168e