[liftoff] Fix declaration order in some classes
This fixes the order of declaring class members for LiftoffCompiler, LiftoffAssembler, LiftoffRegister, and LiftoffRegList. The recommended order according to the style guide is: types, constants, constructors, other members, data members. R=thibaudm@chromium.org Bug: v8:11879 Change-Id: I5c550ed11ed0169f07477b6a1723053316374707 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157960 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#76798}
This commit is contained in:
parent
fee0051bac
commit
c6bb56302c
@ -1506,6 +1506,10 @@ class LiftoffAssembler : public TurboAssembler {
|
||||
private:
|
||||
LiftoffRegister LoadI64HalfIntoRegister(VarState slot, RegPairHalf half);
|
||||
|
||||
V8_NOINLINE LiftoffRegister SpillOneRegister(LiftoffRegList candidates);
|
||||
// Spill one or two fp registers to get a pair of adjacent fp registers.
|
||||
LiftoffRegister SpillAdjacentFpRegisters(LiftoffRegList pinned);
|
||||
|
||||
uint32_t num_locals_ = 0;
|
||||
static constexpr uint32_t kInlineLocalKinds = 16;
|
||||
union {
|
||||
@ -1521,10 +1525,6 @@ class LiftoffAssembler : public TurboAssembler {
|
||||
int ool_spill_space_size_ = 0;
|
||||
LiftoffBailoutReason bailout_reason_ = kSuccess;
|
||||
const char* bailout_detail_ = nullptr;
|
||||
|
||||
V8_NOINLINE LiftoffRegister SpillOneRegister(LiftoffRegList candidates);
|
||||
// Spill one or two fp registers to get a pair of adjacent fp registers.
|
||||
LiftoffRegister SpillAdjacentFpRegisters(LiftoffRegList pinned);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, LiftoffAssembler::VarState);
|
||||
|
@ -6107,6 +6107,46 @@ class LiftoffCompiler {
|
||||
tmp_s128, lane_kind);
|
||||
}
|
||||
|
||||
bool has_outstanding_op() const {
|
||||
return outstanding_op_ != kNoOutstandingOp;
|
||||
}
|
||||
|
||||
void TraceCacheState(FullDecoder* decoder) const {
|
||||
if (!FLAG_trace_liftoff) return;
|
||||
StdoutStream os;
|
||||
for (int control_depth = decoder->control_depth() - 1; control_depth >= -1;
|
||||
--control_depth) {
|
||||
auto* cache_state =
|
||||
control_depth == -1 ? __ cache_state()
|
||||
: &decoder->control_at(control_depth)
|
||||
->label_state;
|
||||
os << PrintCollection(cache_state->stack_state);
|
||||
if (control_depth != -1) PrintF("; ");
|
||||
}
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
void DefineSafepoint() {
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
__ cache_state()->DefineSafepoint(safepoint);
|
||||
}
|
||||
|
||||
void DefineSafepointWithCalleeSavedRegisters() {
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
__ cache_state()->DefineSafepointWithCalleeSavedRegisters(safepoint);
|
||||
}
|
||||
|
||||
Register LoadInstanceIntoRegister(LiftoffRegList pinned, Register fallback) {
|
||||
Register instance = __ cache_state()->cached_instance;
|
||||
if (instance == no_reg) {
|
||||
instance = __ cache_state()->TrySetCachedInstanceRegister(
|
||||
pinned | LiftoffRegList::ForRegs(fallback));
|
||||
if (instance == no_reg) instance = fallback;
|
||||
__ LoadInstanceFromFrame(instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
static constexpr WasmOpcode kNoOutstandingOp = kExprUnreachable;
|
||||
static constexpr base::EnumSet<ValueKind> kUnconditionallySupported{
|
||||
// MVP:
|
||||
@ -6169,46 +6209,6 @@ class LiftoffCompiler {
|
||||
int32_t* max_steps_;
|
||||
int32_t* nondeterminism_;
|
||||
|
||||
bool has_outstanding_op() const {
|
||||
return outstanding_op_ != kNoOutstandingOp;
|
||||
}
|
||||
|
||||
void TraceCacheState(FullDecoder* decoder) const {
|
||||
if (!FLAG_trace_liftoff) return;
|
||||
StdoutStream os;
|
||||
for (int control_depth = decoder->control_depth() - 1; control_depth >= -1;
|
||||
--control_depth) {
|
||||
auto* cache_state =
|
||||
control_depth == -1 ? __ cache_state()
|
||||
: &decoder->control_at(control_depth)
|
||||
->label_state;
|
||||
os << PrintCollection(cache_state->stack_state);
|
||||
if (control_depth != -1) PrintF("; ");
|
||||
}
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
void DefineSafepoint() {
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
__ cache_state()->DefineSafepoint(safepoint);
|
||||
}
|
||||
|
||||
void DefineSafepointWithCalleeSavedRegisters() {
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
__ cache_state()->DefineSafepointWithCalleeSavedRegisters(safepoint);
|
||||
}
|
||||
|
||||
Register LoadInstanceIntoRegister(LiftoffRegList pinned, Register fallback) {
|
||||
Register instance = __ cache_state()->cached_instance;
|
||||
if (instance == no_reg) {
|
||||
instance = __ cache_state()->TrySetCachedInstanceRegister(
|
||||
pinned | LiftoffRegList::ForRegs(fallback));
|
||||
if (instance == no_reg) instance = fallback;
|
||||
__ LoadInstanceFromFrame(instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(LiftoffCompiler);
|
||||
};
|
||||
|
||||
|
@ -313,9 +313,9 @@ class LiftoffRegister {
|
||||
}
|
||||
|
||||
private:
|
||||
storage_t code_;
|
||||
|
||||
explicit constexpr LiftoffRegister(storage_t code) : code_(code) {}
|
||||
|
||||
storage_t code_;
|
||||
};
|
||||
ASSERT_TRIVIALLY_COPYABLE(LiftoffRegister);
|
||||
|
||||
@ -467,10 +467,10 @@ class LiftoffRegList {
|
||||
}
|
||||
|
||||
private:
|
||||
storage_t regs_ = 0;
|
||||
|
||||
// Unchecked constructor. Only use for valid bits.
|
||||
explicit constexpr LiftoffRegList(storage_t bits) : regs_(bits) {}
|
||||
|
||||
storage_t regs_ = 0;
|
||||
};
|
||||
ASSERT_TRIVIALLY_COPYABLE(LiftoffRegList);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user