@@ -95,6 +95,8 @@ void Engine::clear()
9595 m_edgeActivatedHatValues.clear ();
9696
9797 m_running = false ;
98+
99+ m_unsupportedBlocks.clear ();
98100}
99101
100102// Resolves ID references and sets pointers of entities.
@@ -280,8 +282,10 @@ void Engine::compile()
280282 auto b = block->inputAt (block->findInput (" custom_block" ))->valueBlock ();
281283 procedureBytecodeMap[b->mutationPrototype ()->procCode ()] = script->bytecode ();
282284 }
283- } else
285+ } else {
284286 std::cout << " warning: unsupported top level block: " << block->opcode () << std::endl;
287+ m_unsupportedBlocks.insert (block->opcode ());
288+ }
285289 }
286290 }
287291
@@ -298,6 +302,11 @@ void Engine::compile()
298302 m_scripts[block]->setLists (compiler.lists ());
299303 }
300304 }
305+
306+ const auto &unsupportedBlocks = compiler.unsupportedBlocks ();
307+
308+ for (const std::string &opcode : unsupportedBlocks)
309+ m_unsupportedBlocks.insert (opcode);
301310 }
302311
303312 // Compile monitor blocks to bytecode
@@ -343,8 +352,15 @@ void Engine::compile()
343352 script->setConstValues (compiler.constValues ());
344353 script->setVariables (compiler.variables ());
345354 script->setLists (compiler.lists ());
346- } else
355+ } else {
347356 std::cout << " warning: unsupported monitor block: " << block->opcode () << std::endl;
357+ m_unsupportedBlocks.insert (block->opcode ());
358+ }
359+
360+ const auto &unsupportedBlocks = compiler.unsupportedBlocks ();
361+
362+ for (const std::string &opcode : unsupportedBlocks)
363+ m_unsupportedBlocks.insert (opcode);
348364 }
349365}
350366
@@ -1622,6 +1638,11 @@ void Engine::setUserAgent(const std::string &agent)
16221638 m_userAgent = agent;
16231639}
16241640
1641+ const std::unordered_set<std::string> &Engine::unsupportedBlocks () const
1642+ {
1643+ return m_unsupportedBlocks;
1644+ }
1645+
16251646void Engine::finalize ()
16261647{
16271648 m_eventLoopMutex.lock ();
0 commit comments