-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
Oops, VMTest is running with FrontierConfig. I'll fix it. |
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.
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()); |
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.
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) { |
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.
This and following checks (in other similar instructions) is better to move to DataWord
class cause they also make sense for DataWord
itself
@mkalinin please, take a look!
Also I'd separate VMTest to several smaller tests, what do you think?