mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Renamed serialization method "Materialize" to "Create". This is an API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dd479dd3fe
commit
3ba3a9b586
@ -152,8 +152,8 @@ public:
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T* Materialize() {
|
||||
return SerializeTrait<T>::Materialize(*this);
|
||||
inline T* Create() {
|
||||
return SerializeTrait<T>::Create(*this);
|
||||
}
|
||||
|
||||
char* ReadCStr(char* cstr = NULL, unsigned MaxLen=0, bool isNullTerm=true);
|
||||
@ -166,7 +166,7 @@ public:
|
||||
if (!PtrID)
|
||||
return NULL;
|
||||
|
||||
T* x = SerializeTrait<T>::Materialize(*this);
|
||||
T* x = SerializeTrait<T>::Create(*this);
|
||||
|
||||
if (AutoRegister)
|
||||
RegisterPtr(PtrID,x);
|
||||
@ -186,10 +186,10 @@ public:
|
||||
SerializedPtrID ID1 = ReadPtrID();
|
||||
SerializedPtrID ID2 = ReadPtrID();
|
||||
|
||||
P1 = (ID1) ? SerializeTrait<T1>::Materialize(*this) : NULL;
|
||||
P1 = (ID1) ? SerializeTrait<T1>::Create(*this) : NULL;
|
||||
if (ID1 && A1) RegisterPtr(ID1,P1);
|
||||
|
||||
P2 = (ID2) ? SerializeTrait<T2>::Materialize(*this) : NULL;
|
||||
P2 = (ID2) ? SerializeTrait<T2>::Create(*this) : NULL;
|
||||
if (ID2 && A2) RegisterPtr(ID2,P2);
|
||||
}
|
||||
|
||||
@ -201,13 +201,13 @@ public:
|
||||
SerializedPtrID ID2 = ReadPtrID();
|
||||
SerializedPtrID ID3 = ReadPtrID();
|
||||
|
||||
P1 = (ID1) ? SerializeTrait<T1>::Materialize(*this) : NULL;
|
||||
P1 = (ID1) ? SerializeTrait<T1>::Create(*this) : NULL;
|
||||
if (ID1 && A1) RegisterPtr(ID1,P1);
|
||||
|
||||
P2 = (ID2) ? SerializeTrait<T2>::Materialize(*this) : NULL;
|
||||
P2 = (ID2) ? SerializeTrait<T2>::Create(*this) : NULL;
|
||||
if (ID2 && A2) RegisterPtr(ID2,P2);
|
||||
|
||||
P3 = (ID3) ? SerializeTrait<T2>::Materialize(*this) : NULL;
|
||||
P3 = (ID3) ? SerializeTrait<T2>::Create(*this) : NULL;
|
||||
if (ID3 && A3) RegisterPtr(ID3,P3);
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ public:
|
||||
for (unsigned i = 0; i < NumPtrs; ++i) {
|
||||
SerializedPtrID& PtrID = BatchIDVec[i];
|
||||
|
||||
T* p = PtrID ? SerializeTrait<T>::Materialize(*this) : NULL;
|
||||
T* p = PtrID ? SerializeTrait<T>::Create(*this) : NULL;
|
||||
|
||||
if (PtrID && AutoRegister)
|
||||
RegisterPtr(PtrID,p);
|
||||
@ -246,7 +246,7 @@ public:
|
||||
for (unsigned i = 0; i < NumT1Ptrs; ++i) {
|
||||
SerializedPtrID& PtrID = BatchIDVec[i];
|
||||
|
||||
T1* p = PtrID ? SerializeTrait<T1>::Materialize(*this) : NULL;
|
||||
T1* p = PtrID ? SerializeTrait<T1>::Create(*this) : NULL;
|
||||
|
||||
if (PtrID && A1)
|
||||
RegisterPtr(PtrID,p);
|
||||
@ -254,10 +254,10 @@ public:
|
||||
Ptrs[i] = p;
|
||||
}
|
||||
|
||||
P2 = (ID2) ? SerializeTrait<T2>::Materialize(*this) : NULL;
|
||||
P2 = (ID2) ? SerializeTrait<T2>::Create(*this) : NULL;
|
||||
if (ID2 && A2) RegisterPtr(ID2,P2);
|
||||
|
||||
P3 = (ID3) ? SerializeTrait<T3>::Materialize(*this) : NULL;
|
||||
P3 = (ID3) ? SerializeTrait<T3>::Create(*this) : NULL;
|
||||
if (ID3 && A3) RegisterPtr(ID3,P3);
|
||||
}
|
||||
|
||||
@ -273,7 +273,8 @@ public:
|
||||
|
||||
|
||||
template <typename T>
|
||||
void ReadPtr(T*& PtrRef, const SerializedPtrID& PtrID, bool AllowBackpatch = true) {
|
||||
void ReadPtr(T*& PtrRef, const SerializedPtrID& PtrID,
|
||||
bool AllowBackpatch = true) {
|
||||
ReadUIntPtr(reinterpret_cast<uintptr_t&>(PtrRef), PtrID, AllowBackpatch);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ template <typename T>
|
||||
struct SerializeTrait {
|
||||
static inline void Emit(Serializer& S, const T& X) { X.Emit(S); }
|
||||
static inline void Read(Deserializer& D, T& X) { X.Read(D); }
|
||||
static inline T* Materialize(Deserializer& D) { return T::Materialize(D); }
|
||||
static inline T* Create(Deserializer& D) { return T::Create(D); }
|
||||
};
|
||||
|
||||
#define SERIALIZE_INT_TRAIT(TYPE)\
|
||||
|
Loading…
Reference in New Issue
Block a user