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

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

Issue 1764723002: [wasm] Remove TableSwitch and replace with br_table. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | src/wasm/wasm-macro-gen.h » ('J')
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 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;
}
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | src/wasm/wasm-macro-gen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698