backend update from Raze
* moving large allocations off the stack * use proper printf formatters for size_t and ptrdiff_t. * adding some missing 'noexcept'.
This commit is contained in:
parent
df9b2cd9bf
commit
83aa9388ca
29 changed files with 117 additions and 109 deletions
|
|
@ -11674,7 +11674,7 @@ FxExpression *FxThreeArgForEachLoop::Resolve(FCompileContext &ctx)
|
|||
|
||||
if(HasGameSpecificThreeArgForEachLoopTypeNames())
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "foreach( a, b, c : it ) - 'it' must be % but is a %s", GetGameSpecificThreeArgForEachLoopTypeNames(), BlockIteratorExpr->ValueType->DescriptiveName());
|
||||
ScriptPosition.Message(MSG_ERROR, "foreach( a, b, c : it ) - 'it' must be %s but is a %s", GetGameSpecificThreeArgForEachLoopTypeNames(), BlockIteratorExpr->ValueType->DescriptiveName());
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -11727,7 +11727,7 @@ FxExpression *FxTypedForEachLoop::Resolve(FCompileContext &ctx)
|
|||
|
||||
if(HasGameSpecificTypedForEachLoopTypeNames())
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "foreach(Type var : it ) - 'it' must be % but is a %s",GetGameSpecificTypedForEachLoopTypeNames(), Expr->ValueType->DescriptiveName());
|
||||
ScriptPosition.Message(MSG_ERROR, "foreach(Type var : it ) - 'it' must be %s but is a %s",GetGameSpecificTypedForEachLoopTypeNames(), Expr->ValueType->DescriptiveName());
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class PSymbolType : public PSymbol
|
|||
{
|
||||
DECLARE_CLASS(PSymbolType, PSymbol);
|
||||
public:
|
||||
PType *Type;
|
||||
PType *Type = nullptr;
|
||||
|
||||
PSymbolType(FName name, class PType *ty) : PSymbol(name), Type(ty) {}
|
||||
PSymbolType() : PSymbol(NAME_None) {}
|
||||
|
|
@ -66,7 +66,7 @@ class PSymbolTreeNode : public PSymbol
|
|||
{
|
||||
DECLARE_CLASS(PSymbolTreeNode, PSymbol);
|
||||
public:
|
||||
struct ZCC_TreeNode *Node;
|
||||
struct ZCC_TreeNode *Node = nullptr;
|
||||
|
||||
PSymbolTreeNode(FName name, struct ZCC_TreeNode *node) : PSymbol(name), Node(node) {}
|
||||
PSymbolTreeNode() : PSymbol(NAME_None) {}
|
||||
|
|
@ -147,11 +147,11 @@ public:
|
|||
void *Pad;
|
||||
};
|
||||
|
||||
PSymbolConstNumeric(FName name, PType *type=NULL) : PSymbolConst(name, type) {}
|
||||
PSymbolConstNumeric(FName name, PType *type=nullptr) : PSymbolConst(name, type), Float(0) {}
|
||||
PSymbolConstNumeric(FName name, PType *type, int val) : PSymbolConst(name, type), Value(val) {}
|
||||
PSymbolConstNumeric(FName name, PType *type, unsigned int val) : PSymbolConst(name, type), Value((int)val) {}
|
||||
PSymbolConstNumeric(FName name, PType *type, double val) : PSymbolConst(name, type), Float(val) {}
|
||||
PSymbolConstNumeric() {}
|
||||
PSymbolConstNumeric() : Float(0) {}
|
||||
};
|
||||
|
||||
// A constant string value --------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ void DumpTypeTable()
|
|||
}
|
||||
Printf("\n");
|
||||
}
|
||||
Printf("Used buckets: %d/%lu (%.2f%%) for %d entries\n", used, countof(TypeTable.TypeHash), double(used)/countof(TypeTable.TypeHash)*100, all);
|
||||
Printf("Used buckets: %d/%zu (%.2f%%) for %d entries\n", used, countof(TypeTable.TypeHash), double(used)/countof(TypeTable.TypeHash)*100, all);
|
||||
Printf("Min bucket size: %d\n", min);
|
||||
Printf("Max bucket size: %d\n", max);
|
||||
Printf("Avg bucket size: %.2f\n", double(all) / used);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue