reactorlabs / rir

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

Wrong recover from missing assumptions for NotObj in nativeCallTrampoline #1291

Closed skrynski closed 1 month ago

skrynski commented 1 month ago

When trying to recover from missing assumptions, the case of NotObj does not consider the object is a promise, therefore it does not fail. It could lead to calling into a PIR function not compatible with the current arguments. Ideally, we could recursively loop over the promise. This will happen anyway in inferCurrentContext later on (provided we correctly set the fail flag)

https://github.com/reactorlabs/rir/blob/f5c47de4b0c09594635b542d0d078b2575989c0d/rir/src/compiler/native/builtins.cpp#L1366