Skip to content

Commit

Permalink
Adds case staements for lowlevel to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewJohnHeath committed Aug 30, 2024
1 parent 95b80f4 commit a5bc19c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions crates/compiler/gen_llvm/src/llvm/lowlevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,17 @@ pub(crate) fn run_low_level<'a, 'ctx>(

call_bitcode_fn(env, &[], bitcode::UTILS_DICT_PSEUDO_SEED)
}
CryptEmptySha256 => {
call_bitcode_fn(env, &[], bitcode::CRYPT_EMPTY_SHA256)
}
CryptAddBytes => {
arguments!(sha, data);
call_bitcode_fn(env, &[sha, data], bitcode::CRYPT_ADD_BYTES)
}
CryptDigest => {
arguments!(sha);
call_bitcode_fn(env, &[sha], bitcode::CRYPT_DIGEST)
}

ListIncref | ListDecref | SetJmp | LongJmp | SetLongJmpBuffer => {
unreachable!("only inserted in dev backend codegen")
Expand Down
8 changes: 4 additions & 4 deletions crates/compiler/module/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1688,10 +1688,10 @@ define_builtins! {
15 CRYPT: "Crypt" =>{
0 CRYPT_SHA256: "Sha256" exposed_type=true
1 CRYPT_EMPTY_STRUCT: "EmptyStruct" exposed_type=true
3 CRYPT_DIGEST256: "Digest256" exposed_type=true
4 CRYPT_EMPTY_SHA256: "emptySha256"
5 CRYPT_ADD_BYTES: "addBytes"
6 CRYPT_DIGEST: "digest"
2 CRYPT_DIGEST256: "Digest256" exposed_type=true
3 CRYPT_EMPTY_SHA256: "emptySha256"
4 CRYPT_ADD_BYTES: "addBytes"
5 CRYPT_DIGEST: "digest"
}

num_modules: 17 // Keep this count up to date by hand! (TODO: see the mut_map! macro for how we could determine this count correctly in the macro)
Expand Down

0 comments on commit a5bc19c

Please sign in to comment.