diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-04-05 19:48:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-05 19:48:54 -0700 |
commit | 37443aef8c22f100dc59e81aff6af5a252f3217d (patch) | |
tree | ae68bcc8b6bbc4f2b7fdd1f50349b9980e59f10f /src/ir/memory-utils.h | |
parent | 5b24f039ba1f55520a61f6dd6bb8ca46556c592b (diff) | |
download | binaryen-37443aef8c22f100dc59e81aff6af5a252f3217d.tar.gz binaryen-37443aef8c22f100dc59e81aff6af5a252f3217d.tar.bz2 binaryen-37443aef8c22f100dc59e81aff6af5a252f3217d.zip |
Passive segments (#1976)
Adds support for the bulk memory proposal's passive segments. Uses a
new (data passive ...) s-expression syntax to mark sections as
passive.
Diffstat (limited to 'src/ir/memory-utils.h')
-rw-r--r-- | src/ir/memory-utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir/memory-utils.h b/src/ir/memory-utils.h index c8f39a2ec..ea19ca799 100644 --- a/src/ir/memory-utils.h +++ b/src/ir/memory-utils.h @@ -31,6 +31,9 @@ namespace MemoryUtils { if (memory.segments.size() == 0) return true; std::vector<char> data; for (auto& segment : memory.segments) { + if (segment.isPassive) { + return false; + } auto* offset = segment.offset->dynCast<Const>(); if (!offset) return false; } @@ -61,4 +64,3 @@ namespace MemoryUtils { } // namespace wasm #endif // wasm_ir_memory_h - |