Commit 7e1e311a authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

Fix compilation errors with gcc

Naming a class member function the same as a class name
could cause compilation issues with gcc:
```
error: changes meaning of 'StackFrameInfo' from 'class
v8::internal::StackFrameInfo'
```
This CL changes the function name to fix the problem.


Change-Id: I085018504deefefa99dbf2ff8638bc0e872fdbc8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3366703Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78484}
parent 47e8e8cc
......@@ -1593,8 +1593,8 @@ Handle<Context> FrameSummary::JavaScriptFrameSummary::native_context() const {
return handle(function_->context().native_context(), isolate());
}
Handle<StackFrameInfo> FrameSummary::JavaScriptFrameSummary::StackFrameInfo()
const {
Handle<StackFrameInfo>
FrameSummary::JavaScriptFrameSummary::CreateStackFrameInfo() const {
Handle<SharedFunctionInfo> shared(function_->shared(), isolate());
Handle<Script> script(Script::cast(shared->script()), isolate());
Handle<String> function_name = JSFunction::GetDebugName(function_);
......@@ -1655,7 +1655,8 @@ Handle<Context> FrameSummary::WasmFrameSummary::native_context() const {
return handle(wasm_instance()->native_context(), isolate());
}
Handle<StackFrameInfo> FrameSummary::WasmFrameSummary::StackFrameInfo() const {
Handle<StackFrameInfo> FrameSummary::WasmFrameSummary::CreateStackFrameInfo()
const {
Handle<String> function_name =
GetWasmFunctionDebugName(isolate(), wasm_instance(), function_index());
return isolate()->factory()->NewStackFrameInfo(script(), SourcePosition(),
......@@ -1730,7 +1731,7 @@ FRAME_SUMMARY_DISPATCH(Handle<Object>, script)
FRAME_SUMMARY_DISPATCH(int, SourcePosition)
FRAME_SUMMARY_DISPATCH(int, SourceStatementPosition)
FRAME_SUMMARY_DISPATCH(Handle<Context>, native_context)
FRAME_SUMMARY_DISPATCH(Handle<StackFrameInfo>, StackFrameInfo)
FRAME_SUMMARY_DISPATCH(Handle<StackFrameInfo>, CreateStackFrameInfo)
#undef FRAME_SUMMARY_DISPATCH
......
......@@ -394,7 +394,7 @@ class V8_EXPORT_PRIVATE FrameSummary {
int SourceStatementPosition() const;
Handle<Object> script() const;
Handle<Context> native_context() const;
Handle<StackFrameInfo> StackFrameInfo() const;
Handle<StackFrameInfo> CreateStackFrameInfo() const;
private:
Handle<Object> receiver_;
......@@ -424,7 +424,7 @@ class V8_EXPORT_PRIVATE FrameSummary {
Handle<WasmInstanceObject> wasm_instance() const { return wasm_instance_; }
Handle<Context> native_context() const;
bool at_to_number_conversion() const { return at_to_number_conversion_; }
Handle<StackFrameInfo> StackFrameInfo() const;
Handle<StackFrameInfo> CreateStackFrameInfo() const;
private:
Handle<WasmInstanceObject> wasm_instance_;
......@@ -458,7 +458,7 @@ class V8_EXPORT_PRIVATE FrameSummary {
int SourcePosition() const;
int SourceStatementPosition() const;
Handle<Context> native_context() const;
Handle<StackFrameInfo> StackFrameInfo() const;
Handle<StackFrameInfo> CreateStackFrameInfo() const;
#define FRAME_SUMMARY_CAST(kind_, type, field, desc) \
bool Is##desc() const { return base_.kind() == kind_; } \
......
......@@ -1262,7 +1262,7 @@ class StackFrameBuilder {
if (index_ >= limit_) return false;
// Skip frames that aren't subject to debugging.
if (!summary.is_subject_to_debugging()) return true;
Handle<StackFrameInfo> frame = summary.StackFrameInfo();
Handle<StackFrameInfo> frame = summary.CreateStackFrameInfo();
frames_ = FixedArray::SetAndGrow(isolate_, frames_, index_++, frame);
return true;
}
......
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