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

Unified Diff: src/wasm/decoder.h

Issue 2345593003: [wasm] Master CL for Binary 0xC changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Last comments update Created 4 years, 3 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/decoder.h
diff --git a/src/wasm/decoder.h b/src/wasm/decoder.h
index a6ede54bec2d2a8ed5185f292f2754f575970400..de91600a58baca72457108b68082f91d3049340b 100644
--- a/src/wasm/decoder.h
+++ b/src/wasm/decoder.h
@@ -208,6 +208,19 @@ class Decoder {
// Consume {size} bytes and send them to the bit bucket, advancing {pc_}.
void consume_bytes(int size) {
+ TRACE(" +%d %-20s: %d bytes\n", static_cast<int>(pc_ - start_), "skip",
+ size);
+ if (checkAvailable(size)) {
+ pc_ += size;
+ } else {
+ pc_ = limit_;
+ }
+ }
+
+ // Consume {size} bytes and send them to the bit bucket, advancing {pc_}.
+ void consume_bytes(uint32_t size, const char* name = "skip") {
+ TRACE(" +%d %-20s: %d bytes\n", static_cast<int>(pc_ - start_), name,
+ size);
if (checkAvailable(size)) {
pc_ += size;
} else {

Powered by Google App Engine
This is Rietveld 408576698