Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RL_Do_Commands modification #35

@hostilefork

Description

@hostilefork

I hit some barriers trying to update Do_Commands() in response to some changes, which forced me to stop and look to understand what it did.

Once I understood what it did I quickly looked at how to get rid of it. It's a bad version of DO which claims to be "faster" (though I very much doubt it is would be noticeably so). What it will do is break error reporting, debugging, etc.

R3-View has 2 uses in a switch statement in %host-draw.c:

case CMD_DRAW_PUSH

case CMD_DRAW_SHAPE

Looking at that REBCEC it seems like the only thing that's happening is that Do_Commands() gets called with the block...and it runs but with the commands getting the ctx->envr passed through.

I committed my guess on what would in practice provide the effective same behavior for these cases. It just has a global REBCEC pointer that is pushed when you start RL_Do_Commands and popped before it returns, and the Do_Command dispatcher passes on whatever the state is:

metaeducation@41ba66d

I would think it should be the same for reasonable input... because if it suddenly starts evaluating arguments that means that it was passing FUNCTION!s to the commands before--seemingly unlikely (?) It also could be a problem if you start calling other extensions and they're not able to interpret the context. But that also should not happen for existing code since the existing Do_Commands() calls were all are expecting to get the same context anyway.

If you run into problems with that let me know...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions