mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
-O gen-C++ support for type expressions
This commit is contained in:
parent
ae62209e78
commit
9f5fba7003
6 changed files with 29 additions and 0 deletions
|
@ -149,6 +149,14 @@ void CPP_IndexedInits<T>::Generate(InitsManager* im, std::vector<FuncValPtr>& iv
|
|||
ivec[offset] = lookup_func__CPP(fn, num_bodies, hashes, im->Types(t));
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void CPP_IndexedInits<T>::Generate(InitsManager* im, std::vector<TypeValPtr>& ivec, int offset,
|
||||
ValElemVec& init_vals) const {
|
||||
auto bt = base_type(static_cast<TypeTag>(init_vals[0]));
|
||||
auto t = make_intrusive<TypeType>(bt);
|
||||
ivec[offset] = make_intrusive<TypeVal>(t);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void CPP_IndexedInits<T>::Generate(InitsManager* im, std::vector<AttrPtr>& ivec, int offset,
|
||||
ValElemVec& init_vals) const {
|
||||
|
@ -216,6 +224,7 @@ template class CPP_IndexedInits<RecordValPtr>;
|
|||
template class CPP_IndexedInits<TableValPtr>;
|
||||
template class CPP_IndexedInits<FileValPtr>;
|
||||
template class CPP_IndexedInits<FuncValPtr>;
|
||||
template class CPP_IndexedInits<TypeValPtr>;
|
||||
template class CPP_IndexedInits<AttrPtr>;
|
||||
template class CPP_IndexedInits<AttributesPtr>;
|
||||
template class CPP_IndexedInits<TypePtr>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue