racket / ChezScheme

Chez Scheme
Apache License 2.0
110 stars 8 forks source link

Use system flag of primitives to avoid check in primvars.ms #13

Closed gus-massa closed 4 years ago

gus-massa commented 4 years ago

With this flag the primitive is not tested in primvars.ms, but other parts of the compiler can use the signature/flags.

Also, add a signature to every system boolean primitive.

I rebased the commit from https://github.com/cisco/ChezScheme/pull/295 and fixed a few errors. In particular in $sealed-record?, $vector-ref-check? and family, and $compound-condition? (that had a nonsensical proposed signature). I also added the signature to $value and uncomented a few signatures.

I'm not sure in particular if I'm using the mifoldable flag correctly.

mflatt commented 4 years ago

Looks ok as far as I can tell, including the mifoldable declarations. I notice that $integer-16? and company now have a redundant (I think) single-valued, when it looks like you have normally removed those.

gus-massa commented 4 years ago

It was difficult to rebase the old commit, because the diff was confused by the new primitives. I forget to remove the single-valued flag in $integer-16?. I made a new commit to remove them (it should be squashed).

I also uncommented a few few flags that I was unsure. I can revert this part if necessary.

mflatt commented 4 years ago

LGTM