MCPcopy Create free account
hub / github.com/anjo76/angelscript / asCScriptEngine

Method asCScriptEngine

sdk/angelscript/source/as_scriptengine.cpp:659–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659asCScriptEngine::asCScriptEngine()
660{
661 asCThreadManager::Prepare(0);
662
663 shuttingDown = false;
664 inDestructor = false;
665
666 // Engine properties
667 {
668 ep.allowUnsafeReferences = false;
669 ep.optimizeByteCode = true;
670 ep.copyScriptSections = true;
671 ep.maximumContextStackSize = 0; // no limit
672 ep.initContextStackSize = 1024; // 4KB default init stack size
673 ep.useCharacterLiterals = false;
674 ep.allowMultilineStrings = false;
675 ep.allowImplicitHandleTypes = false;
676 // TODO: optimize: Maybe this should be turned off by default? If a debugger is not used
677 // then this is just slowing down the execution.
678 ep.buildWithoutLineCues = false;
679 ep.initGlobalVarsAfterBuild = true;
680 ep.requireEnumScope = false;
681 ep.scanner = 1; // utf8. 0 = ascii
682 ep.includeJitInstructions = false;
683 ep.stringEncoding = 0; // utf8. 1 = utf16
684 ep.propertyAccessorMode = 3; // 0 = disable, 1 = app registered only, 2 = app and script created, 3 = flag with 'property'
685 ep.expandDefaultArrayToTemplate = false;
686 ep.autoGarbageCollect = true;
687 ep.disallowGlobalVars = false;
688 ep.alwaysImplDefaultConstruct = 0; // 0 = as per language spec, 1 = always implement it, 2, never implement
689 ep.compilerWarnings = 1; // 0 = no warnings, 1 = warning, 2 = treat as error
690 // TODO: 3.0.0: disallowValueAssignForRefType should be true by default
691 ep.disallowValueAssignForRefType = false;
692 ep.alterSyntaxNamedArgs = 0; // 0 = no alternate syntax, 1 = accept alternate syntax but warn, 2 = accept without warning
693 ep.disableIntegerDivision = false;
694 ep.disallowEmptyListElements = false;
695 ep.privatePropAsProtected = false;
696 ep.allowUnicodeIdentifiers = false;
697 ep.heredocTrimMode = 1; // 0 = never trim, 1 = don't trim on single line, 2 = trim initial and final empty line
698 ep.maxNestedCalls = 100;
699 ep.genericCallMode = 1; // 0 = old (pre 2.33.0) behavior where generic ignored auto handles, 1 = treat handles like in native call
700 ep.initCallStackSize = 10; // 10 levels of calls
701 ep.maxCallStackSize = 0; // 0 = no limit
702 ep.ignoreDuplicateSharedIntf = false;
703 ep.noDebugOutput = false;
704 ep.disableScriptClassGC = false;
705 ep.jitInterfaceVersion = 1; // 1 = JIT compiler uses asJITCompiler, 2 = JIT compiler uses asJITCompilerV2
706 ep.alwaysImplDefaultCopy = 0; // 0 = as per language spec, 1 = always implement it, 2, never implement
707 ep.alwaysImplDefaultCopyConstruct = 0; // 0 = as per language spec, 1 = always implement it, 2, never implement
708 ep.memberInitMode = 1; // 0 = pre 2.38.0, members with init expr in declaration are initialized after super(), 1 = all members initialized in beginning, except if explicitly initialized in body
709 ep.boolConversionMode = 0; // 0 = only do use opImplConv for registered value type, 1 = use also opConv in contextual conversion even for reference types
710 ep.foreachSupport = true;
711 }
712
713 gc.engine = this;
714 tok.engine = this;
715
716 refCount.set(1);

Callers

nothing calls this directly

Calls 4

RegisterScriptObjectFunction · 0.85
RegisterScriptFunctionFunction · 0.85
setMethod · 0.80
PushLastMethod · 0.80

Tested by

no test coverage detected