Cache const/non-const variants of Atomic and ReferenceTypes.
More reduction of dynamic memory allocation.
This commit is contained in:
3
type.h
3
type.h
@@ -332,6 +332,8 @@ private:
|
||||
const Variability variability;
|
||||
const bool isConst;
|
||||
AtomicType(BasicType basicType, Variability v, bool isConst);
|
||||
|
||||
mutable const AtomicType *asOtherConstType;
|
||||
};
|
||||
|
||||
|
||||
@@ -802,6 +804,7 @@ public:
|
||||
|
||||
private:
|
||||
const Type * const targetType;
|
||||
mutable const ReferenceType *asOtherConstType;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user