| 1931 | } |
| 1932 | |
| 1933 | Result BinaryReaderObjdump::EndInitExpr() { |
| 1934 | if (reading_data_init_expr_) { |
| 1935 | reading_data_init_expr_ = false; |
| 1936 | InitExprToConstOffset(current_init_expr_, &data_offset_); |
| 1937 | } else if (reading_table_init_expr_) { |
| 1938 | reading_table_init_expr_ = false; |
| 1939 | InitExprToConstOffset(current_init_expr_, &elem_offset_); |
| 1940 | } else if (reading_elem_init_expr_) { |
| 1941 | reading_elem_init_expr_ = false; |
| 1942 | InitExprToConstOffset(current_init_expr_, &elem_offset_); |
| 1943 | } else if (reading_global_init_expr_) { |
| 1944 | reading_global_init_expr_ = false; |
| 1945 | PrintInitExpr(current_init_expr_); |
| 1946 | } else if (reading_elem_expr_) { |
| 1947 | reading_elem_expr_ = false; |
| 1948 | PrintDetails(" - elem[%" PRIu64 "] = ", elem_offset_ + elem_index_); |
| 1949 | PrintInitExpr(current_init_expr_, /*as_unsigned=*/false, |
| 1950 | /*with_prefix=*/false); |
| 1951 | } else { |
| 1952 | WABT_UNREACHABLE; |
| 1953 | } |
| 1954 | return Result::Ok; |
| 1955 | } |
| 1956 | |
| 1957 | Result BinaryReaderObjdump::OnI32ConstExpr(uint32_t value) { |
| 1958 | if (ReadingInitExpr()) { |
nothing calls this directly
no test coverage detected