iwillspeak / feersum

A Scheme compiler that targets .NET written in F#
http://playlist.feersum-scheme.net
MIT License
24 stars 1 forks source link

Remove ParentEnvironment from EmitCtx #51

Open iwillspeak opened 2 years ago

iwillspeak commented 2 years ago

Only make instance methods on the environment iff the parent is captured.

The current emit context keeps track of the parent context to handle the case where the current method doesn't have an environment but the parent method does. In that case we still currently emit the method as an instance method on the parent's environment. There doesn't seem to be a need to do so however. instead we could emit it as a static metod on the current library type.