summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-04-05 19:48:54 -0700
committerGitHub <noreply@github.com>2019-04-05 19:48:54 -0700
commit37443aef8c22f100dc59e81aff6af5a252f3217d (patch)
treeae68bcc8b6bbc4f2b7fdd1f50349b9980e59f10f /src/passes/Print.cpp
parent5b24f039ba1f55520a61f6dd6bb8ca46556c592b (diff)
downloadbinaryen-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/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 6d7d512ff..ebfb6c311 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -1289,7 +1289,11 @@ struct PrintSExpression : public Visitor<PrintSExpression> {
doIndent(o, indent);
o << '(';
printMajor(o, "data ");
- visit(segment.offset);
+ if (segment.isPassive) {
+ printMedium(o, "passive");
+ } else {
+ visit(segment.offset);
+ }
o << " \"";
for (size_t i = 0; i < segment.data.size(); i++) {
unsigned char c = segment.data[i];