| 2694 | CodeInfo::nodeList.push_back(new NodeFuncCall(func, func->funcType->funcType)); |
| 2695 | } |
| 2696 | void AddTypeAllocation(const char* pos, bool arrayType) |
| 2697 | { |
| 2698 | if(currType == typeVoid) |
| 2699 | ThrowError(pos, "ERROR: cannot allocate space for void type"); |
| 2700 | CodeInfo::nodeList.push_back(new NodeZeroOP(typeInt)); |
| 2701 | CodeInfo::nodeList.push_back(new NodeUnaryOp(cmdPushTypeID, (currType->arrLevel ? currType->subType : currType)->typeIndex)); |
| 2702 | if(!arrayType) |
| 2703 | { |
| 2704 | CallAllocationFunction(pos, "__newS"); |
| 2705 | CodeInfo::nodeList.back()->typeInfo = CodeInfo::GetReferenceType(currType); |
| 2706 | }else{ |
| 2707 | assert(currType->arrSize == TypeInfo::UNSIZED_ARRAY); |
| 2708 | CallAllocationFunction(pos, "__newA"); |
| 2709 | CodeInfo::nodeList.back()->typeInfo = currType; |
| 2710 | } |
| 2711 | } |
| 2712 | |
| 2713 | void AddDefaultConstructorCall(const char* pos, const char* name) |
| 2714 | { |
no test coverage detected