Commit d9ffa305 authored by bradnelson's avatar bradnelson Committed by Commit bot

Fixing more wasm warnings.

R=ahaas@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1536663002

Cr-Commit-Position: refs/heads/master@{#32952}
parent 7b775118
......@@ -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;
}
}
......
......@@ -73,8 +73,8 @@ FunctionSig* WasmOpcodes::Signature(WasmOpcode opcode) {
bool WasmOpcodes::IsSupported(WasmOpcode opcode) {
switch (opcode) {
#if !WASM_64
switch (opcode) {
// Opcodes not supported on 32-bit platforms.
case kExprI64Add:
case kExprI64Sub:
......@@ -120,11 +120,13 @@ bool WasmOpcodes::IsSupported(WasmOpcode opcode) {
case kExprI64UConvertF32:
case kExprI64UConvertF64:
#endif
return false;
default:
return true;
}
#else
return true;
#endif
}
} // namespace wasm
} // namespace internal
......
......@@ -264,7 +264,7 @@ class WasmFunctionCompiler : public HandleAndZoneScope,
uint32_t CompileAndAdd(TestingModule* module) {
uint32_t index = 0;
if (module->module && module->module->functions) {
index = module->module->functions->size();
index = static_cast<uint32_t>(module->module->functions->size());
}
module->AddFunction(env.sig, Compile(module));
return index;
......@@ -2620,7 +2620,7 @@ TEST(Run_WasmCallF32StackParameter) {
TestingModule module;
WasmFunctionCompiler t(&sig);
BUILD(t, WASM_GET_LOCAL(17));
unsigned index = t.CompileAndAdd(&module);
uint32_t index = t.CompileAndAdd(&module);
// Build the calling function.
WasmRunner<float> r;
......@@ -2646,7 +2646,7 @@ TEST(Run_WasmCallF64StackParameter) {
TestingModule module;
WasmFunctionCompiler t(&sig);
BUILD(t, WASM_GET_LOCAL(17));
unsigned index = t.CompileAndAdd(&module);
uint32_t index = t.CompileAndAdd(&module);
// Build the calling function.
WasmRunner<double> r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment