From 580dfb2afbef15764b56714f3eb690a67f0af9c1 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 14 Dec 2019 09:22:32 -0500 Subject: Bug 1331092 - Part 8: Support JSOP_TOASYNCITER in JIT. Tag #1287 --- js/src/jit/IonBuilder.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'js/src/jit/IonBuilder.cpp') diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 171518d38..1e12f5dbe 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -2133,6 +2133,9 @@ IonBuilder::inspectOpcode(JSOp op) case JSOP_TOASYNCGEN: return jsop_toasyncgen(); + case JSOP_TOASYNCITER: + return jsop_toasynciter(); + case JSOP_TOID: return jsop_toid(); @@ -13212,6 +13215,20 @@ IonBuilder::jsop_toasyncgen() return resumeAfter(ins); } +bool +IonBuilder::jsop_toasynciter() +{ + MDefinition* unwrapped = current->pop(); + MOZ_ASSERT(unwrapped->type() == MIRType::Object); + + MToAsyncIter* ins = MToAsyncIter::New(alloc(), unwrapped); + + current->add(ins); + current->push(ins); + + return resumeAfter(ins); +} + bool IonBuilder::jsop_toid() { -- cgit v1.2.3