| 24 | |
| 25 | |
| 26 | ScriptCallable::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 | |
| 54 | ScriptCallable::ScriptCallable(CppiaExpr *inBody) : CppiaDynamicExpr(inBody) |
nothing calls this directly
no test coverage detected