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

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

Issue 1709653002: [wasm] Add support for import section. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: delete the import_code vector Created 4 years, 10 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
Index: src/wasm/ast-decoder.h
diff --git a/src/wasm/ast-decoder.h b/src/wasm/ast-decoder.h
index 957e678f2cf9d9cdae04223e2fc01076034c6473..465bacaab84918b21a1db437b37353940bfb25bc 100644
--- a/src/wasm/ast-decoder.h
+++ b/src/wasm/ast-decoder.h
@@ -132,6 +132,16 @@ struct FunctionIndexOperand {
}
};
+struct ImportIndexOperand {
+ uint32_t index;
+ FunctionSig* sig;
+ int length;
+ inline ImportIndexOperand(Decoder* decoder, const byte* pc) {
+ index = decoder->checked_read_u32v(pc, 1, &length, "import index");
+ sig = nullptr;
+ }
+};
+
struct TableSwitchOperand {
uint32_t case_count;
uint32_t table_count;

Powered by Google App Engine
This is Rietveld 408576698