Index: src/wasm/asm-wasm-builder.cc |
diff --git a/src/wasm/asm-wasm-builder.cc b/src/wasm/asm-wasm-builder.cc |
index a0cabb24d3b4fe24c536ab5251aa8805268dc716..e3c666bf7add8996a9848505da1358d3bfc11e50 100644 |
--- a/src/wasm/asm-wasm-builder.cc |
+++ b/src/wasm/asm-wasm-builder.cc |
@@ -319,7 +319,7 @@ class AsmWasmBuilderImpl : public AstVisitor { |
std::vector<uint8_t> index = |
UnsignedLEB128From(LookupOrInsertFunction(var)); |
current_function_builder_->EmitCode( |
- index.data(), static_cast<uint32_t>(index.size())); |
+ &index[0], static_cast<uint32_t>(index.size())); |
} else { |
if (is_set_op_) { |
if (var->IsContextSlot()) { |
@@ -786,11 +786,11 @@ class AsmWasmBuilderImpl : public AstVisitor { |
if (is_local) { |
uint32_t pos_of_index[1] = {0}; |
current_function_builder_->EmitCode( |
- index_vec.data(), static_cast<uint32_t>(index_vec.size()), |
- pos_of_index, 1); |
+ &index_vec[0], static_cast<uint32_t>(index_vec.size()), pos_of_index, |
+ 1); |
} else { |
current_function_builder_->EmitCode( |
- index_vec.data(), static_cast<uint32_t>(index_vec.size())); |
+ &index_vec[0], static_cast<uint32_t>(index_vec.size())); |
} |
} |
@@ -856,6 +856,7 @@ class AsmWasmBuilderImpl : public AstVisitor { |
return kFloat64; |
} else { |
UNREACHABLE(); |
+ return kInt32; |
} |
} |