MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / ScriptCallable

Method ScriptCallable

src/hx/cppia/CppiaFunction.cpp:26–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25
26ScriptCallable::ScriptCallable(CppiaStream &stream)
27{
28 body = 0;
29 stackSize = 0;
30 data = 0;
31 returnTypeId = stream.getInt();
32 returnType = etVoid;
33 argCount = stream.getInt();
34 args.resize(argCount);
35 hasDefault.resize(argCount);
36 initVals.resize(argCount);
37 captureSize = 0;
38 hasDefaults = false;
39 #ifdef CPPIA_JIT
40 compiled = 0;
41 #endif
42 for(int a=0;a<argCount;a++)
43 {
44 args[a].fromStream(stream);
45 bool init = stream.getBool();
46 hasDefault[a] = init;
47 if (init)
48 initVals[a].fromStream(stream);
49 }
50 body = createCppiaExpr(stream);
51}
52
53
54ScriptCallable::ScriptCallable(CppiaExpr *inBody) : CppiaDynamicExpr(inBody)

Callers

nothing calls this directly

Calls 5

createCppiaExprFunction · 0.85
getIntMethod · 0.45
fromStreamMethod · 0.45
getBoolMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected