From 79a10dd35768c1a4e742a4eb494d7156e42686fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Je=C4=8Dmen?= Date: Tue, 17 May 2022 11:32:21 +0000 Subject: [PATCH] prom speculate call targets --- rir/src/compiler/rir2pir/rir2pir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rir/src/compiler/rir2pir/rir2pir.cpp b/rir/src/compiler/rir2pir/rir2pir.cpp index e2f5f7576..cbd2c6372 100644 --- a/rir/src/compiler/rir2pir/rir2pir.cpp +++ b/rir/src/compiler/rir2pir/rir2pir.cpp @@ -669,8 +669,8 @@ bool Rir2Pir::compileBC(const BC& bc, Opcode* pos, Opcode* nextPos, // Insert a guard if we want to speculate if (!staticMonomorphicBuiltin && (monomorphicBuiltin || monomorphicClosure || monomorphicSpecial)) { - // Can't speculate in promises - if (inPromise()) { + // Can't speculate while inlining a promise (there's no framestate) + if (inlining()) { monomorphicBuiltin = monomorphicClosure = monomorphicSpecial = false; } else {