Various cranelift interpreter improvements (#6176)
* Remove the validate_address State trait method It isn't used anywhere * Expose the inner Function of a Frame This is necessary to create your own interpreter that reuses most of cranelift-interpreter. For example to use a different State implementation. * Support the symbol_value and tls_value instructions in the interpreter
This commit is contained in:
@@ -563,15 +563,13 @@ where
|
||||
Opcode::DynamicStackAddr => unimplemented!("DynamicStackSlot"),
|
||||
Opcode::DynamicStackLoad => unimplemented!("DynamicStackLoad"),
|
||||
Opcode::DynamicStackStore => unimplemented!("DynamicStackStore"),
|
||||
Opcode::GlobalValue => {
|
||||
Opcode::GlobalValue | Opcode::SymbolValue | Opcode::TlsValue => {
|
||||
if let InstructionData::UnaryGlobalValue { global_value, .. } = inst {
|
||||
assign_or_memtrap(state.resolve_global_value(global_value))
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
Opcode::SymbolValue => unimplemented!("SymbolValue"),
|
||||
Opcode::TlsValue => unimplemented!("TlsValue"),
|
||||
Opcode::GetPinnedReg => assign(state.get_pinned_reg()),
|
||||
Opcode::SetPinnedReg => {
|
||||
let arg0 = arg(0)?;
|
||||
|
||||
Reference in New Issue
Block a user