remove CallFrame fn iterate

This commit is contained in:
pfg
2025-07-25 15:11:46 -07:00
parent f8862cd54d
commit fc5e8fa576

View File

@@ -36,11 +36,6 @@ pub const CallFrame = opaque {
return self.asUnsafeJSValueArray()[offset_callee];
}
/// Return a basic iterator.
pub fn iterate(call_frame: *const CallFrame) Iterator {
return .{ .rest = call_frame.arguments() };
}
/// From JavaScriptCore/interpreter/CallFrame.h
///
/// | ...... | |
@@ -193,16 +188,6 @@ pub const CallFrame = opaque {
return std.mem.span(Bun__CallFrame__describeFrame(self));
}
pub const Iterator = struct {
rest: []const JSValue,
pub fn next(it: *Iterator) ?JSValue {
if (it.rest.len == 0) return null;
const current = it.rest[0];
it.rest = it.rest[1..];
return current;
}
};
/// This is an advanced iterator struct which is used by various APIs. In
/// Node.fs, `will_be_async` is set to true which allows string/path APIs to
/// know if they have to do threadsafe clones.