MCPcopy Create free account
hub / github.com/christophhart/HISE / compileScript

Method compileScript

hi_scripting/scripting/ScriptProcessor.cpp:1479–1512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1477}
1478
1479void JavascriptProcessor::compileScript(const ResultFunction& rf /*= ResultFunction()*/)
1480{
1481 inplaceValues.clearQuick();
1482
1483 clearCallableObjects();
1484
1485 auto f = [rf](Processor* p)
1486 {
1487 auto jp = dynamic_cast<JavascriptProcessor*>(p);
1488
1489 auto result = jp->compileInternal();
1490
1491 auto postCompile = [result, rf](Dispatchable* obj)
1492 {
1493
1494
1495 auto jp = static_cast<JavascriptProcessor*>(obj);
1496 jp->stuffAfterCompilation(result);
1497
1498 if(rf)
1499 rf(result);
1500
1501 return Dispatchable::Status::OK;
1502 };
1503
1504 jp->mainController->getLockFreeDispatcher().callOnMessageThreadAfterSuspension(jp, postCompile);
1505
1506 return SafeFunctionCall::OK;
1507 };
1508
1509 mainController->getJavascriptThreadPool().deactivateSleepUntilCompilation();
1510
1511 mainController->getKillStateHandler().killVoicesAndCall(dynamic_cast<Processor*>(this), f, MainController::KillStateHandler::TargetThread::ScriptingThread);
1512}
1513
1514
1515void JavascriptProcessor::setupApi()

Callers 8

createInterfaceMethod · 0.45
setEffectMethod · 0.45
keyPressedMethod · 0.45
addMethod · 0.45
compileAllScriptsMethod · 0.45
addMethod · 0.45
addModulatorMethod · 0.45
compileAllScriptsMethod · 0.45

Calls 6

stuffAfterCompilationMethod · 0.80
clearQuickMethod · 0.45
compileInternalMethod · 0.45
killVoicesAndCallMethod · 0.45

Tested by

no test coverage detected