Commit de252121 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[wasm] Remove redundant inline annotations

Functions defined inside a class declarations are inline by default.
Thus remove the 'inline' annotation from all such definitions.

Drive-by: Move the 'inline' annotation of
{WasmFunctionBuilder::signature} from the definition to the declaration.

R=jkummerow@chromium.org

Bug: v8:11384
Change-Id: I18be0b7d83c2414b3237e2f834e470c613143d7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953320Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75096}
parent 0e9f9aab
......@@ -653,13 +653,13 @@ class LiftoffAssembler : public TurboAssembler {
int32_t offset_imm, LiftoffRegister src,
LiftoffRegList pinned,
SkipWriteBarrier = kNoSkipWriteBarrier);
inline void LoadFixedArrayLengthAsInt32(LiftoffRegister dst, Register array,
LiftoffRegList pinned) {
void LoadFixedArrayLengthAsInt32(LiftoffRegister dst, Register array,
LiftoffRegList pinned) {
int offset = FixedArray::kLengthOffset - kHeapObjectTag;
LoadSmiAsInt32(dst, array, offset, pinned);
}
inline void LoadSmiAsInt32(LiftoffRegister dst, Register src_addr,
int32_t offset, LiftoffRegList pinned) {
void LoadSmiAsInt32(LiftoffRegister dst, Register src_addr, int32_t offset,
LiftoffRegList pinned) {
if (SmiValuesAre32Bits()) {
#if V8_TARGET_LITTLE_ENDIAN
DCHECK_EQ(kSmiShiftSize + kSmiTagSize, 4 * kBitsPerByte);
......@@ -822,7 +822,7 @@ class LiftoffAssembler : public TurboAssembler {
inline void emit_u32_to_intptr(Register dst, Register src);
inline void emit_ptrsize_add(Register dst, Register lhs, Register rhs) {
void emit_ptrsize_add(Register dst, Register lhs, Register rhs) {
if (kSystemPointerSize == 8) {
emit_i64_add(LiftoffRegister(dst), LiftoffRegister(lhs),
LiftoffRegister(rhs));
......@@ -830,7 +830,7 @@ class LiftoffAssembler : public TurboAssembler {
emit_i32_add(dst, lhs, rhs);
}
}
inline void emit_ptrsize_sub(Register dst, Register lhs, Register rhs) {
void emit_ptrsize_sub(Register dst, Register lhs, Register rhs) {
if (kSystemPointerSize == 8) {
emit_i64_sub(LiftoffRegister(dst), LiftoffRegister(lhs),
LiftoffRegister(rhs));
......@@ -838,7 +838,7 @@ class LiftoffAssembler : public TurboAssembler {
emit_i32_sub(dst, lhs, rhs);
}
}
inline void emit_ptrsize_and(Register dst, Register lhs, Register rhs) {
void emit_ptrsize_and(Register dst, Register lhs, Register rhs) {
if (kSystemPointerSize == 8) {
emit_i64_and(LiftoffRegister(dst), LiftoffRegister(lhs),
LiftoffRegister(rhs));
......@@ -846,7 +846,7 @@ class LiftoffAssembler : public TurboAssembler {
emit_i32_and(dst, lhs, rhs);
}
}
inline void emit_ptrsize_shri(Register dst, Register src, int amount) {
void emit_ptrsize_shri(Register dst, Register src, int amount) {
if (kSystemPointerSize == 8) {
emit_i64_shri(LiftoffRegister(dst), LiftoffRegister(src), amount);
} else {
......@@ -854,7 +854,7 @@ class LiftoffAssembler : public TurboAssembler {
}
}
inline void emit_ptrsize_addi(Register dst, Register lhs, intptr_t imm) {
void emit_ptrsize_addi(Register dst, Register lhs, intptr_t imm) {
if (kSystemPointerSize == 8) {
emit_i64_addi(LiftoffRegister(dst), LiftoffRegister(lhs), imm);
} else {
......@@ -862,8 +862,8 @@ class LiftoffAssembler : public TurboAssembler {
}
}
inline void emit_ptrsize_set_cond(LiftoffCondition condition, Register dst,
LiftoffRegister lhs, LiftoffRegister rhs) {
void emit_ptrsize_set_cond(LiftoffCondition condition, Register dst,
LiftoffRegister lhs, LiftoffRegister rhs) {
if (kSystemPointerSize == 8) {
emit_i64_set_cond(condition, dst, lhs, rhs);
} else {
......@@ -871,7 +871,7 @@ class LiftoffAssembler : public TurboAssembler {
}
}
inline void emit_ptrsize_zeroextend_i32(Register dst, Register src) {
void emit_ptrsize_zeroextend_i32(Register dst, Register src) {
if (kSystemPointerSize == 8) {
emit_type_conversion(kExprI64UConvertI32, LiftoffRegister(dst),
LiftoffRegister(src));
......
This diff is collapsed.
......@@ -98,15 +98,15 @@ class V8_EXPORT_PRIVATE BytecodeIterator : public NON_EXPORTED_BASE(Decoder) {
// Base class for both iterators defined below.
class iterator_base {
public:
inline iterator_base& operator++() {
iterator_base& operator++() {
DCHECK_LT(ptr_, end_);
ptr_ += OpcodeLength(ptr_, end_);
return *this;
}
inline bool operator==(const iterator_base& that) {
bool operator==(const iterator_base& that) {
return this->ptr_ == that.ptr_;
}
inline bool operator!=(const iterator_base& that) {
bool operator!=(const iterator_base& that) {
return this->ptr_ != that.ptr_;
}
......@@ -122,7 +122,7 @@ class V8_EXPORT_PRIVATE BytecodeIterator : public NON_EXPORTED_BASE(Decoder) {
: public iterator_base,
public base::iterator<std::input_iterator_tag, WasmOpcode> {
public:
inline WasmOpcode operator*() {
WasmOpcode operator*() {
DCHECK_LT(ptr_, end_);
return static_cast<WasmOpcode>(*ptr_);
}
......@@ -138,7 +138,7 @@ class V8_EXPORT_PRIVATE BytecodeIterator : public NON_EXPORTED_BASE(Decoder) {
: public iterator_base,
public base::iterator<std::input_iterator_tag, uint32_t> {
public:
inline uint32_t operator*() {
uint32_t operator*() {
DCHECK_LT(ptr_, end_);
return static_cast<uint32_t>(ptr_ - start_);
}
......
......@@ -81,7 +81,7 @@ class LEBHelper {
// TODO(titzer): move core logic for decoding LEBs from decoder.h to here.
// Compute the size of {val} if emitted as an LEB32.
static inline size_t sizeof_u32v(size_t val) {
static size_t sizeof_u32v(size_t val) {
size_t size = 0;
do {
size++;
......@@ -91,7 +91,7 @@ class LEBHelper {
}
// Compute the size of {val} if emitted as an LEB32.
static inline size_t sizeof_i32v(int32_t val) {
static size_t sizeof_i32v(int32_t val) {
size_t size = 1;
if (val >= 0) {
while (val >= 0x40) { // prevent sign extension.
......@@ -108,7 +108,7 @@ class LEBHelper {
}
// Compute the size of {val} if emitted as an unsigned LEB64.
static inline size_t sizeof_u64v(uint64_t val) {
static size_t sizeof_u64v(uint64_t val) {
size_t size = 0;
do {
size++;
......@@ -118,7 +118,7 @@ class LEBHelper {
}
// Compute the size of {val} if emitted as a signed LEB64.
static inline size_t sizeof_i64v(int64_t val) {
static size_t sizeof_i64v(int64_t val) {
size_t size = 1;
if (val >= 0) {
while (val >= 0x40) { // prevent sign extension.
......
......@@ -174,27 +174,27 @@ class WasmSectionIterator {
next();
}
inline bool more() const { return decoder_->ok() && decoder_->more(); }
bool more() const { return decoder_->ok() && decoder_->more(); }
inline SectionCode section_code() const { return section_code_; }
SectionCode section_code() const { return section_code_; }
inline const byte* section_start() const { return section_start_; }
const byte* section_start() const { return section_start_; }
inline uint32_t section_length() const {
uint32_t section_length() const {
return static_cast<uint32_t>(section_end_ - section_start_);
}
inline Vector<const uint8_t> payload() const {
Vector<const uint8_t> payload() const {
return {payload_start_, payload_length()};
}
inline const byte* payload_start() const { return payload_start_; }
const byte* payload_start() const { return payload_start_; }
inline uint32_t payload_length() const {
uint32_t payload_length() const {
return static_cast<uint32_t>(section_end_ - payload_start_);
}
inline const byte* section_end() const { return section_end_; }
const byte* section_end() const { return section_end_; }
// Advances to the next section, checking that decoding the current section
// stopped at {section_end_}.
......
......@@ -206,7 +206,7 @@ class V8_EXPORT_PRIVATE WasmFunctionBuilder : public ZoneObject {
WasmModuleBuilder* builder() const { return builder_; }
uint32_t func_index() { return func_index_; }
FunctionSig* signature();
inline FunctionSig* signature();
private:
explicit WasmFunctionBuilder(WasmModuleBuilder* builder);
......@@ -383,7 +383,7 @@ class V8_EXPORT_PRIVATE WasmModuleBuilder : public ZoneObject {
#endif
};
inline FunctionSig* WasmFunctionBuilder::signature() {
FunctionSig* WasmFunctionBuilder::signature() {
return builder_->types_[signature_index_].sig;
}
......
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