runtime types

This commit is contained in:
Michael Sippel 2024-10-04 02:15:17 +02:00
parent 8fd59f04ee
commit 1a152670d3
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -6,7 +6,6 @@ use {
pub fn init_runtime(linker: &mut Linker) -> Arc<RwLock<Scope>> {
let symbols = Scope::new();
let typectx = symbols.read().unwrap().typectx.clone();
/* Duplicate the top item on the stack,
* and whatever type this word has is preserved
@ -31,14 +30,14 @@ pub fn init_runtime(linker: &mut Linker) -> Arc<RwLock<Scope>> {
symbols.write().unwrap().declare_proc_parse(
"emit",
vec![],
vec!["Char~Ascii~machine.Word"],
vec!["Char~Unicode~_2^32~_2^64~machine.UInt64~machine.Word"],
vec![],
);
symbols.write().unwrap().declare_proc_parse(
"accept",
vec![],
vec![],
vec!["Char~Ascii~machine.Word"],
vec!["Char~Unicode~_2^32~_2^64~machine.UInt64~machine.Word"],
);
linker.add_procedure("dup", tisc::Assembler::new().inst(tisc::VM_Instruction::Dup).build());