Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1409)

Unified Diff: src/wasm/ast-decoder.cc

Issue 2403013002: [wasm] Do not create TF nodes during verification (Closed)
Patch Set: Only guard CreateOrMergeIntoPhi. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-654377.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 025ccdf1d7bfc0d2c159e511600b0d313cf0fa9b..6d609b106838f655f05b2b002d4154767137097f 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -1440,9 +1440,13 @@ class WasmFullDecoder : public WasmDecoder {
WasmOpcodes::TypeName(old.type), WasmOpcodes::TypeName(val.type));
return;
}
- old.node =
- first ? val.node : CreateOrMergeIntoPhi(old.type, target->control,
- old.node, val.node);
+ if (builder_) {
+ old.node =
+ first ? val.node : CreateOrMergeIntoPhi(old.type, target->control,
+ old.node, val.node);
+ } else {
+ old.node = nullptr;
+ }
}
}
@@ -1599,6 +1603,7 @@ class WasmFullDecoder : public WasmDecoder {
TFNode* CreateOrMergeIntoPhi(LocalType type, TFNode* merge, TFNode* tnode,
TFNode* fnode) {
+ DCHECK_NOT_NULL(builder_);
if (builder_->IsPhiWithMerge(tnode, merge)) {
builder_->AppendToPhi(tnode, fnode);
} else if (tnode != fnode) {
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-654377.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698