createFunctionObject

abstract fun createFunctionObject(cx: Context, scope: Scriptable, bytecode: Any, staticSecurityDomain: Any?): Function

Wraps compiled bytecode as a callable function living in scope.