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

Unified Diff: src/wasm/wasm-module-builder.h

Issue 2406163002: [wasm] Implement decoding of i32v values (Closed)
Patch Set: Remove redundant check 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 | « src/wasm/decoder.h ('k') | test/unittests/wasm/decoder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module-builder.h
diff --git a/src/wasm/wasm-module-builder.h b/src/wasm/wasm-module-builder.h
index 3765cad565e62194ba92fb3f9fe9cf341ad05329..057d6102f1fa026c1364b44e65717831ae667cb5 100644
--- a/src/wasm/wasm-module-builder.h
+++ b/src/wasm/wasm-module-builder.h
@@ -49,6 +49,11 @@ class ZoneBuffer : public ZoneObject {
LEBHelper::write_u32v(&pos_, val);
}
+ void write_i32v(int32_t val) {
+ EnsureSpace(kMaxVarInt32Size);
+ LEBHelper::write_i32v(&pos_, val);
+ }
+
void write_size(size_t val) {
EnsureSpace(kMaxVarInt32Size);
DCHECK_EQ(val, static_cast<uint32_t>(val));
« no previous file with comments | « src/wasm/decoder.h ('k') | test/unittests/wasm/decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698