MCPcopy Create free account
hub / github.com/WebAssembly/wabt / InitExprToConstOffset

Function InitExprToConstOffset

src/binary-reader-objdump.cc:1918–1931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1916}
1917
1918static void InitExprToConstOffset(const InitExpr& expr, uint64_t* out_offset) {
1919 if (expr.insts.size() == 1) {
1920 switch (expr.type) {
1921 case InitExprType::I32:
1922 *out_offset = expr.insts[0].imm.i32;
1923 break;
1924 case InitExprType::I64:
1925 *out_offset = expr.insts[0].imm.i64;
1926 break;
1927 default:
1928 break;
1929 }
1930 }
1931}
1932
1933Result BinaryReaderObjdump::EndInitExpr() {
1934 if (reading_data_init_expr_) {

Callers 1

EndInitExprMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected