diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-09-18 13:35:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-18 13:35:45 -0400 |
| commit | 21339e802d77981bbc64cc21cc1315cc41932f35 (patch) | |
| tree | fbf9105fa191f951dc01f2315c026a9fdde644b7 /source/core/slang-riff.cpp | |
| parent | 9a6eec6192a373d8c14073f63f68e160d762ee50 (diff) | |
Serialization fixes based on review of #1547 (#1551)
* Test if blob is returned.
* Rename serialize files so can be grouped.
* StringRepresentationCache -> SerialStringTable
* Split out SerialStringTable from slang-serialize-ir
* First pass at reorganizing serialization/containers. Remain some issues about debug info.
* Fix bug in calculating sourceloc.
* Improve calcFixSourceLoc
* Make allocations for payload RiffContainer align to at least 8 bytes. This is important for read, if the payload can contain 8 byte aligned data. Note this has no effect on Riff file format alignment rules.
* Improve comments around RiffContainer and alignment.
* Remove SerialStringTable, can just use StringSlicePool instead.
* Add flags to control what is output in SerialContainer.
Turn off AST output for obfuscated code.
Lazily create astClasses when doing write container serialization.
* Typo fix for Clang/Linux.
* Fixes that came out of review
* TranslationUnit -> Module
* TargetModule -> TargetComponent
* PAYLOAD_MIN_ALIGNMENT -> kPayloadMinAlignment
Diffstat (limited to 'source/core/slang-riff.cpp')
| -rw-r--r-- | source/core/slang-riff.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/core/slang-riff.cpp b/source/core/slang-riff.cpp index 2162c40be..d64cd89c7 100644 --- a/source/core/slang-riff.cpp +++ b/source/core/slang-riff.cpp @@ -864,7 +864,7 @@ void RiffContainer::setPayload(Data* data, const void* payload, size_t size) data->m_ownership = Ownership::Arena; data->m_size = size; - data->m_payload = m_arena.allocateAligned(size, PAYLOAD_MIN_ALIGNMENT); + data->m_payload = m_arena.allocateAligned(size, kPayloadMinAlignment); if (payload) { @@ -941,7 +941,7 @@ RiffContainer::Data* RiffContainer::makeSingleData(DataChunk* dataChunk) // Okay lets combine all into one block const size_t payloadSize = dataChunk->calcPayloadSize(); - void* dst = m_arena.allocateAligned(payloadSize, PAYLOAD_MIN_ALIGNMENT); + void* dst = m_arena.allocateAligned(payloadSize, kPayloadMinAlignment); dataChunk->getPayload(dst); // Remove other datas |
