Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Conversation

adria0
Copy link
Contributor

@adria0 adria0 commented Aug 4, 2020

Backport of 234a287 + 58fde98

@adria0 adria0 marked this pull request as ready for review August 5, 2020 07:24
@adria0 adria0 requested review from rakita and vorot93 August 5, 2020 07:24
Comment on lines +435 to +437
if self.valid_subroutine_destinations.is_none() {
self.valid_subroutine_destinations = Some(self.cache.jump_and_sub_destinations(&self.params.code_hash, &self.reader.code).1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if self.valid_subroutine_destinations.is_none() {
self.valid_subroutine_destinations = Some(self.cache.jump_and_sub_destinations(&self.params.code_hash, &self.reader.code).1);
}
self.valid_subroutine_destinations.get_or_insert_with(|| self.cache.jump_and_sub_destinations(&self.params.code_hash, &self.reader.code).1);

Comment on lines -447 to +483
if (instruction == instructions::DELEGATECALL && !schedule.have_delegate_call) ||
(instruction == instructions::CREATE2 && !schedule.have_create2) ||
(instruction == instructions::STATICCALL && !schedule.have_static_call) ||
((instruction == instructions::RETURNDATACOPY || instruction == instructions::RETURNDATASIZE) && !schedule.have_return_data) ||
(instruction == instructions::REVERT && !schedule.have_revert) ||
((instruction == instructions::SHL || instruction == instructions::SHR || instruction == instructions::SAR) && !schedule.have_bitwise_shifting) ||
(instruction == instructions::EXTCODEHASH && !schedule.have_extcodehash) ||
(instruction == instructions::CHAINID && !schedule.have_chain_id) ||
(instruction == instructions::SELFBALANCE && !schedule.have_selfbalance)
use instructions::*;
if (instruction == DELEGATECALL && !schedule.have_delegate_call) ||
(instruction == CREATE2 && !schedule.have_create2) ||
(instruction == STATICCALL && !schedule.have_static_call) ||
((instruction == RETURNDATACOPY || instruction == RETURNDATASIZE) && !schedule.have_return_data) ||
(instruction == REVERT && !schedule.have_revert) ||
((instruction == SHL || instruction == SHR || instruction == SAR) && !schedule.have_bitwise_shifting) ||
(instruction == EXTCODEHASH && !schedule.have_extcodehash) ||
(instruction == CHAINID && !schedule.have_chain_id) ||
(instruction == SELFBALANCE && !schedule.have_selfbalance) ||
((instruction == BEGINSUB || instruction == JUMPSUB || instruction == RETURNSUB) && !schedule.have_subs)
Copy link
Contributor

Choose a reason for hiding this comment

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

One reason to have a single big reformatting/restyling commit before everything else.

Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
@adria0 adria0 merged commit 635ab0d into master Aug 6, 2020
@adria0 adria0 deleted the adria0/eip2315_2 branch August 6, 2020 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants