Skip to content

Commit

Permalink
GH-18 Always enable TRACE support. Add extra stack checks when
Browse files Browse the repository at this point in the history
compiled with debugging.
  • Loading branch information
SirWumpus committed Aug 28, 2024
1 parent e78e426 commit 2f6d3b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/post4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2202,13 +2202,15 @@ _to_rs: P4STACKISEMPTY(ctx, &ctx->ds, P4_THROW_DS_UNDER);
w = P4_POP(ctx->ds);
P4STACKISFULL(ctx, &ctx->rs, P4_THROW_RS_OVER);
P4_PUSH(ctx->rs, w);
P4STACKGUARDS(ctx);
NEXT;

// (R: x -- )
_from_rs: P4STACKISEMPTY(ctx, &ctx->rs, P4_THROW_RS_UNDER);
w = P4_POP(ctx->rs);
P4STACKISFULL(ctx, &ctx->ds, P4_THROW_DS_OVER);
P4_PUSH(ctx->ds, w);
P4STACKGUARDS(ctx);
NEXT;

/*
Expand Down Expand Up @@ -2800,13 +2802,15 @@ _fs_to_rs: P4STACKISEMPTY(ctx, &ctx->ds,P4_THROW_FS_UNDER);
w = P4_POP(ctx->P4_FLOAT_STACK);
P4STACKISFULL(ctx, &ctx->rs, P4_THROW_RS_OVER);
P4_PUSH(ctx->rs, w);
P4STACKGUARDS(ctx);
NEXT;

// (R: x -- )
_rs_to_fs: P4STACKISEMPTY(ctx, &ctx->rs, P4_THROW_RS_UNDER);
w = P4_POP(ctx->rs);
P4STACKISFULL(ctx, &ctx->fs, P4_THROW_FS_OVER);
P4_PUSH(ctx->P4_FLOAT_STACK, w);
P4STACKGUARDS(ctx);
NEXT;
{
// ( caddr u -- F:f bool )
Expand Down

0 comments on commit 2f6d3b4

Please sign in to comment.