Index: src/wasm/ast-decoder.h |
diff --git a/src/wasm/ast-decoder.h b/src/wasm/ast-decoder.h |
index 465bacaab84918b21a1db437b37353940bfb25bc..f77e3951857bc7cb326d550b79d0918b18589fcb 100644 |
--- a/src/wasm/ast-decoder.h |
+++ b/src/wasm/ast-decoder.h |
@@ -142,18 +142,16 @@ struct ImportIndexOperand { |
} |
}; |
-struct TableSwitchOperand { |
- uint32_t case_count; |
+struct BranchTableOperand { |
uint32_t table_count; |
const byte* table; |
int length; |
- inline TableSwitchOperand(Decoder* decoder, const byte* pc) { |
- case_count = decoder->checked_read_u16(pc, 1, "expected #cases"); |
- table_count = decoder->checked_read_u16(pc, 3, "expected #entries"); |
- length = 4 + table_count * 2; |
+ inline BranchTableOperand(Decoder* decoder, const byte* pc) { |
+ table_count = decoder->checked_read_u16(pc, 1, "expected #entries"); |
bradn
2016/03/03 18:08:23
I assume these are going to lebs in a later change
|
+ length = 2 + table_count * 2; |
- if (decoder->check(pc, 5, table_count * 2, "expected <table entries>")) { |
- table = pc + 5; |
+ if (decoder->check(pc, 3, table_count * 2, "expected <table entries>")) { |
+ table = pc + 3; |
} else { |
table = nullptr; |
} |