Skip to content

Commit

Permalink
Merge pull request #6 from AntChainOpenLabs/chore-comments-translation
Browse files Browse the repository at this point in the history
chore: translate comments
  • Loading branch information
i-zhen authored Dec 12, 2023
2 parents d7b6285 + 0423888 commit cd86cd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions LEGAL.md

This file was deleted.

6 changes: 3 additions & 3 deletions ir_cli/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,17 @@ impl Externals for MockRuntime {
};
self.events.push(event.clone());

// 如果 log name MyCoverage, 则导出log内容
// If the log name is MyCoverage, export the log content.
let my_coverage_event_name = "MyCoverage";
let first_topic = event.topics[0].clone();

// 第一个字节是event字符串长度
// The first byte is the length of the event string.
if String::from_utf8(first_topic[1..].to_vec()).unwrap() == *my_coverage_event_name
{
let file_name = "out.mygcna";
let mut file =
File::create(file_name).expect("mygcna coverage file create failed");
// desc_o 是datastream编码后的长度,头部需要读取leb128长度
// `desc_o` is the length encoded by the data stream, and the header needs to read the length of leb128.
let coverage_file_bytes = match nano_leb128::SLEB128::read_from(&desc_o) {
Ok((_, len_bytes_len)) => &desc_o[len_bytes_len..],
Err(_) => unreachable!(
Expand Down

0 comments on commit cd86cd8

Please sign in to comment.