reactorlabs / rir

GNU General Public License v2.0
62 stars 18 forks source link

Try SimpleInt / SimpleReal in context for lazy and !refl #1279

Open skrynski opened 5 months ago

skrynski commented 5 months ago

Sometimes we get a context flagged with SimpleInt, NoRefl, Lazy . This means we get a promise which is, most likely, just a variable lookup that is bound (eventually, after several promises in between) to a simple int. We would get a simple int as long this is not modified by reflection. Currently, when translating the context to the type of the arg, we ONLY set the type simpleInt when the argument is already Eager. We could optimize for this missing case. For example, if the arguments are forced right away and are all flagged with 'NoRefl'. Then it's safe to assume we got an integer.