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

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

Issue 2110053002: [wasm] Cleanup AST decoder. Remove Tree and TreeResult. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/compiler/wasm-compiler.h ('k') | src/wasm/ast-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.h
diff --git a/src/wasm/ast-decoder.h b/src/wasm/ast-decoder.h
index 27170dd26981ceef93f1044b7747327d9b218942..9b00e0c5f864a9ee16c137b665cf4b4f24e232ae 100644
--- a/src/wasm/ast-decoder.h
+++ b/src/wasm/ast-decoder.h
@@ -222,15 +222,18 @@ static inline FunctionBody FunctionBodyForTesting(const byte* start,
return {nullptr, nullptr, start, start, end};
}
-struct Tree;
-typedef Result<Tree*> TreeResult;
-
-std::ostream& operator<<(std::ostream& os, const Tree& tree);
+struct DecodeStruct {
+ int unused;
+};
+typedef Result<DecodeStruct*> DecodeResult;
+inline std::ostream& operator<<(std::ostream& os, const DecodeStruct& tree) {
+ return os;
+}
-TreeResult VerifyWasmCode(base::AccountingAllocator* allocator,
- FunctionBody& body);
-TreeResult BuildTFGraph(base::AccountingAllocator* allocator,
- TFBuilder* builder, FunctionBody& body);
+DecodeResult VerifyWasmCode(base::AccountingAllocator* allocator,
+ FunctionBody& body);
+DecodeResult BuildTFGraph(base::AccountingAllocator* allocator,
+ TFBuilder* builder, FunctionBody& body);
bool PrintAst(base::AccountingAllocator* allocator, const FunctionBody& body,
std::ostream& os,
std::vector<std::tuple<uint32_t, int, int>>* offset_table);
@@ -238,17 +241,17 @@ bool PrintAst(base::AccountingAllocator* allocator, const FunctionBody& body,
// A simplified form of AST printing, e.g. from a debugger.
void PrintAstForDebugging(const byte* start, const byte* end);
-inline TreeResult VerifyWasmCode(base::AccountingAllocator* allocator,
- ModuleEnv* module, FunctionSig* sig,
- const byte* start, const byte* end) {
+inline DecodeResult VerifyWasmCode(base::AccountingAllocator* allocator,
+ ModuleEnv* module, FunctionSig* sig,
+ const byte* start, const byte* end) {
FunctionBody body = {module, sig, nullptr, start, end};
return VerifyWasmCode(allocator, body);
}
-inline TreeResult BuildTFGraph(base::AccountingAllocator* allocator,
- TFBuilder* builder, ModuleEnv* module,
- FunctionSig* sig, const byte* start,
- const byte* end) {
+inline DecodeResult BuildTFGraph(base::AccountingAllocator* allocator,
+ TFBuilder* builder, ModuleEnv* module,
+ FunctionSig* sig, const byte* start,
+ const byte* end) {
FunctionBody body = {module, sig, nullptr, start, end};
return BuildTFGraph(allocator, builder, body);
}
« no previous file with comments | « src/compiler/wasm-compiler.h ('k') | src/wasm/ast-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698