Commit ee41b157 authored by Victor Gomes's avatar Victor Gomes Committed by Commit Bot

[cleanup] Sync frames.h and frame-constants.h

- Add a frame inheritance hierarchy comment.
- Rename StandardFrame from frame.h to CommonFrame: StandardFrame usually means a JavaScript frame in other files.
- Create a TypedFrame and adjust every frame that depends on it.

Change-Id: I105a4ba95954c02e43bcbe2b677e554b9e9af092
Bug: v8:10933
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2431568
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70532}
parent f4c42cab
......@@ -854,7 +854,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.
friend class StandardFrame;
friend class CommonFrame;
DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler);
};
......
......@@ -1153,7 +1153,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.
friend class StandardFrame;
friend class CommonFrame;
DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler);
};
......
......@@ -1217,7 +1217,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.
friend class StandardFrame;
friend class CommonFrame;
DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler);
};
......
......@@ -1052,7 +1052,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.
friend class StandardFrame;
friend class CommonFrame;
DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler);
};
......
......@@ -11,7 +11,7 @@
namespace v8 {
namespace internal {
FrameInspector::FrameInspector(StandardFrame* frame, int inlined_frame_index,
FrameInspector::FrameInspector(CommonFrame* frame, int inlined_frame_index,
Isolate* isolate)
: frame_(frame),
inlined_frame_index_(inlined_frame_index),
......
......@@ -16,13 +16,12 @@ namespace v8 {
namespace internal {
class JavaScriptFrame;
class StandardFrame;
class CommonFrame;
class WasmFrame;
class FrameInspector {
public:
FrameInspector(StandardFrame* frame, int inlined_frame_index,
Isolate* isolate);
FrameInspector(CommonFrame* frame, int inlined_frame_index, Isolate* isolate);
~FrameInspector();
......@@ -49,7 +48,7 @@ class FrameInspector {
bool ParameterIsShadowedByContextLocal(Handle<ScopeInfo> info,
Handle<String> parameter_name);
StandardFrame* frame_;
CommonFrame* frame_;
int inlined_frame_index_;
std::unique_ptr<DeoptimizedFrameInfo> deoptimized_frame_;
Isolate* isolate_;
......
......@@ -166,7 +166,7 @@ v8::Local<v8::Function> DebugStackTraceIterator::GetFunction() const {
std::unique_ptr<v8::debug::ScopeIterator>
DebugStackTraceIterator::GetScopeIterator() const {
DCHECK(!Done());
StandardFrame* frame = iterator_.frame();
CommonFrame* frame = iterator_.frame();
if (frame->is_wasm()) {
return std::make_unique<DebugWasmScopeIterator>(isolate_,
WasmFrame::cast(frame));
......
......@@ -1041,7 +1041,7 @@ void Debug::PrepareStep(StepAction step_action) {
thread_local_.last_step_action_ = step_action;
StackTraceFrameIterator frames_it(isolate_, frame_id);
StandardFrame* frame = frames_it.frame();
CommonFrame* frame = frames_it.frame();
BreakLocation location = BreakLocation::Invalid();
Handle<SharedFunctionInfo> shared;
......@@ -1970,7 +1970,7 @@ bool Debug::ShouldBeSkipped() {
DisableBreak no_recursive_break(this);
StackTraceFrameIterator iterator(isolate_);
StandardFrame* frame = iterator.frame();
CommonFrame* frame = iterator.frame();
FrameSummary summary = FrameSummary::GetTop(frame);
Handle<Object> script_obj = summary.script();
if (!script_obj->IsScript()) return false;
......@@ -2136,7 +2136,7 @@ void Debug::PrintBreakLocation() {
HandleScope scope(isolate_);
StackTraceFrameIterator iterator(isolate_);
if (iterator.done()) return;
StandardFrame* frame = iterator.frame();
CommonFrame* frame = iterator.frame();
FrameSummary summary = FrameSummary::GetTop(frame);
summary.EnsureSourcePositionsAvailable();
int source_position = summary.SourcePosition();
......
......@@ -98,7 +98,7 @@ std::vector<wasm_addr_t> WasmModuleDebug::GetCallStack(
case StackFrame::WASM: {
// A standard frame may include many summarized frames, due to inlining.
std::vector<FrameSummary> frames;
StandardFrame::cast(frame)->Summarize(&frames);
CommonFrame::cast(frame)->Summarize(&frames);
for (size_t i = frames.size(); i-- != 0;) {
int offset = 0;
Handle<Script> script;
......@@ -156,7 +156,7 @@ std::vector<FrameSummary> WasmModuleDebug::FindWasmFrame(
case StackFrame::WASM: {
// A standard frame may include many summarized frames, due to inlining.
std::vector<FrameSummary> frames;
StandardFrame::cast(frame)->Summarize(&frames);
CommonFrame::cast(frame)->Summarize(&frames);
const size_t frame_count = frames.size();
DCHECK_GT(frame_count, 0);
......
......@@ -56,7 +56,7 @@ class CommonFrameConstants : public AllStatic {
// Fixed part of the frame consists of return address, caller fp,
// constant pool (if FLAG_enable_embedded_constant_pool), context, and
// function. StandardFrame::IterateExpressions assumes that kLastObjectOffset
// function. CommonFrame::IterateExpressions assumes that kLastObjectOffset
// is the last object pointer.
static constexpr int kFixedFrameSizeAboveFp = kPCOnStackSize + kFPOnStackSize;
static constexpr int kFixedSlotCountAboveFp =
......@@ -308,7 +308,7 @@ class InterpreterFrameConstants : public StandardFrameConstants {
-kFixedFrameSizeFromFp - kSystemPointerSize;
static constexpr int kExpressionsOffset = kRegisterFileFromFp;
// Expression index for {StandardFrame::GetExpressionAddress}.
// Expression index for {JavaScriptFrame::GetExpressionAddress}.
static constexpr int kBytecodeArrayExpressionIndex = -2;
static constexpr int kBytecodeOffsetExpressionIndex = -1;
static constexpr int kRegisterFileExpressionIndex = 0;
......
......@@ -65,7 +65,6 @@ inline StackFrame::StackFrame(StackFrameIteratorBase* iterator)
: iterator_(iterator), isolate_(iterator_->isolate()) {
}
inline StackHandler* StackFrame::top_handler() const {
return iterator_->handler();
}
......@@ -95,22 +94,21 @@ inline Address* StackFrame::ResolveReturnAddressLocation(Address* pc_address) {
}
}
inline NativeFrame::NativeFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {}
inline TypedFrame::TypedFrame(StackFrameIteratorBase* iterator)
: CommonFrame(iterator) {}
inline Address NativeFrame::GetCallerStackPointer() const {
return fp() + CommonFrameConstants::kCallerSPOffset;
}
inline NativeFrame::NativeFrame(StackFrameIteratorBase* iterator)
: TypedFrame(iterator) {}
inline EntryFrame::EntryFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {}
: TypedFrame(iterator) {}
inline ConstructEntryFrame::ConstructEntryFrame(
StackFrameIteratorBase* iterator)
: EntryFrame(iterator) {}
inline ExitFrame::ExitFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {}
: TypedFrame(iterator) {}
inline BuiltinExitFrame::BuiltinExitFrame(StackFrameIteratorBase* iterator)
: ExitFrame(iterator) {}
......@@ -144,53 +142,47 @@ inline Object BuiltinExitFrame::new_target_slot_object() const {
fp() + BuiltinExitFrameConstants::kNewTargetOffset));
}
inline StandardFrame::StandardFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {
}
inline CommonFrame::CommonFrame(StackFrameIteratorBase* iterator)
: StackFrame(iterator) {}
inline Object StandardFrame::GetExpression(int index) const {
inline Object CommonFrame::GetExpression(int index) const {
return Object(base::Memory<Address>(GetExpressionAddress(index)));
}
inline void StandardFrame::SetExpression(int index, Object value) {
inline void CommonFrame::SetExpression(int index, Object value) {
base::Memory<Address>(GetExpressionAddress(index)) = value.ptr();
}
inline Address StandardFrame::caller_fp() const {
inline Address CommonFrame::caller_fp() const {
return base::Memory<Address>(fp() + StandardFrameConstants::kCallerFPOffset);
}
inline Address StandardFrame::caller_pc() const {
inline Address CommonFrame::caller_pc() const {
return base::Memory<Address>(ComputePCAddress(fp()));
}
inline Address StandardFrame::ComputePCAddress(Address fp) {
inline Address CommonFrame::ComputePCAddress(Address fp) {
return fp + StandardFrameConstants::kCallerPCOffset;
}
inline Address StandardFrame::ComputeConstantPoolAddress(Address fp) {
inline Address CommonFrame::ComputeConstantPoolAddress(Address fp) {
return fp + StandardFrameConstants::kConstantPoolOffset;
}
inline bool StandardFrame::IsArgumentsAdaptorFrame(Address fp) {
inline bool CommonFrame::IsArgumentsAdaptorFrame(Address fp) {
intptr_t frame_type =
base::Memory<intptr_t>(fp + TypedFrameConstants::kFrameTypeOffset);
return frame_type == StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR);
}
inline bool StandardFrame::IsConstructFrame(Address fp) {
inline bool CommonFrame::IsConstructFrame(Address fp) {
intptr_t frame_type =
base::Memory<intptr_t>(fp + TypedFrameConstants::kFrameTypeOffset);
return frame_type == StackFrame::TypeToMarker(StackFrame::CONSTRUCT);
}
inline JavaScriptFrame::JavaScriptFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {}
: CommonFrame(iterator) {}
Address JavaScriptFrame::GetParameterSlot(int index) const {
DCHECK_LE(-1, index);
......@@ -219,15 +211,12 @@ inline Object JavaScriptFrame::function_slot_object() const {
}
inline StubFrame::StubFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {
}
: TypedFrame(iterator) {}
inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator)
: JavaScriptFrame(iterator) {
}
inline InterpretedFrame::InterpretedFrame(StackFrameIteratorBase* iterator)
: JavaScriptFrame(iterator) {}
......@@ -237,17 +226,17 @@ inline ArgumentsAdaptorFrame::ArgumentsAdaptorFrame(
}
inline BuiltinFrame::BuiltinFrame(StackFrameIteratorBase* iterator)
: JavaScriptFrame(iterator) {}
: TypedFrame(iterator) {}
inline WasmFrame::WasmFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {}
: TypedFrame(iterator) {}
inline WasmExitFrame::WasmExitFrame(StackFrameIteratorBase* iterator)
: WasmFrame(iterator) {}
inline WasmDebugBreakFrame::WasmDebugBreakFrame(
StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {}
: TypedFrame(iterator) {}
inline WasmToJsFrame::WasmToJsFrame(StackFrameIteratorBase* iterator)
: StubFrame(iterator) {}
......@@ -260,11 +249,10 @@ inline CWasmEntryFrame::CWasmEntryFrame(StackFrameIteratorBase* iterator)
inline WasmCompileLazyFrame::WasmCompileLazyFrame(
StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {}
: TypedFrame(iterator) {}
inline InternalFrame::InternalFrame(StackFrameIteratorBase* iterator)
: StandardFrame(iterator) {
}
: TypedFrame(iterator) {}
inline ConstructFrame::ConstructFrame(StackFrameIteratorBase* iterator)
: InternalFrame(iterator) {
......@@ -305,11 +293,11 @@ inline JavaScriptFrame* JavaScriptFrameIterator::frame() const {
return static_cast<JavaScriptFrame*>(frame);
}
inline StandardFrame* StackTraceFrameIterator::frame() const {
inline CommonFrame* StackTraceFrameIterator::frame() const {
StackFrame* frame = iterator_.frame();
DCHECK(frame->is_java_script() || frame->is_arguments_adaptor() ||
frame->is_wasm());
return static_cast<StandardFrame*>(frame);
return static_cast<CommonFrame*>(frame);
}
bool StackTraceFrameIterator::is_javascript() const {
......
......@@ -316,7 +316,7 @@ SafeStackFrameIterator::SafeStackFrameIterator(Isolate* isolate, Address pc,
state.fp = fp;
state.sp = sp;
state.pc_address = StackFrame::ResolveReturnAddressLocation(
reinterpret_cast<Address*>(StandardFrame::ComputePCAddress(fp)));
reinterpret_cast<Address*>(CommonFrame::ComputePCAddress(fp)));
// If the current PC is in a bytecode handler, the top stack frame isn't
// the bytecode handler's frame and the top of stack or link register is a
......@@ -658,7 +658,9 @@ StackFrame::Type StackFrame::GetCallerState(State* state) const {
Address StackFrame::UnpaddedFP() const { return fp(); }
Code NativeFrame::unchecked_code() const { return Code(); }
Address CommonFrame::GetCallerStackPointer() const {
return fp() + CommonFrameConstants::kCallerSPOffset;
}
void NativeFrame::ComputeCallerState(State* state) const {
state->sp = caller_sp();
......@@ -693,8 +695,6 @@ Code ConstructEntryFrame::unchecked_code() const {
return isolate()->heap()->builtin(Builtins::kJSConstructEntry);
}
Code ExitFrame::unchecked_code() const { return Code(); }
void ExitFrame::ComputeCallerState(State* state) const {
// Set up the caller state.
state->sp = caller_sp();
......@@ -714,10 +714,6 @@ void ExitFrame::Iterate(RootVisitor* v) const {
IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
}
Address ExitFrame::GetCallerStackPointer() const {
return fp() + ExitFrameConstants::kCallerSPOffset;
}
StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) {
if (fp == 0) return NONE;
StackFrame::Type type = ComputeFrameType(fp);
......@@ -855,7 +851,7 @@ void BuiltinExitFrame::Print(StringStream* accumulator, PrintMode mode,
accumulator->Add(")\n\n");
}
Address StandardFrame::GetExpressionAddress(int n) const {
Address CommonFrame::GetExpressionAddress(int n) const {
const int offset = StandardFrameConstants::kExpressionsOffset;
return fp() + offset - n * kSystemPointerSize;
}
......@@ -865,27 +861,17 @@ Address InterpretedFrame::GetExpressionAddress(int n) const {
return fp() + offset - n * kSystemPointerSize;
}
Script StandardFrame::script() const {
// This should only be called on frames which override this method.
UNREACHABLE();
return Script();
}
Object StandardFrame::receiver() const {
return ReadOnlyRoots(isolate()).undefined_value();
}
Object StandardFrame::context() const {
Object CommonFrame::context() const {
return ReadOnlyRoots(isolate()).undefined_value();
}
int StandardFrame::position() const {
int CommonFrame::position() const {
AbstractCode code = AbstractCode::cast(LookupCode());
int code_offset = static_cast<int>(pc() - code.InstructionStart());
return code.SourcePosition(code_offset);
}
int StandardFrame::ComputeExpressionsCount() const {
int CommonFrame::ComputeExpressionsCount() const {
Address base = GetExpressionAddress(0);
Address limit = sp() - kSystemPointerSize;
DCHECK(base >= limit); // stack grows downwards
......@@ -893,14 +879,14 @@ int StandardFrame::ComputeExpressionsCount() const {
return static_cast<int>((base - limit) / kSystemPointerSize);
}
Object StandardFrame::GetParameter(int index) const {
// StandardFrame does not define any parameters.
Object CommonFrame::GetParameter(int index) const {
// CommonFrame does not define any parameters.
UNREACHABLE();
}
int StandardFrame::ComputeParametersCount() const { return 0; }
int CommonFrame::ComputeParametersCount() const { return 0; }
void StandardFrame::ComputeCallerState(State* state) const {
void CommonFrame::ComputeCallerState(State* state) const {
state->sp = caller_sp();
state->fp = caller_fp();
state->pc_address = ResolveReturnAddressLocation(
......@@ -911,14 +897,14 @@ void StandardFrame::ComputeCallerState(State* state) const {
reinterpret_cast<Address*>(ComputeConstantPoolAddress(fp()));
}
bool StandardFrame::IsConstructor() const { return false; }
bool CommonFrame::IsConstructor() const { return false; }
void StandardFrame::Summarize(std::vector<FrameSummary>* functions) const {
void CommonFrame::Summarize(std::vector<FrameSummary>* functions) const {
// This should only be called on frames which override this method.
UNREACHABLE();
}
void StandardFrame::IterateCompiledFrame(RootVisitor* v) const {
void CommonFrame::IterateCompiledFrame(RootVisitor* v) const {
// Make sure that we're not doing "safe" stack frame iteration. We cannot
// possibly find pointers in optimized frames in that state.
DCHECK(can_access_heap_objects());
......@@ -1081,16 +1067,10 @@ void StandardFrame::IterateCompiledFrame(RootVisitor* v) const {
frame_header_limit);
}
void StubFrame::Iterate(RootVisitor* v) const { IterateCompiledFrame(v); }
Code StubFrame::unchecked_code() const {
return isolate()->FindCodeObject(pc());
}
Address StubFrame::GetCallerStackPointer() const {
return fp() + ExitFrameConstants::kCallerSPOffset;
}
int StubFrame::LookupExceptionHandlerInTable() {
Code code = LookupCode();
DCHECK(code.is_turbofanned());
......@@ -1471,25 +1451,25 @@ FrameSummary::~FrameSummary() {
#undef FRAME_SUMMARY_DESTR
}
FrameSummary FrameSummary::GetTop(const StandardFrame* frame) {
FrameSummary FrameSummary::GetTop(const CommonFrame* frame) {
std::vector<FrameSummary> frames;
frame->Summarize(&frames);
DCHECK_LT(0, frames.size());
return frames.back();
}
FrameSummary FrameSummary::GetBottom(const StandardFrame* frame) {
FrameSummary FrameSummary::GetBottom(const CommonFrame* frame) {
return Get(frame, 0);
}
FrameSummary FrameSummary::GetSingle(const StandardFrame* frame) {
FrameSummary FrameSummary::GetSingle(const CommonFrame* frame) {
std::vector<FrameSummary> frames;
frame->Summarize(&frames);
DCHECK_EQ(1, frames.size());
return frames.front();
}
FrameSummary FrameSummary::Get(const StandardFrame* frame, int index) {
FrameSummary FrameSummary::Get(const CommonFrame* frame, int index) {
DCHECK_LE(0, index);
std::vector<FrameSummary> frames;
frame->Summarize(&frames);
......@@ -1806,16 +1786,6 @@ int BuiltinFrame::ComputeParametersCount() const {
return Smi::ToInt(Object(base::Memory<Address>(fp() + offset)));
}
void BuiltinFrame::PrintFrameKind(StringStream* accumulator) const {
accumulator->Add("builtin frame: ");
}
Address InternalFrame::GetCallerStackPointer() const {
// Internal frames have no arguments. The stack pointer of the
// caller is at a fixed offset from the frame pointer.
return fp() + StandardFrameConstants::kCallerSPOffset;
}
Code InternalFrame::unchecked_code() const { return Code(); }
void WasmFrame::Print(StringStream* accumulator, PrintMode mode,
......@@ -1850,12 +1820,6 @@ Code WasmFrame::unchecked_code() const {
return isolate()->FindCodeObject(pc());
}
void WasmFrame::Iterate(RootVisitor* v) const { IterateCompiledFrame(v); }
Address WasmFrame::GetCallerStackPointer() const {
return fp() + ExitFrameConstants::kCallerSPOffset;
}
wasm::WasmCode* WasmFrame::wasm_code() const {
return isolate()->wasm_engine()->code_manager()->LookupCode(pc());
}
......@@ -1945,8 +1909,6 @@ void WasmDebugBreakFrame::Iterate(RootVisitor* v) const {
// Liftoff.
}
Code WasmDebugBreakFrame::unchecked_code() const { return Code(); }
void WasmDebugBreakFrame::Print(StringStream* accumulator, PrintMode mode,
int index) const {
PrintIndex(accumulator, mode, index);
......@@ -1954,12 +1916,6 @@ void WasmDebugBreakFrame::Print(StringStream* accumulator, PrintMode mode,
if (mode != OVERVIEW) accumulator->Add("\n");
}
Address WasmDebugBreakFrame::GetCallerStackPointer() const {
// WasmDebugBreak does not receive any arguments, hence the stack pointer of
// the caller is at a fixed offset from the frame pointer.
return fp() + WasmDebugBreakFrameConstants::kCallerSPOffset;
}
void JsToWasmFrame::Iterate(RootVisitor* v) const {
Code code = GetContainingCode(isolate(), pc());
// GenericJSToWasmWrapper stack layout
......@@ -1994,8 +1950,6 @@ void JsToWasmFrame::Iterate(RootVisitor* v) const {
v->VisitRootPointers(Root::kTop, nullptr, spill_slot_base, spill_slot_limit);
}
Code WasmCompileLazyFrame::unchecked_code() const { return Code(); }
WasmInstanceObject WasmCompileLazyFrame::wasm_instance() const {
return WasmInstanceObject::cast(*wasm_instance_slot());
}
......@@ -2013,10 +1967,6 @@ void WasmCompileLazyFrame::Iterate(RootVisitor* v) const {
v->VisitRootPointer(Root::kTop, nullptr, wasm_instance_slot());
}
Address WasmCompileLazyFrame::GetCallerStackPointer() const {
return fp() + WasmCompileLazyFrameConstants::kCallerSPOffset;
}
namespace {
void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo shared,
......@@ -2179,7 +2129,7 @@ void EntryFrame::Iterate(RootVisitor* v) const {
IteratePc(v, pc_address(), constant_pool_address(), LookupCode());
}
void StandardFrame::IterateExpressions(RootVisitor* v) const {
void CommonFrame::IterateExpressions(RootVisitor* v) const {
const int last_object_offset = StandardFrameConstants::kLastObjectOffset;
intptr_t marker =
Memory<intptr_t>(fp() + CommonFrameConstants::kContextOrFrameTypeOffset);
......
This diff is collapsed.
......@@ -1041,7 +1041,7 @@ Handle<Object> CaptureStackTrace(Isolate* isolate, Handle<Object> caller,
// A standard frame may include many summarized frames (due to
// inlining).
std::vector<FrameSummary> frames;
StandardFrame::cast(frame)->Summarize(&frames);
CommonFrame::cast(frame)->Summarize(&frames);
for (size_t i = frames.size(); i-- != 0 && !builder.full();) {
auto& summary = frames[i];
if (options.capture_only_frames_subject_to_debugging &&
......@@ -2115,7 +2115,7 @@ void Isolate::PrintCurrentStackTrace(FILE* out) {
bool Isolate::ComputeLocation(MessageLocation* target) {
StackTraceFrameIterator it(this);
if (it.done()) return false;
StandardFrame* frame = it.frame();
CommonFrame* frame = it.frame();
// Compute the location from the function and the relocation info of the
// baseline code. For optimized code this will use the deoptimization
// information to get canonical location information.
......@@ -4595,7 +4595,7 @@ SaveContext::~SaveContext() {
isolate_->set_context(context_.is_null() ? Context() : *context_);
}
bool SaveContext::IsBelowFrame(StandardFrame* frame) {
bool SaveContext::IsBelowFrame(CommonFrame* frame) {
return (c_entry_fp_ == 0) || (c_entry_fp_ > frame->sp());
}
......
......@@ -71,6 +71,7 @@ class BuiltinsConstantsTableBuilder;
class CancelableTaskManager;
class CodeEventDispatcher;
class CodeTracer;
class CommonFrame;
class CompilationCache;
class CompilationStatistics;
class CompilerDispatcher;
......@@ -98,7 +99,6 @@ class RuntimeProfiler;
class SetupIsolateDelegate;
class Simulator;
class SnapshotData;
class StandardFrame;
class StringTable;
class StubCache;
class ThreadManager;
......@@ -2000,7 +2000,7 @@ class V8_EXPORT_PRIVATE SaveContext {
Handle<Context> context() { return context_; }
// Returns true if this save context is below a given JavaScript frame.
bool IsBelowFrame(StandardFrame* frame);
bool IsBelowFrame(CommonFrame* frame);
private:
Isolate* const isolate_;
......
......@@ -81,7 +81,7 @@ static bool CheckRangeOutOfBounds(uint32_t offset, uint32_t size,
class DebugEvaluatorProxy {
public:
explicit DebugEvaluatorProxy(Isolate* isolate, StandardFrame* frame)
explicit DebugEvaluatorProxy(Isolate* isolate, CommonFrame* frame)
: isolate_(isolate), frame_(frame) {}
static void GetMemoryTrampoline(
......@@ -283,7 +283,7 @@ class DebugEvaluatorProxy {
}
Isolate* isolate_;
StandardFrame* frame_;
CommonFrame* frame_;
Handle<WasmInstanceObject> evaluator_;
Handle<WasmInstanceObject> debuggee_;
};
......@@ -356,7 +356,7 @@ static bool VerifyEvaluatorInterface(const WasmModule* raw_module,
Maybe<std::string> DebugEvaluateImpl(
Vector<const byte> snippet, Handle<WasmInstanceObject> debuggee_instance,
StandardFrame* frame) {
CommonFrame* frame) {
Isolate* isolate = debuggee_instance->GetIsolate();
HandleScope handle_scope(isolate);
WasmEngine* engine = isolate->wasm_engine();
......@@ -433,7 +433,7 @@ Maybe<std::string> DebugEvaluateImpl(
MaybeHandle<String> DebugEvaluate(Vector<const byte> snippet,
Handle<WasmInstanceObject> debuggee_instance,
StandardFrame* frame) {
CommonFrame* frame) {
Maybe<std::string> result =
DebugEvaluateImpl(snippet, debuggee_instance, frame);
if (result.IsNothing()) return {};
......
......@@ -13,9 +13,9 @@ namespace v8 {
namespace internal {
namespace wasm {
MaybeHandle<String> V8_EXPORT_PRIVATE DebugEvaluate(
Vector<const byte> snippet, Handle<WasmInstanceObject> debuggee_instance,
StandardFrame* frame);
MaybeHandle<String> V8_EXPORT_PRIVATE
DebugEvaluate(Vector<const byte> snippet,
Handle<WasmInstanceObject> debuggee_instance, CommonFrame* frame);
} // namespace wasm
} // namespace internal
......
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