Commit 68252f8f authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[maglev] Rename/refactor eager & lazy deopts

Make LazyDeoptInfo and EagerDeoptInfo both store a
CheckpointedInterpreterState for the bytecode position and
register frame, and make codegen store pointers to these
deopt infos instead of the checkpoint.

This opens the door to using InputLocation for lazy deopts,
same as for eager ones.

Bug: v8:7700
Change-Id: I8ff3056ff72fd9f2288d41769979c5183c3d0972
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563561Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79723}
parent 6693641e
......@@ -45,12 +45,12 @@ class MaglevCodeGenState {
const std::vector<DeferredCodeInfo*>& deferred_code() const {
return deferred_code_;
}
void PushNonLazyDeopt(Checkpoint* info) { non_lazy_deopts_.push_back(info); }
void PushLazyDeopt(LazyDeoptSafepoint* info) { lazy_deopts_.push_back(info); }
const std::vector<Checkpoint*>& non_lazy_deopts() const {
return non_lazy_deopts_;
void PushEagerDeopt(EagerDeoptInfo* info) { eager_deopts_.push_back(info); }
void PushLazyDeopt(LazyDeoptInfo* info) { lazy_deopts_.push_back(info); }
const std::vector<EagerDeoptInfo*>& eager_deopts() const {
return eager_deopts_;
}
const std::vector<LazyDeoptSafepoint*>& lazy_deopts() const {
const std::vector<LazyDeoptInfo*>& lazy_deopts() const {
return lazy_deopts_;
}
......@@ -91,8 +91,8 @@ class MaglevCodeGenState {
MacroAssembler masm_;
std::vector<DeferredCodeInfo*> deferred_code_;
std::vector<Checkpoint*> non_lazy_deopts_;
std::vector<LazyDeoptSafepoint*> lazy_deopts_;
std::vector<EagerDeoptInfo*> eager_deopts_;
std::vector<LazyDeoptInfo*> lazy_deopts_;
int vreg_slots_ = 0;
// Allow marking some codegen paths as unsupported, so that we can test maglev
......
......@@ -361,19 +361,19 @@ class MaglevCodeGeneratorImpl final {
deopt_exit_start_offset_ = __ pc_offset();
__ RecordComment("-- Non-lazy deopts");
for (Checkpoint* checkpoint : code_gen_state_.non_lazy_deopts()) {
EmitEagerDeopt(checkpoint);
for (EagerDeoptInfo* deopt_info : code_gen_state_.eager_deopts()) {
EmitEagerDeopt(deopt_info);
__ bind(&checkpoint->deopt_entry_label);
__ bind(&deopt_info->deopt_entry_label);
// TODO(leszeks): Add soft deopt entry.
__ CallForDeoptimization(Builtin::kDeoptimizationEntry_Eager, 0,
&checkpoint->deopt_entry_label,
&deopt_info->deopt_entry_label,
DeoptimizeKind::kEager, nullptr, nullptr);
}
__ RecordComment("-- Lazy deopts");
int last_updated_safepoint = 0;
for (LazyDeoptSafepoint* deopt_info : code_gen_state_.lazy_deopts()) {
for (LazyDeoptInfo* deopt_info : code_gen_state_.lazy_deopts()) {
EmitLazyDeopt(deopt_info);
__ bind(&deopt_info->deopt_entry_label);
......@@ -389,11 +389,11 @@ class MaglevCodeGeneratorImpl final {
}
}
void EmitEagerDeopt(Checkpoint* checkpoint) {
void EmitEagerDeopt(EagerDeoptInfo* deopt_info) {
int frame_count = 1;
int jsframe_count = 1;
int update_feedback_count = 0;
checkpoint->deopt_index = translation_array_builder_.BeginTranslation(
deopt_info->deopt_index = translation_array_builder_.BeginTranslation(
frame_count, jsframe_count, update_feedback_count);
// Returns are used for updating an accumulator or register after a lazy
......@@ -401,27 +401,28 @@ class MaglevCodeGeneratorImpl final {
const int return_offset = 0;
const int return_count = 0;
translation_array_builder_.BeginInterpretedFrame(
checkpoint->bytecode_position, kFunctionLiteralIndex,
deopt_info->state.bytecode_position, kFunctionLiteralIndex,
code_gen_state_.register_count(), return_offset, return_count);
EmitDeoptFrameValues(*code_gen_state_.compilation_unit(), checkpoint->state,
EmitDeoptFrameValues(*code_gen_state_.compilation_unit(),
deopt_info->state.register_frame,
interpreter::Register::invalid_value());
}
void EmitLazyDeopt(LazyDeoptSafepoint* safepoint) {
void EmitLazyDeopt(LazyDeoptInfo* deopt_info) {
int frame_count = 1;
int jsframe_count = 1;
int update_feedback_count = 0;
safepoint->deopt_index = translation_array_builder_.BeginTranslation(
deopt_info->deopt_index = translation_array_builder_.BeginTranslation(
frame_count, jsframe_count, update_feedback_count);
// Return offsets are counted from the end of the translation frame, which
// is the array [parameters..., locals..., accumulator].
int return_offset;
if (safepoint->result_location ==
if (deopt_info->result_location ==
interpreter::Register::virtual_accumulator()) {
return_offset = 0;
} else if (safepoint->result_location.is_parameter()) {
} else if (deopt_info->result_location.is_parameter()) {
// This is slightly tricky to reason about because of zero indexing and
// fence post errors. As an example, consider a frame with 2 locals and
// 2 parameters, where we want argument index 1 -- looking at the array
......@@ -432,19 +433,20 @@ class MaglevCodeGeneratorImpl final {
// 2 + 2 - 1 = 3
return_offset = code_gen_state_.register_count() +
code_gen_state_.parameter_count() -
safepoint->result_location.ToParameterIndex();
deopt_info->result_location.ToParameterIndex();
} else {
return_offset =
code_gen_state_.register_count() - safepoint->result_location.index();
return_offset = code_gen_state_.register_count() -
deopt_info->result_location.index();
}
// TODO(leszeks): Support lazy deopts with multiple return values.
int return_count = 1;
translation_array_builder_.BeginInterpretedFrame(
safepoint->bytecode_position, kFunctionLiteralIndex,
deopt_info->state.bytecode_position, kFunctionLiteralIndex,
code_gen_state_.register_count(), return_offset, return_count);
EmitDeoptFrameValues(*code_gen_state_.compilation_unit(), safepoint->state,
safepoint->result_location);
EmitDeoptFrameValues(*code_gen_state_.compilation_unit(),
deopt_info->state.register_frame,
deopt_info->result_location);
}
void EmitDeoptFrameValues(
......@@ -536,7 +538,7 @@ class MaglevCodeGeneratorImpl final {
Handle<DeoptimizationData> GenerateDeoptimizationData() {
int non_lazy_deopt_count =
static_cast<int>(code_gen_state_.non_lazy_deopts().size());
static_cast<int>(code_gen_state_.eager_deopts().size());
int lazy_deopt_count =
static_cast<int>(code_gen_state_.lazy_deopts().size());
int deopt_count = lazy_deopt_count + non_lazy_deopt_count;
......@@ -584,21 +586,21 @@ class MaglevCodeGeneratorImpl final {
// Populate deoptimization entries.
int i = 0;
for (Checkpoint* checkpoint : code_gen_state_.non_lazy_deopts()) {
DCHECK_NE(checkpoint->deopt_index, -1);
data->SetBytecodeOffset(i, checkpoint->bytecode_position);
data->SetTranslationIndex(i, Smi::FromInt(checkpoint->deopt_index));
data->SetPc(i, Smi::FromInt(checkpoint->deopt_entry_label.pos()));
for (EagerDeoptInfo* deopt_info : code_gen_state_.eager_deopts()) {
DCHECK_NE(deopt_info->deopt_index, -1);
data->SetBytecodeOffset(i, deopt_info->state.bytecode_position);
data->SetTranslationIndex(i, Smi::FromInt(deopt_info->deopt_index));
data->SetPc(i, Smi::FromInt(deopt_info->deopt_entry_label.pos()));
#ifdef DEBUG
data->SetNodeId(i, Smi::FromInt(i));
#endif // DEBUG
i++;
}
for (Checkpoint* checkpoint : code_gen_state_.lazy_deopts()) {
DCHECK_NE(checkpoint->deopt_index, -1);
data->SetBytecodeOffset(i, checkpoint->bytecode_position);
data->SetTranslationIndex(i, Smi::FromInt(checkpoint->deopt_index));
data->SetPc(i, Smi::FromInt(checkpoint->deopt_entry_label.pos()));
for (LazyDeoptInfo* deopt_info : code_gen_state_.lazy_deopts()) {
DCHECK_NE(deopt_info->deopt_index, -1);
data->SetBytecodeOffset(i, deopt_info->state.bytecode_position);
data->SetTranslationIndex(i, Smi::FromInt(deopt_info->deopt_index));
data->SetPc(i, Smi::FromInt(deopt_info->deopt_entry_label.pos()));
#ifdef DEBUG
data->SetNodeId(i, Smi::FromInt(i));
#endif // DEBUG
......
......@@ -107,12 +107,12 @@ class UseMarkingProcessor {
void MarkCheckpointNodes(NodeBase* node,
const EagerDeoptInfo* eager_deopt_info,
const ProcessingState& state) {
const CompactInterpreterFrameState* checkpoint_state =
eager_deopt_info->checkpoint->state;
const CompactInterpreterFrameState* register_frame =
eager_deopt_info->state.register_frame;
int use_id = node->id();
int index = 0;
checkpoint_state->ForEachValue(
register_frame->ForEachValue(
*state.compilation_unit(),
[&](ValueNode* node, interpreter::Register reg) {
node->mark_use(use_id, &eager_deopt_info->input_locations[index++]);
......
......@@ -7,6 +7,7 @@
#include <type_traits>
#include "src/base/optional.h"
#include "src/compiler/bytecode-analysis.h"
#include "src/compiler/bytecode-liveness-map.h"
#include "src/compiler/heap-refs.h"
......@@ -148,7 +149,8 @@ class MaglevGraphBuilder {
template <typename NodeT, typename... Args>
NodeT* CreateNewNode(Args&&... args) {
if constexpr (NodeT::kProperties.can_eager_deopt()) {
return Node::New<NodeT>(zone(), *compilation_unit_, GetCheckpoint(),
return Node::New<NodeT>(zone(), *compilation_unit_,
GetLatestCheckpointedState(),
std::forward<Args>(args)...);
} else {
return Node::New<NodeT>(zone(), std::forward<Args>(args)...);
......@@ -185,7 +187,7 @@ class MaglevGraphBuilder {
node->properties().can_lazy_deopt());
if constexpr (NodeT::kProperties.can_lazy_deopt()) {
node->AttachLazyDeopt(
GetLazyDeopt(interpreter::Register::virtual_accumulator()));
GetLazyDeoptInfo(interpreter::Register::virtual_accumulator()));
}
SetAccumulatorToExistingNode(node);
}
......@@ -223,33 +225,29 @@ class MaglevGraphBuilder {
current_interpreter_frame_.set(target, value);
}
void AddCheckpoint() {
latest_checkpoint_ = zone()->New<Checkpoint>(
BytecodeOffset(iterator_.current_offset()),
zone()->New<CompactInterpreterFrameState>(
*compilation_unit_, GetInLiveness(), current_interpreter_frame_));
}
void EnsureCheckpoint() {
if (!latest_checkpoint_) AddCheckpoint();
}
Checkpoint* GetCheckpoint() {
EnsureCheckpoint();
return latest_checkpoint_;
CheckpointedInterpreterState GetLatestCheckpointedState() {
if (!latest_checkpointed_state_) {
latest_checkpointed_state_.emplace(
BytecodeOffset(iterator_.current_offset()),
zone()->New<CompactInterpreterFrameState>(
*compilation_unit_, GetInLiveness(), current_interpreter_frame_));
}
return *latest_checkpointed_state_;
}
LazyDeoptSafepoint* GetLazyDeopt(interpreter::Register result_location) {
return zone()->New<LazyDeoptSafepoint>(
BytecodeOffset(iterator_.current_offset()),
zone()->New<CompactInterpreterFrameState>(
*compilation_unit_, GetOutLiveness(), current_interpreter_frame_),
LazyDeoptInfo GetLazyDeoptInfo(interpreter::Register result_location) {
return LazyDeoptInfo(
zone(), *compilation_unit_,
CheckpointedInterpreterState(BytecodeOffset(iterator_.current_offset()),
zone()->New<CompactInterpreterFrameState>(
*compilation_unit_, GetOutLiveness(),
current_interpreter_frame_)),
result_location);
}
void MarkPossibleSideEffect() {
// If there was a potential side effect, invalidate the previous checkpoint.
latest_checkpoint_ = nullptr;
latest_checkpointed_state_.reset();
}
int next_offset() const {
......@@ -303,7 +301,7 @@ class MaglevGraphBuilder {
// If the next block has merge states, then it's not a simple fallthrough,
// and we should reset the checkpoint validity.
if (merge_states_[next_block_offset] != nullptr) {
latest_checkpoint_ = nullptr;
latest_checkpointed_state_.reset();
}
// Start a new block for the fallthrough path, unless it's a merge point, in
// which case we merge our state into it. That merge-point could also be a
......@@ -405,7 +403,7 @@ class MaglevGraphBuilder {
// Current block information.
BasicBlock* current_block_ = nullptr;
int block_offset_ = 0;
Checkpoint* latest_checkpoint_ = nullptr;
base::Optional<CheckpointedInterpreterState> latest_checkpointed_state_;
BasicBlockRef* jump_targets_;
MergePointInterpreterFrameState** merge_states_;
......
......@@ -311,10 +311,10 @@ void PrintEagerDeopt(std::ostream& os, std::vector<BasicBlock*> targets,
PrintVerticalArrows(os, targets);
PrintPadding(os, graph_labeller, 0);
Checkpoint* checkpoint = node->checkpoint();
os << " ↱ eager: {";
EagerDeoptInfo* deopt_info = node->eager_deopt_info();
os << " ↱ eager @" << deopt_info->state.bytecode_position << " : {";
bool first = true;
checkpoint->state->ForEachValue(
deopt_info->state.register_frame->ForEachValue(
*state.compilation_unit(),
[&](ValueNode* node, interpreter::Register reg) {
if (first) {
......@@ -348,10 +348,10 @@ void PrintLazyDeopt(std::ostream& os, std::vector<BasicBlock*> targets,
PrintVerticalArrows(os, targets);
PrintPadding(os, graph_labeller, 0);
LazyDeoptSafepoint* safepoint = node->lazy_deopt();
os << " ↳ lazy: {";
LazyDeoptInfo* deopt_info = node->lazy_deopt();
os << " ↳ lazy @" << deopt_info->state.bytecode_position << " : {";
bool first = true;
safepoint->state->ForEachValue(
deopt_info->state.register_frame->ForEachValue(
*state.compilation_unit(),
[&](ValueNode* node, interpreter::Register reg) {
if (first) {
......@@ -360,7 +360,7 @@ void PrintLazyDeopt(std::ostream& os, std::vector<BasicBlock*> targets,
os << ", ";
}
os << reg.ToString() << ":";
if (reg == safepoint->result_location) {
if (reg == deopt_info->result_location) {
os << "<result>";
} else {
os << PrintNodeLabel(graph_labeller, node);
......
......@@ -164,10 +164,10 @@ struct CopyForDeferredHelper<const InterpreterFrameState*> {
*compilation_unit, *frame_state);
}
};
// Checkpoint is copied by value.
// EagerDeoptInfo pointers are copied by value.
template <>
struct CopyForDeferredHelper<Checkpoint*>
: public CopyForDeferredByValue<Checkpoint*> {};
struct CopyForDeferredHelper<EagerDeoptInfo*>
: public CopyForDeferredByValue<EagerDeoptInfo*> {};
template <typename T>
T CopyForDeferred(MaglevCompilationUnit* compilation_unit, T&& value) {
......@@ -262,25 +262,25 @@ void JumpToDeferredIf(Condition cond, MaglevCodeGenState* code_gen_state,
// Deopt
// ---
void RegisterEagerDeoptCheckpoint(MaglevCodeGenState* code_gen_state,
Checkpoint* checkpoint) {
if (checkpoint->deopt_entry_label.is_unused()) {
code_gen_state->PushNonLazyDeopt(checkpoint);
void RegisterEagerDeopt(MaglevCodeGenState* code_gen_state,
EagerDeoptInfo* deopt_info) {
if (deopt_info->deopt_entry_label.is_unused()) {
code_gen_state->PushEagerDeopt(deopt_info);
}
}
void EmitEagerDeoptIf(Condition cond, MaglevCodeGenState* code_gen_state,
Checkpoint* checkpoint) {
RegisterEagerDeoptCheckpoint(code_gen_state, checkpoint);
EagerDeoptInfo* deopt_info) {
RegisterEagerDeopt(code_gen_state, deopt_info);
__ RecordComment("-- Jump to eager deopt");
__ j(cond, &checkpoint->deopt_entry_label);
__ j(cond, &deopt_info->deopt_entry_label);
}
template <typename NodeT>
void EmitEagerDeoptIf(Condition cond, MaglevCodeGenState* code_gen_state,
NodeT* node) {
STATIC_ASSERT(NodeT::kProperties.can_eager_deopt());
EmitEagerDeoptIf(cond, code_gen_state, node->checkpoint());
EmitEagerDeoptIf(cond, code_gen_state, node->eager_deopt_info());
}
// ---
......@@ -349,12 +349,11 @@ void NodeBase::Print(std::ostream& os,
UNREACHABLE();
}
EagerDeoptInfo::EagerDeoptInfo(Zone* zone,
const MaglevCompilationUnit& compilation_unit,
Checkpoint* checkpoint)
: checkpoint(checkpoint),
DeoptInfo::DeoptInfo(Zone* zone, const MaglevCompilationUnit& compilation_unit,
CheckpointedInterpreterState state)
: state(state),
input_locations(zone->NewArray<InputLocation>(
checkpoint->state->size(compilation_unit))) {}
state.register_frame->size(compilation_unit))) {}
// ---
// Nodes
......@@ -490,16 +489,16 @@ void CheckMaps::GenerateCode(MaglevCodeGenState* code_gen_state,
JumpToDeferredIf(
not_equal, code_gen_state,
[](MaglevCodeGenState* code_gen_state, Label* return_label,
Register object, CheckMaps* node, Checkpoint* checkpoint,
Register object, CheckMaps* node, EagerDeoptInfo* deopt_info,
Register map_tmp) {
RegisterEagerDeoptCheckpoint(code_gen_state, checkpoint);
RegisterEagerDeopt(code_gen_state, deopt_info);
// If the map is not deprecated, deopt straight away.
__ movl(kScratchRegister,
FieldOperand(map_tmp, Map::kBitField3Offset));
__ testl(kScratchRegister,
Immediate(Map::Bits3::IsDeprecatedBit::kMask));
__ j(zero, &checkpoint->deopt_entry_label);
__ j(zero, &deopt_info->deopt_entry_label);
// Otherwise, try migrating the object. If the migration returns Smi
// zero, then it failed and we should deopt.
......@@ -509,16 +508,16 @@ void CheckMaps::GenerateCode(MaglevCodeGenState* code_gen_state,
// TODO(verwaest): We're calling so we need to spill around it.
__ CallRuntime(Runtime::kTryMigrateInstance);
__ cmpl(kReturnRegister0, Immediate(0));
__ j(equal, &checkpoint->deopt_entry_label);
__ j(equal, &deopt_info->deopt_entry_label);
// The migrated object is returned on success, retry the map check.
__ Move(object, kReturnRegister0);
__ LoadMap(map_tmp, object);
__ Cmp(map_tmp, node->map().object());
__ j(equal, return_label);
__ jmp(&checkpoint->deopt_entry_label);
__ jmp(&deopt_info->deopt_entry_label);
},
object, this, checkpoint(), map_tmp);
object, this, eager_deopt_info(), map_tmp);
} else {
EmitEagerDeoptIf(not_equal, code_gen_state, this);
}
......
......@@ -19,6 +19,7 @@
#include "src/maglev/maglev-compilation-unit.h"
#include "src/objects/smi.h"
#include "src/roots/roots.h"
#include "src/utils/utils.h"
#include "src/zone/zone.h"
namespace v8 {
......@@ -301,37 +302,50 @@ class Input : public InputLocation {
ValueNode* node_;
};
class Checkpoint : public ZoneObject {
class CheckpointedInterpreterState {
public:
Checkpoint(BytecodeOffset bytecode_position,
const CompactInterpreterFrameState* state)
: bytecode_position(bytecode_position), state(state) {}
CheckpointedInterpreterState() = default;
CheckpointedInterpreterState(BytecodeOffset bytecode_position,
const CompactInterpreterFrameState* state)
: bytecode_position(bytecode_position), register_frame(state) {}
const BytecodeOffset bytecode_position;
const CompactInterpreterFrameState* const state;
BytecodeOffset bytecode_position = BytecodeOffset::None();
const CompactInterpreterFrameState* register_frame = nullptr;
};
class DeoptInfo {
protected:
DeoptInfo() = default;
DeoptInfo(Zone* zone, const MaglevCompilationUnit& compilation_unit,
CheckpointedInterpreterState checkpoint);
public:
CheckpointedInterpreterState state;
InputLocation* input_locations = nullptr;
Label deopt_entry_label;
int deopt_index = -1;
};
class EagerDeoptInfo {
class EagerDeoptInfo : public DeoptInfo {
public:
EagerDeoptInfo(Zone* zone, const MaglevCompilationUnit& compilation_unit_,
Checkpoint* checkpoint);
EagerDeoptInfo(Zone* zone, const MaglevCompilationUnit& compilation_unit,
CheckpointedInterpreterState checkpoint)
: DeoptInfo(zone, compilation_unit, checkpoint) {}
Checkpoint* const checkpoint;
InputLocation* const input_locations;
EagerDeoptInfo() = delete;
};
class LazyDeoptSafepoint : public Checkpoint {
class LazyDeoptInfo : public DeoptInfo {
public:
LazyDeoptSafepoint(BytecodeOffset bytecode_position,
const CompactInterpreterFrameState* state,
interpreter::Register result_location)
: Checkpoint(bytecode_position, state),
LazyDeoptInfo() = default;
LazyDeoptInfo(Zone* zone, const MaglevCompilationUnit& compilation_unit,
CheckpointedInterpreterState checkpoint,
interpreter::Register result_location)
: DeoptInfo(zone, compilation_unit, checkpoint),
result_location(result_location) {}
int deopting_call_return_pc = -1;
const interpreter::Register result_location;
interpreter::Register result_location;
};
// Dummy type for the initial raw allocation.
......@@ -354,17 +368,17 @@ NODE_BASE_LIST(DEF_OPCODE_OF)
class LazyDeoptMixin {
public:
LazyDeoptSafepoint* lazy_deopt() const {
DCHECK_NOT_NULL(lazy_deopt_);
return lazy_deopt_;
LazyDeoptInfo* lazy_deopt() {
DCHECK_NOT_NULL(lazy_deopt_.state.register_frame);
return &lazy_deopt_;
}
void AttachLazyDeopt(LazyDeoptSafepoint* safepoint) {
DCHECK_NULL(lazy_deopt_);
lazy_deopt_ = safepoint;
void AttachLazyDeopt(LazyDeoptInfo&& lazy_deopt) {
DCHECK_NULL(lazy_deopt_.state.register_frame);
lazy_deopt_ = std::move(lazy_deopt);
}
private:
LazyDeoptSafepoint* lazy_deopt_ = nullptr;
LazyDeoptInfo lazy_deopt_;
};
} // namespace detail
......@@ -404,7 +418,7 @@ class NodeBase : public ZoneObject {
template <class Derived, typename... Args>
static Derived* New(Zone* zone, const MaglevCompilationUnit& compilation_unit,
Checkpoint* checkpoint, Args&&... args) {
CheckpointedInterpreterState checkpoint, Args&&... args) {
Derived* node = New<Derived>(zone, std::forward<Args>(args)...);
new (node->eager_deopt_info_address())
EagerDeoptInfo(zone, compilation_unit, checkpoint);
......@@ -501,6 +515,13 @@ class NodeBase : public ZoneObject {
void Print(std::ostream& os, MaglevGraphLabeller*) const;
EagerDeoptInfo* eager_deopt_info() {
DCHECK(properties().can_eager_deopt());
return (
reinterpret_cast<EagerDeoptInfo*>(input_address(input_count() - 1)) -
1);
}
const EagerDeoptInfo* eager_deopt_info() const {
DCHECK(properties().can_eager_deopt());
return (reinterpret_cast<const EagerDeoptInfo*>(
......@@ -508,8 +529,6 @@ class NodeBase : public ZoneObject {
1);
}
Checkpoint* checkpoint() const { return eager_deopt_info()->checkpoint; }
protected:
explicit NodeBase(uint32_t bitfield) : bit_field_(bitfield) {}
......
......@@ -325,7 +325,7 @@ void StraightForwardRegisterAllocator::UpdateUse(
void StraightForwardRegisterAllocator::UpdateUse(
const EagerDeoptInfo& eager_deopt_info) {
const CompactInterpreterFrameState* checkpoint_state =
eager_deopt_info.checkpoint->state;
eager_deopt_info.state.register_frame;
int index = 0;
checkpoint_state->ForEachValue(
*compilation_unit_, [&](ValueNode* node, interpreter::Register reg) {
......
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