Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
zig-v8:
description: 'zig v8 version to install'
required: false
default: 'v0.5.1'
default: 'v0.5.2'
v8:
description: 'v8 version to install'
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/v8-snapshot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
zig-v8:
description: 'zig-v8 release tag the prebuilt lib came from'
required: false
default: 'v0.5.1'
default: 'v0.5.2'

runs:
using: "composite"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM debian:stable-slim
ARG MINISIG=0.12
ARG ZIG_MINISIG=RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
ARG V8=14.9.207.35
ARG ZIG_V8=v0.5.1
ARG ZIG_V8=v0.5.2
ARG TARGETPLATFORM

RUN apt-get update -yq && \
Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
.minimum_zig_version = "0.16.0",
.dependencies = .{
.v8 = .{
.url = "https://github.com/lightpanda-io/zig-v8-fork/archive/d2f997de95dd35174969e38599d98be50c057d85.tar.gz",
.hash = "v8-0.0.0-xddH6zTvAgB67DOl86uWsVwNpK8VXaEOYzu8fkl9glNe",
.url = "https://github.com/lightpanda-io/zig-v8-fork/archive/78b6c77d5f6f040a575539203e6f3fad42453890.tar.gz",
.hash = "v8-0.0.0-xddH6xHyAgDVbf39iQaZfmzZCdNi7m3iTqOKbKz74Ggx",
},
// .v8 = .{ .path = "../zig-v8-fork" },
.brotli = .{
Expand Down
9 changes: 9 additions & 0 deletions src/browser/js/Local.zig
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,12 @@ fn jsValueToTypedArray(comptime T: type, js_val: js.Value) !?[]T {
return ptr[0..num_elements];
}
},
f16 => {
if (js_val.isFloat16Array()) {
const ptr = @as([*]f16, @ptrCast(@alignCast(base)));
return ptr[0..num_elements];
}
},
f32 => {
if (js_val.isFloat32Array()) {
const ptr = @as([*]f32, @ptrCast(@alignCast(base)));
Expand Down Expand Up @@ -1071,6 +1077,9 @@ fn probeJsValueToZig(self: *const Local, comptime T: type, js_val: js.Value) !Pr
i64 => if (js_val.isBigInt64Array()) {
return .{ .ok = {} };
},
f16 => if (js_val.isFloat16Array()) {
return .{ .ok = {} };
},
f32 => if (js_val.isFloat32Array()) {
return .{ .ok = {} };
},
Expand Down
4 changes: 4 additions & 0 deletions src/browser/js/Value.zig
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ pub fn isBigInt64Array(self: Value) bool {
return v8.v8__Value__IsBigInt64Array(self.handle);
}

pub fn isFloat16Array(self: Value) bool {
return v8.v8__Value__IsFloat16Array(self.handle);
}

pub fn isFloat32Array(self: Value) bool {
return v8.v8__Value__IsFloat32Array(self.handle);
}
Expand Down
Loading