2 #ifndef ROSE_Cxx_GrammarSerialization_H
3 #define ROSE_Cxx_GrammarSerialization_H
5 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
8 #include <boost/serialization/export.hpp>
12 BOOST_CLASS_EXPORT_KEY(
SgFile);
57 BOOST_CLASS_EXPORT_KEY(SgAsmCommonSubExpression);
92 BOOST_CLASS_EXPORT_KEY(SgAsmElfSymverDefinedAux);
112 BOOST_CLASS_EXPORT_KEY(SgAsmElfEHFrameEntryFDList);
166 BOOST_CLASS_EXPORT_KEY(SgAsmGenericStrtab);
208 template<
class Archive>
209 void roseAstSerializationRegistration(Archive &archive) {
210 archive.template register_type<SgBinaryComposite>();
211 archive.template register_type<SgFile>();
212 archive.template register_type<SgSupport>();
213 archive.template register_type<SgAsmX86Instruction>();
214 archive.template register_type<SgAsmPowerpcInstruction>();
215 archive.template register_type<SgAsmCilInstruction>();
216 archive.template register_type<SgAsmJvmInstruction>();
217 archive.template register_type<SgAsmMipsInstruction>();
218 archive.template register_type<SgAsmM68kInstruction>();
219 archive.template register_type<SgAsmNullInstruction>();
220 archive.template register_type<SgAsmInstructionList>();
221 archive.template register_type<SgAsmInstruction>();
222 archive.template register_type<SgAsmOperandList>();
223 archive.template register_type<SgAsmBinaryAdd>();
224 archive.template register_type<SgAsmBinarySubtract>();
225 archive.template register_type<SgAsmBinaryMultiply>();
226 archive.template register_type<SgAsmBinaryDivide>();
227 archive.template register_type<SgAsmBinaryMod>();
228 archive.template register_type<SgAsmBinaryPreupdate>();
229 archive.template register_type<SgAsmBinaryPostupdate>();
230 archive.template register_type<SgAsmBinaryLsl>();
231 archive.template register_type<SgAsmBinaryMsl>();
232 archive.template register_type<SgAsmBinaryLsr>();
233 archive.template register_type<SgAsmBinaryAsr>();
234 archive.template register_type<SgAsmBinaryRor>();
235 archive.template register_type<SgAsmBinaryConcat>();
236 archive.template register_type<SgAsmBinaryExpression>();
237 archive.template register_type<SgAsmUnaryPlus>();
238 archive.template register_type<SgAsmUnaryMinus>();
239 archive.template register_type<SgAsmUnaryRrx>();
240 archive.template register_type<SgAsmUnaryTruncate>();
241 archive.template register_type<SgAsmUnarySignedExtend>();
242 archive.template register_type<SgAsmUnaryUnsignedExtend>();
243 archive.template register_type<SgAsmUnaryExpression>();
244 archive.template register_type<SgAsmDirectRegisterExpression>();
245 archive.template register_type<SgAsmIndirectRegisterExpression>();
246 archive.template register_type<SgAsmRegisterReferenceExpression>();
247 archive.template register_type<SgAsmStackExpression>();
248 archive.template register_type<SgAsmRegisterNames>();
249 archive.template register_type<SgAsmIntegerValueExpression>();
250 archive.template register_type<SgAsmFloatValueExpression>();
251 archive.template register_type<SgAsmByteOrder>();
252 archive.template register_type<SgAsmConstantExpression>();
253 archive.template register_type<SgAsmValueExpression>();
254 archive.template register_type<SgAsmMemoryReferenceExpression>();
255 archive.template register_type<SgAsmControlFlagsExpression>();
256 archive.template register_type<SgAsmCommonSubExpression>();
257 archive.template register_type<SgAsmRiscOperation>();
258 archive.template register_type<SgAsmExprListExp>();
259 archive.template register_type<SgAsmExpression>();
260 archive.template register_type<SgAsmIntegerType>();
261 archive.template register_type<SgAsmFloatType>();
262 archive.template register_type<SgAsmScalarType>();
263 archive.template register_type<SgAsmVectorType>();
264 archive.template register_type<SgAsmType>();
265 archive.template register_type<SgAsmFunction>();
266 archive.template register_type<SgAsmBlock>();
267 archive.template register_type<SgAsmStaticData>();
268 archive.template register_type<SgAsmSynthesizedDataStructureDeclaration>();
269 archive.template register_type<SgAsmSynthesizedFieldDeclaration>();
270 archive.template register_type<SgAsmSynthesizedDeclaration>();
271 archive.template register_type<SgAsmStatement>();
272 archive.template register_type<SgAsmInterpretationList>();
273 archive.template register_type<SgAsmInterpretation>();
274 archive.template register_type<SgAsmElfFileHeader>();
275 archive.template register_type<SgAsmJvmFileHeader>();
276 archive.template register_type<SgAsmElfSectionTable>();
277 archive.template register_type<SgAsmElfSectionTableEntry>();
278 archive.template register_type<SgAsmElfSegmentTable>();
279 archive.template register_type<SgAsmElfSegmentTableEntryList>();
280 archive.template register_type<SgAsmElfSegmentTableEntry>();
281 archive.template register_type<SgAsmElfSymbolSection>();
282 archive.template register_type<SgAsmElfSymbolList>();
283 archive.template register_type<SgAsmElfSymbol>();
284 archive.template register_type<SgAsmElfSymverSection>();
285 archive.template register_type<SgAsmElfSymverEntry>();
286 archive.template register_type<SgAsmElfSymverEntryList>();
287 archive.template register_type<SgAsmElfSymverDefinedSection>();
288 archive.template register_type<SgAsmElfSymverDefinedEntryList>();
289 archive.template register_type<SgAsmElfSymverDefinedEntry>();
290 archive.template register_type<SgAsmElfSymverDefinedAuxList>();
291 archive.template register_type<SgAsmElfSymverDefinedAux>();
292 archive.template register_type<SgAsmElfSymverNeededSection>();
293 archive.template register_type<SgAsmElfSymverNeededEntryList>();
294 archive.template register_type<SgAsmElfSymverNeededEntry>();
295 archive.template register_type<SgAsmElfSymverNeededAuxList>();
296 archive.template register_type<SgAsmElfSymverNeededAux>();
297 archive.template register_type<SgAsmElfRelocSection>();
298 archive.template register_type<SgAsmElfRelocEntryList>();
299 archive.template register_type<SgAsmElfRelocEntry>();
300 archive.template register_type<SgAsmElfDynamicSection>();
301 archive.template register_type<SgAsmElfDynamicEntryList>();
302 archive.template register_type<SgAsmElfDynamicEntry>();
303 archive.template register_type<SgAsmElfStringSection>();
304 archive.template register_type<SgAsmElfStrtab>();
305 archive.template register_type<SgAsmElfNoteSection>();
306 archive.template register_type<SgAsmElfNoteEntryList>();
307 archive.template register_type<SgAsmElfNoteEntry>();
308 archive.template register_type<SgAsmElfEHFrameSection>();
309 archive.template register_type<SgAsmElfEHFrameEntryCIList>();
310 archive.template register_type<SgAsmElfEHFrameEntryCI>();
311 archive.template register_type<SgAsmElfEHFrameEntryFDList>();
312 archive.template register_type<SgAsmElfEHFrameEntryFD>();
313 archive.template register_type<SgAsmElfSection>();
314 archive.template register_type<SgAsmJvmConstantPool>();
315 archive.template register_type<SgAsmJvmConstantPoolEntry>();
316 archive.template register_type<SgAsmJvmConstantValue>();
317 archive.template register_type<SgAsmJvmCodeAttribute>();
318 archive.template register_type<SgAsmJvmInnerClasses>();
319 archive.template register_type<SgAsmJvmInnerClassesEntry>();
320 archive.template register_type<SgAsmJvmEnclosingMethod>();
321 archive.template register_type<SgAsmJvmSignature>();
322 archive.template register_type<SgAsmJvmSourceFile>();
323 archive.template register_type<SgAsmJvmLineNumberEntry>();
324 archive.template register_type<SgAsmJvmLineNumberTable>();
325 archive.template register_type<SgAsmJvmModuleMainClass>();
326 archive.template register_type<SgAsmJvmAttribute>();
327 archive.template register_type<SgAsmJvmClass>();
328 archive.template register_type<SgAsmJvmAttributeTable>();
329 archive.template register_type<SgAsmJvmExceptionTable>();
330 archive.template register_type<SgAsmJvmException>();
331 archive.template register_type<SgAsmJvmMethodTable>();
332 archive.template register_type<SgAsmJvmMethod>();
333 archive.template register_type<SgAsmJvmFieldTable>();
334 archive.template register_type<SgAsmJvmField>();
335 archive.template register_type<SgAsmDOSFileHeader>();
336 archive.template register_type<SgAsmDOSExtendedHeader>();
337 archive.template register_type<SgAsmPEFileHeader>();
338 archive.template register_type<SgAsmPERVASizePairList>();
339 archive.template register_type<SgAsmPERVASizePair>();
340 archive.template register_type<SgAsmPEImportItem>();
341 archive.template register_type<SgAsmPEImportItemList>();
342 archive.template register_type<SgAsmPEImportDirectory>();
343 archive.template register_type<SgAsmPEImportDirectoryList>();
344 archive.template register_type<SgAsmPEImportSection>();
345 archive.template register_type<SgAsmPEExportSection>();
346 archive.template register_type<SgAsmPEExportDirectory>();
347 archive.template register_type<SgAsmPEExportEntryList>();
348 archive.template register_type<SgAsmPEExportEntry>();
349 archive.template register_type<SgAsmPEStringSection>();
350 archive.template register_type<SgAsmPESectionTable>();
351 archive.template register_type<SgAsmPESectionTableEntry>();
352 archive.template register_type<SgAsmPESection>();
353 archive.template register_type<SgAsmCoffSymbolTable>();
354 archive.template register_type<SgAsmCoffSymbolList>();
355 archive.template register_type<SgAsmCoffSymbol>();
356 archive.template register_type<SgAsmCoffStrtab>();
357 archive.template register_type<SgAsmStringStorage>();
358 archive.template register_type<SgAsmBasicString>();
359 archive.template register_type<SgAsmStoredString>();
360 archive.template register_type<SgAsmGenericString>();
361 archive.template register_type<SgAsmGenericHeaderList>();
362 archive.template register_type<SgAsmGenericHeader>();
363 archive.template register_type<SgAsmGenericSymbolList>();
364 archive.template register_type<SgAsmGenericSymbol>();
365 archive.template register_type<SgAsmGenericStrtab>();
366 archive.template register_type<SgAsmGenericSectionList>();
367 archive.template register_type<SgAsmGenericSection>();
368 archive.template register_type<SgAsmGenericDLLList>();
369 archive.template register_type<SgAsmGenericDLL>();
370 archive.template register_type<SgAsmGenericFormat>();
371 archive.template register_type<SgAsmGenericFileList>();
372 archive.template register_type<SgAsmGenericFile>();
373 archive.template register_type<SgAsmExecutableFileFormat>();
374 archive.template register_type<SgAsmCilAssembly>();
375 archive.template register_type<SgAsmCilAssemblyOS>();
376 archive.template register_type<SgAsmCilAssemblyProcessor>();
377 archive.template register_type<SgAsmCilAssemblyRef>();
378 archive.template register_type<SgAsmCilAssemblyRefOS>();
379 archive.template register_type<SgAsmCilAssemblyRefProcessor>();
380 archive.template register_type<SgAsmCilClassLayout>();
381 archive.template register_type<SgAsmCilConstant>();
382 archive.template register_type<SgAsmCilCustomAttribute>();
383 archive.template register_type<SgAsmCilDeclSecurity>();
384 archive.template register_type<SgAsmCilEventMap>();
385 archive.template register_type<SgAsmCilEvent>();
386 archive.template register_type<SgAsmCilExportedType>();
387 archive.template register_type<SgAsmCilField>();
388 archive.template register_type<SgAsmCilFieldLayout>();
389 archive.template register_type<SgAsmCilFieldMarshal>();
390 archive.template register_type<SgAsmCilFieldRVA>();
391 archive.template register_type<SgAsmCilFile>();
392 archive.template register_type<SgAsmCilGenericParam>();
393 archive.template register_type<SgAsmCilGenericParamConstraint>();
394 archive.template register_type<SgAsmCilImplMap>();
395 archive.template register_type<SgAsmCilInterfaceImpl>();
396 archive.template register_type<SgAsmCilNode>();
397 archive.template register_type<SgAsmJvmNode>();
398 archive.template register_type<SgAsmNode>();
List of pointers to file sections.
The GNU symbol version definitions.
One entry of the ELF symbol version needed table.
String associated with a binary file.
Expression that adds two operands.
JVM SourceFile attribute.
List of dynamic linking section entries.
Contiguous region of a file.
Represents a JVM method_info table/array.
JVM ModuleMainClass attribute.
Expression representing a (no-op) unary plus operation.
Base class for references to a machine register.
Expression that performs a right rotate.
Auxiliary info for needed symbol version.
Base class for all binary analysis IR nodes.
This class represents a source file for a project (which may contian many source files and or directo...
List of entries for the ELF symbol version definition table.
One entry of an ELF relocation table.
Expression that represents an update to a storage location.
Portable Executable Import Section.
List of binary interpretations.
Base class for machine instructions.
Byte order specification.
Represents an entry in a JVM constant pool.
CIL AssemblyProcessor table.
Base class for scalar types.
Represents a JVM exception_info table/array.
List of expression nodes.
Expression that performs an arithmetic, sign-bit preserving right shift.
Expression that performs a logical, sign-bit non-preserving right shift.
Represents an JVM constant pool.
Strings stored in an ELF or PE container.
Expression that returns the remainder when dividing the first operand by the second.
Node to hold a list of symbol node pointers.
Base class for ELF file sections.
Expression representing truncation.
Base class for PE sections.
Represents a synthesized function.
JVM EnclosingMethod attribute.
Represents one JVS machine instruction.
Expression that divides the first operand by the second.
CIL AssemblyRefProcessor table.
Hods a list of symbol version aux entries.
COFF symbol string table.
This class represents the base class of a numbr of IR nodes that don't otherwise fit into the existin...
Entry in an ELF symbol version table.
Base class for references to a machine register.
ELF error handling frame entry frame description entry.
Represents an ELF relocation section.
One import directory per library.
GNU symbol version requirements table.
List of ELF relocation entries.
List of AST file node pointers.
ELF section containing dynamic linking information.
JVM LineNumberTable attribute.
List of ELF EH frame CI entries.
CIL GenericParamConstraint table.
Represents an ELF EH frame section.
One entry of an ELF notes table.
ELF string table section.
Reference to memory locations.
An ordered list of registers.
Expression represting negation.
List of pointers to other AST nodes.
Expression representing a machine register.
Base class for integer values.
ELF file section containing symbols.
List of operands for an instruction.
Base class for dynamically linked library information.
Base class for a JVM attribute.
A single imported object.
Represents one PowerPC machine instruction.
One entry from an ELF symbol version definition table.
Represents a single ELF symbol.
Base class for strings related to binary specimens.
Represents static data in an executable.
Represents a JVM attribute_info table/array.
Base class for unary expressions.
Represents one Intel x86 machine instruction.
Base class for CIL branch of binary analysis IR nodes.
Base class for statement-like subclasses.
Represents one entry of a segment table.
Expression representing sign extending.
Base class for expressions.
Expression that performs a logical left shift operation.
List of pointers to other nodes.
Expression that multiplies two operands.
Expression that performs a logical left shift operation filling low-order bits with one...
Represents one MIPS machine instruction.
Node to hold list of ELF note entries.
CIL CustomAttribute table.
List of entries from a symbol version table.
List of SgAsmPERVASizePair AST nodes.
Expression representing unsigned extending.
Base class for binary types.
Registers accessed indirectly.
A JVM InnerClasses attribute array entry.
JVM ConstantValue attribute.
Expression that subtracts the second operand from the first.
Represents a JVM field_info table/array.
Expression that represents an update to a storage location.
Base class for synthesized declarations.
Represents a JVM InnerClasses attribute.
One entry from the dynamic linking table.
Expression that concatenates two values to form a wider value.
Base class for JVM branch of binary analysis IR nodes.
The ELF symbol version table.
Represents one entry in an ELF section table.
Represents an ELF segment table.
Strings stored in an ELF or PE container.
Represents an ELF section table.
A list of imported items.
Represents an interpretation of a binary container.
List of symbol version needed entries.
Base class for binary files.
Base class for binary expressions.
Declaration-like nodes that encapsulate multiple instructions.
Base class for vector types.
Base class for constants.
List of symbol version aux entries.
List of SgAsmInstruction nodes.
Static representation of instruction semantics.
A list of PE Import Directories.
ELF error handling frame entry, common information entry.