cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.96k stars 984 forks source link

Propagate immutable-"" in cp0 #635

Closed gus-massa closed 2 years ago

gus-massa commented 2 years ago

Also, propagate the immutable versions of #(), #vu8() and #vfx().

And a similar change in cpnanopass, that includes also

(define (eqok-help? obj)
  (or ...
      (eq? obj '#6=#6#)))
burgerrg commented 2 years ago

The (string->immutable-string "") expression generates a procedure call to string->immutable-string, which then compares against the empty string to return (tc-field null-immutable-string ($tc)). The same is true for the other immutable data types.

For the call sites in cp0.ss, why not use the tc-field construct to get the singleton immutable object to compare against?

gus-massa commented 2 years ago

Done