make @memcpy and @memmove share panic handlers

This commit is contained in:
Andrew Kelley
2025-04-27 12:17:59 -07:00
parent fc55c1b7a1
commit 7bd3207921
12 changed files with 58 additions and 82 deletions

View File

@@ -37,9 +37,10 @@ pub const panic = struct {
pub const shiftRhsTooBig = no_panic.shiftRhsTooBig;
pub const invalidEnumValue = no_panic.invalidEnumValue;
pub const forLenMismatch = no_panic.forLenMismatch;
pub const memcpyLenMismatch = no_panic.memcpyLenMismatch;
/// Delete after next zig1.wasm update
pub const memcpyLenMismatch = copyLenMismatch;
pub const copyLenMismatch = no_panic.copyLenMismatch;
pub const memcpyAlias = no_panic.memcpyAlias;
pub const memmoveLenMismatch = no_panic.memmoveLenMismatch;
pub const noreturnReturned = no_panic.noreturnReturned;
};
fn myPanic(msg: []const u8, _: ?usize) noreturn {
@@ -85,9 +86,10 @@ pub const panic = struct {
pub const shiftRhsTooBig = no_panic.shiftRhsTooBig;
pub const invalidEnumValue = no_panic.invalidEnumValue;
pub const forLenMismatch = no_panic.forLenMismatch;
pub const memcpyLenMismatch = no_panic.memcpyLenMismatch;
/// Delete after next zig1.wasm update
pub const memcpyLenMismatch = copyLenMismatch;
pub const copyLenMismatch = no_panic.copyLenMismatch;
pub const memcpyAlias = no_panic.memcpyAlias;
pub const memmoveLenMismatch = no_panic.memmoveLenMismatch;
pub const noreturnReturned = no_panic.noreturnReturned;
};
fn myPanic(msg: []const u8, _: ?usize) noreturn {
@@ -133,9 +135,10 @@ pub const panic = struct {
pub const shiftRhsTooBig = no_panic.shiftRhsTooBig;
pub const invalidEnumValue = no_panic.invalidEnumValue;
pub const forLenMismatch = no_panic.forLenMismatch;
pub const memcpyLenMismatch = no_panic.memcpyLenMismatch;
/// Delete after next zig1.wasm update
pub const memcpyLenMismatch = copyLenMismatch;
pub const copyLenMismatch = no_panic.copyLenMismatch;
pub const memcpyAlias = no_panic.memcpyAlias;
pub const memmoveLenMismatch = no_panic.memmoveLenMismatch;
pub const noreturnReturned = no_panic.noreturnReturned;
};
fn myPanicNew(msg: []const u8, _: ?usize) noreturn {