-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add pop operation #141
Add pop operation #141
Conversation
1367be6
to
4b9a220
Compare
if stack.len() == 0 { | ||
return ErrStackEmpty | ||
} | ||
_ = stack.pop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if pop retuns err, why don't you return err?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean stack.pop() throws an error? stack.pop() does not return an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I misunderstood :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :-)
Is it really fine just removing item?? @hea9549 @boohyunsik @zeroFruit @leesd556 @junbeomlee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hihiboss
I think it should be discussed especially with the compiler!
-
Is it ok just pop without error handling?
-> EVM don't handle that error. why? -
Is it ok just removing item ?
-> EVM usesintPool
, a temporary stack storage. why?
I'll register it to issue!
@leesd556 Ok. Thank you! |
It is used to reuse objects without creating new ones. |
4b9a220
to
acec790
Compare
resolved: #125
details: implement pop opcode
I made a pop of vm. But I don't know if this is necessary.