Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change unary operations to operate on OperandStack::top and not pop/push #463

Closed
axic opened this issue Aug 7, 2020 · 7 comments
Closed

Comments

@axic
Copy link
Member

axic commented Aug 7, 2020

No description provided.

@chfast
Copy link
Collaborator

chfast commented Aug 17, 2020

An alternative, what would be compatible with "unsafe host functions" is to pass pointer to the top stack item.

void unary_op(Value* top)
{
    *top = op(*top);
}

@chfast
Copy link
Collaborator

chfast commented Sep 2, 2020

This is done.

@axic
Copy link
Member Author

axic commented Sep 2, 2020

Which PR?

@axic
Copy link
Member Author

axic commented Sep 2, 2020

Right I see in unary_op.

@axic
Copy link
Member Author

axic commented Sep 2, 2020

Could also do a similar experiment to evmone in binary_op/comparison_op to only pop one and overwrite the other.

@chfast
Copy link
Collaborator

chfast commented Sep 2, 2020

In 998fab6.

Could also do a similar experiment to evmone in binary_op/comparison_op to only pop one and overwrite the other.

This is already done this way.

@axic
Copy link
Member Author

axic commented Sep 2, 2020

Damn, probably had an old code checked out locally when I looked.

@axic axic closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants