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

Feature/eip 145 #1167

Merged
merged 6 commits into from
Aug 24, 2018
Merged

Feature/eip 145 #1167

merged 6 commits into from
Aug 24, 2018

Conversation

zilm13
Copy link
Collaborator

@zilm13 zilm13 commented Aug 23, 2018

@mkalinin please, take a look!
Also I'd separate VMTest to several smaller tests, what do you think?

@zilm13 zilm13 requested a review from mkalinin August 23, 2018 15:57
@zilm13 zilm13 mentioned this pull request Aug 23, 2018
5 tasks
@zilm13
Copy link
Collaborator Author

zilm13 commented Aug 23, 2018

Oops, VMTest is running with FrontierConfig. I'll fix it.

@coveralls
Copy link

coveralls commented Aug 23, 2018

Coverage Status

Coverage decreased (-0.01%) to 56.232% when pulling bd85e1d on feature/eip-145 into 82d96c1 on develop.

Copy link
Contributor

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you on breaking down VMTest into several test files. We can divide them by opcode semantics

* @return this << arg
*/
public DataWord shiftLeft(DataWord arg) {
BigInteger result = value().shiftLeft(arg.value().intValue());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use intValueSafe() here to avoid undesirable overflow

DataWord word1 = program.stackPop();
DataWord word2 = program.stackPop();
final DataWord result;
if (word1.value().compareTo(BigInteger.valueOf(256)) < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and following checks (in other similar instructions) is better to move to DataWord class cause they also make sense for DataWord itself

@mkalinin mkalinin merged commit 472797a into develop Aug 24, 2018
@zilm13 zilm13 deleted the feature/eip-145 branch September 20, 2018 09:11
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

Successfully merging this pull request may close these issues.

3 participants