Commit 4f4b061d authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm][cleanup] Remove constant return value

{NativeModuleDeserializer::ReadCode} always returned {true}. Thus remove
this return value and the code handling a {false} return.

R=thibaudm@chromium.org

Bug: chromium:1110258

Change-Id: I2cf76936f6eea213e6318ea35bdb58b2ded801c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352782Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69449}
parent 1dd7f3a9
...@@ -474,7 +474,7 @@ class V8_EXPORT_PRIVATE NativeModuleDeserializer { ...@@ -474,7 +474,7 @@ class V8_EXPORT_PRIVATE NativeModuleDeserializer {
private: private:
bool ReadHeader(Reader* reader); bool ReadHeader(Reader* reader);
bool ReadCode(int fn_index, Reader* reader); void ReadCode(int fn_index, Reader* reader);
NativeModule* const native_module_; NativeModule* const native_module_;
bool read_called_; bool read_called_;
...@@ -494,7 +494,7 @@ bool NativeModuleDeserializer::Read(Reader* reader) { ...@@ -494,7 +494,7 @@ bool NativeModuleDeserializer::Read(Reader* reader) {
uint32_t first_wasm_fn = native_module_->num_imported_functions(); uint32_t first_wasm_fn = native_module_->num_imported_functions();
WasmCodeRefScope wasm_code_ref_scope; WasmCodeRefScope wasm_code_ref_scope;
for (uint32_t i = first_wasm_fn; i < total_fns; ++i) { for (uint32_t i = first_wasm_fn; i < total_fns; ++i) {
if (!ReadCode(i, reader)) return false; ReadCode(i, reader);
} }
return reader->current_size() == 0; return reader->current_size() == 0;
} }
...@@ -506,13 +506,13 @@ bool NativeModuleDeserializer::ReadHeader(Reader* reader) { ...@@ -506,13 +506,13 @@ bool NativeModuleDeserializer::ReadHeader(Reader* reader) {
imports == native_module_->num_imported_functions(); imports == native_module_->num_imported_functions();
} }
bool NativeModuleDeserializer::ReadCode(int fn_index, Reader* reader) { void NativeModuleDeserializer::ReadCode(int fn_index, Reader* reader) {
bool has_code = reader->Read<bool>(); bool has_code = reader->Read<bool>();
if (!has_code) { if (!has_code) {
DCHECK(FLAG_wasm_lazy_compilation || DCHECK(FLAG_wasm_lazy_compilation ||
native_module_->enabled_features().has_compilation_hints()); native_module_->enabled_features().has_compilation_hints());
native_module_->UseLazyStub(fn_index); native_module_->UseLazyStub(fn_index);
return true; return;
} }
int constant_pool_offset = reader->Read<int>(); int constant_pool_offset = reader->Read<int>();
int safepoint_table_offset = reader->Read<int>(); int safepoint_table_offset = reader->Read<int>();
...@@ -593,8 +593,6 @@ bool NativeModuleDeserializer::ReadCode(int fn_index, Reader* reader) { ...@@ -593,8 +593,6 @@ bool NativeModuleDeserializer::ReadCode(int fn_index, Reader* reader) {
// Finally, flush the icache for that code. // Finally, flush the icache for that code.
FlushInstructionCache(code->instructions().begin(), FlushInstructionCache(code->instructions().begin(),
code->instructions().size()); code->instructions().size());
return true;
} }
bool IsSupportedVersion(Vector<const byte> header) { bool IsSupportedVersion(Vector<const byte> header) {
......
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