mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibPDF: Store indirect value refs in Value objects
IndirectValueRef is so simple that it can be stored directly in the Value class instead of being heap allocated. As the comment in Value says, however, in theory the max bits needed to store is 48 (16 for the generation index and 32(?) for the object index), but 32 should be good enough for now. We can increase it to u64 later if necessary.
This commit is contained in:
parent
534a2e95d2
commit
be6e4b6f3c
7 changed files with 56 additions and 54 deletions
|
@ -14,18 +14,14 @@ class Object;
|
|||
// Note: This macro doesn't care about PlainTextStreamObject and EncodedStreamObject because
|
||||
// we never need to work directly with either of them.
|
||||
|
||||
#define ENUMERATE_DIRECT_OBJECT_TYPES(V) \
|
||||
V(StringObject, string) \
|
||||
V(NameObject, name) \
|
||||
V(ArrayObject, array) \
|
||||
V(DictObject, dict) \
|
||||
V(StreamObject, stream) \
|
||||
#define ENUMERATE_OBJECT_TYPES(V) \
|
||||
V(StringObject, string) \
|
||||
V(NameObject, name) \
|
||||
V(ArrayObject, array) \
|
||||
V(DictObject, dict) \
|
||||
V(StreamObject, stream) \
|
||||
V(IndirectValue, indirect_value)
|
||||
|
||||
#define ENUMERATE_OBJECT_TYPES(V) \
|
||||
ENUMERATE_DIRECT_OBJECT_TYPES(V) \
|
||||
V(IndirectValueRef, indirect_value_ref)
|
||||
|
||||
#define FORWARD_DECL(class_name, _) class class_name;
|
||||
ENUMERATE_OBJECT_TYPES(FORWARD_DECL)
|
||||
#undef FORWARD_DECL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue