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

chore: remove callactor opcode from the test framework #1060

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions actors/evm/tests/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ pub fn new_contract(name: &str, init: &str, body: &str) -> Result<Vec<u8>, etk_a
// the contract code
let mut body_code = Vec::new();
let mut ingest_body = Ingest::new(&mut body_code);
let body = with_fevm_extensions(body);
let body_with_prelude = PRELUDE.to_owned() + &body;
let body_with_prelude = PRELUDE.to_owned() + body;
ingest_body.ingest(name, body_with_prelude.as_str())?;
// the initialization code
let mut init_code = Vec::new();
Expand Down Expand Up @@ -92,17 +91,3 @@ pub fn new_contract(name: &str, init: &str, body: &str) -> Result<Vec<u8>, etk_a
contract_code.append(&mut body_code);
Ok(contract_code)
}

// this is a hack to support mnemonics for the FEVM extension opcodes
// it is really ugly, but the etk assmebler doesn't currently support any way to
// directly embed (otherwise invalid) asm instructions in the stream... sigh.
// Ideally we would just do them as macros like
// %macro methodnum()
// 0xb1
// %end
// Note that to add insult to injury, macros cannot %include_hex... double sigh.
// So f*ck it, we'll just hack this until there is support.
// See also https://github.com/quilt/etk/issues/110
fn with_fevm_extensions(body: &str) -> String {
body.to_owned().replace("@callactor", "%include_hex(\"tests/opcodes/callactor.hex\")")
}
1 change: 0 additions & 1 deletion actors/evm/tests/opcodes/callactor.hex

This file was deleted.