mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
remove CallFrame fn iterate
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user