diff options
author | Ben Smith <binji@chromium.org> | 2020-07-24 13:06:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 13:06:45 -0700 |
commit | f414678326964001e4009daf58274006900d2f14 (patch) | |
tree | 225d1d14ec419e16b80d0df6d8460573da972bc0 | |
parent | 5140e96ea42eca9dafd28bb43ca1e93a604a08c2 (diff) | |
download | wabt-f414678326964001e4009daf58274006900d2f14.tar.gz wabt-f414678326964001e4009daf58274006900d2f14.tar.bz2 wabt-f414678326964001e4009daf58274006900d2f14.zip |
Print newline after ref.is_null instruction (#1495)
-rw-r--r-- | src/wat-writer.cc | 2 | ||||
-rw-r--r-- | test/roundtrip/fold-reference-types.txt | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/wat-writer.cc b/src/wat-writer.cc index 6bdc9f9e..81d379d1 100644 --- a/src/wat-writer.cc +++ b/src/wat-writer.cc @@ -823,7 +823,7 @@ Result WatWriter::ExprVisitorDelegate::OnRefNullExpr(RefNullExpr* expr) { } Result WatWriter::ExprVisitorDelegate::OnRefIsNullExpr(RefIsNullExpr* expr) { - writer_->WritePutsSpace(Opcode::RefIsNull_Opcode.GetName()); + writer_->WritePutsNewline(Opcode::RefIsNull_Opcode.GetName()); return Result::Ok; } diff --git a/test/roundtrip/fold-reference-types.txt b/test/roundtrip/fold-reference-types.txt index 2277588a..4e0a08cd 100644 --- a/test/roundtrip/fold-reference-types.txt +++ b/test/roundtrip/fold-reference-types.txt @@ -41,7 +41,8 @@ (drop (ref.null extern)) (drop - (ref.is_null (local.get 0))) + (ref.is_null + (local.get 0))) (drop (ref.func 0))) (table (;0;) 1 externref) |