Skip to content

Commit

Permalink
disable deoptless in toplevel promise for now
Browse files Browse the repository at this point in the history
  • Loading branch information
JanJecmen committed May 19, 2022
1 parent 2197f32 commit f750863
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rir/src/compiler/native/builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,9 @@ SEXP deopt(rir::Code* c, SEXP cls, DeoptMetadata* m, R_bcstack_t* args,
auto le = LazyEnvironment::check(env);
if (deoptless && m->numFrames == 1 && cls != deoptlessRecursion &&
((le && !le->materialized()) ||
(!le && (!leakedEnv || !deoptlessNoLeakedEnvs)))) {
assert(m->frames[0].inPromise == false);
(!le && (!leakedEnv || !deoptlessNoLeakedEnvs))) &&
/* TODO: support deoptless when outermost frame is a promise */
!m->frames[0].inPromise) {

size_t envSize = le ? le->nargs : Rf_length(FRAME(env));
if (envSize <= DeoptContext::MAX_ENV &&
Expand Down

0 comments on commit f750863

Please sign in to comment.