pr 59.2
This commit is contained in:
@@ -160,6 +160,8 @@ impl VirtualMachine {
|
||||
// Try to resolve symbol name via ProgramImage exports
|
||||
if let Some(&func_idx) = program.exports.get(entrypoint) {
|
||||
program.functions[func_idx as usize].code_offset as usize
|
||||
} else if let Some(&func_idx) = program.exports.get(&format!("src/main/modules:{}", entrypoint)) {
|
||||
program.functions[func_idx as usize].code_offset as usize
|
||||
} else {
|
||||
return Err(VmInitError::EntrypointNotFound);
|
||||
}
|
||||
@@ -183,6 +185,8 @@ impl VirtualMachine {
|
||||
(addr, idx)
|
||||
} else if let Some(&func_idx) = self.program.exports.get(entrypoint) {
|
||||
(self.program.functions[func_idx as usize].code_offset as usize, func_idx as usize)
|
||||
} else if let Some(&func_idx) = self.program.exports.get(&format!("src/main/modules:{}", entrypoint)) {
|
||||
(self.program.functions[func_idx as usize].code_offset as usize, func_idx as usize)
|
||||
} else {
|
||||
(0, 0)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user