This commit is contained in:
Jarred Sumner
2022-03-11 04:49:25 -08:00
parent 313ad01e42
commit 64f1af0aa6
7 changed files with 437 additions and 0 deletions

View File

@@ -392,6 +392,9 @@ pub const ArgumentsSlice = struct {
arena: std.heap.ArenaAllocator = std.heap.ArenaAllocator.init(bun.default_allocator),
all: []const JSC.JSValue,
pub fn from(arguments: []const JSC.JSValueRef) ArgumentsSlice {
return init(@ptrCast([*]const JSC.JSValue, arguments.ptr)[0..arguments.len]);
}
pub fn init(arguments: []const JSC.JSValue) ArgumentsSlice {
return ArgumentsSlice{
.remaining = arguments,