mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects
This commit is contained in:
commit
92cc120c7f
150 changed files with 3480 additions and 2605 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -3234,6 +3234,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"indoc",
|
||||
"lazy_static",
|
||||
"roc_build",
|
||||
"roc_cli",
|
||||
"roc_repl_cli",
|
||||
"roc_test_utils",
|
||||
|
@ -3922,6 +3923,7 @@ dependencies = [
|
|||
"rustyline",
|
||||
"rustyline-derive",
|
||||
"target-lexicon",
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5167,9 +5169,9 @@ checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
|
|||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.9.0"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
|
||||
checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
|
|
|
@ -352,7 +352,7 @@ pub fn expr_to_expr2<'a>(
|
|||
|
||||
for (node_id, branch) in can_branches.iter_node_ids().zip(branches.iter()) {
|
||||
let (can_when_branch, branch_references) =
|
||||
canonicalize_when_branch(env, scope, *branch, &mut output);
|
||||
canonicalize_when_branch(env, scope, branch, &mut output);
|
||||
|
||||
output.references.union_mut(branch_references);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ use roc_module::ident::Lowercase;
|
|||
use roc_module::symbol::Symbol;
|
||||
use roc_types::subs::Variable;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Default)]
|
||||
pub struct IntroducedVariables {
|
||||
// Rigids must be unique within a type annotation.
|
||||
// E.g. in `identity : a -> a`, there should only be one
|
||||
|
|
|
@ -178,14 +178,7 @@ fn main() -> io::Result<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
Some((CMD_REPL, _)) => {
|
||||
{
|
||||
roc_repl_cli::main()?;
|
||||
|
||||
// Exit 0 if the repl exited normally
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
Some((CMD_REPL, _)) => Ok(roc_repl_cli::main()),
|
||||
Some((CMD_EDIT, matches)) => {
|
||||
match matches
|
||||
.values_of_os(DIRECTORY_OR_FILES)
|
||||
|
|
|
@ -301,8 +301,8 @@ mod cli_run {
|
|||
test_many_cli_commands: bool, // buildOnly, buildAndRun and buildAndRunIfNoErrors
|
||||
) {
|
||||
let file_name = file_path_from_root(dir_name, roc_filename);
|
||||
let mut roc_app_args: Vec<String> = Vec::new();
|
||||
|
||||
let mut roc_app_args: Vec<String> = vec![];
|
||||
for arg in args {
|
||||
match arg {
|
||||
Arg::ExamplePath(file) => {
|
||||
|
@ -320,10 +320,10 @@ mod cli_run {
|
|||
}
|
||||
|
||||
// workaround for surgical linker issue, see PR #3990
|
||||
let mut custom_flags: Vec<&str> = vec![];
|
||||
let mut custom_flags: Vec<&str> = Vec::new();
|
||||
|
||||
match executable_filename {
|
||||
"form" | "hello-gui" | "breakout" | "ruby" => {
|
||||
"form" | "hello-gui" | "breakout" | "libhello" => {
|
||||
// Since these require things the build system often doesn't have
|
||||
// (e.g. GUIs open a window, Ruby needs ruby installed, WASM needs a browser)
|
||||
// we do `roc build` on them but don't run them.
|
||||
|
@ -1154,7 +1154,7 @@ fn run_with_wasmer(wasm_path: &std::path::Path, stdin: &[&str]) -> String {
|
|||
// .unwrap();
|
||||
|
||||
let store = Store::default();
|
||||
let module = Module::from_file(&store, &wasm_path).unwrap();
|
||||
let module = Module::from_file(&store, wasm_path).unwrap();
|
||||
|
||||
let mut fake_stdin = wasmer_wasi::Pipe::new();
|
||||
let fake_stdout = wasmer_wasi::Pipe::new();
|
||||
|
|
|
@ -124,7 +124,7 @@ pub fn build_zig_host_native(
|
|||
bitcode::get_builtins_host_obj_path()
|
||||
};
|
||||
|
||||
zig_cmd.args(&[
|
||||
zig_cmd.args([
|
||||
"build-exe",
|
||||
"-fPIE",
|
||||
"-rdynamic", // make sure roc_alloc and friends are exposed
|
||||
|
@ -132,10 +132,10 @@ pub fn build_zig_host_native(
|
|||
&builtins_obj,
|
||||
]);
|
||||
} else {
|
||||
zig_cmd.args(&["build-obj", "-fPIC"]);
|
||||
zig_cmd.args(["build-obj", "-fPIC"]);
|
||||
}
|
||||
|
||||
zig_cmd.args(&[
|
||||
zig_cmd.args([
|
||||
zig_host_src,
|
||||
&format!("-femit-bin={}", emit_bin),
|
||||
"--pkg-begin",
|
||||
|
@ -154,7 +154,7 @@ pub fn build_zig_host_native(
|
|||
// when we use zig 0.9. It looks like zig 0.10 is going to fix
|
||||
// this problem for us, so this is a temporary workaround
|
||||
if !target.contains("windows") {
|
||||
zig_cmd.args(&[
|
||||
zig_cmd.args([
|
||||
// include the zig runtime
|
||||
"-fcompiler-rt",
|
||||
]);
|
||||
|
@ -162,13 +162,13 @@ pub fn build_zig_host_native(
|
|||
|
||||
// valgrind does not yet support avx512 instructions, see #1963.
|
||||
if env::var("NO_AVX512").is_ok() {
|
||||
zig_cmd.args(&["-mcpu", "x86_64"]);
|
||||
zig_cmd.args(["-mcpu", "x86_64"]);
|
||||
}
|
||||
|
||||
if matches!(opt_level, OptLevel::Optimize) {
|
||||
zig_cmd.args(&["-O", "ReleaseSafe"]);
|
||||
zig_cmd.args(["-O", "ReleaseSafe"]);
|
||||
} else if matches!(opt_level, OptLevel::Size) {
|
||||
zig_cmd.args(&["-O", "ReleaseSmall"]);
|
||||
zig_cmd.args(["-O", "ReleaseSmall"]);
|
||||
}
|
||||
|
||||
zig_cmd
|
||||
|
@ -378,9 +378,9 @@ pub fn build_zig_host_wasm32(
|
|||
.args(args);
|
||||
|
||||
if matches!(opt_level, OptLevel::Optimize) {
|
||||
zig_cmd.args(&["-O", "ReleaseSafe"]);
|
||||
zig_cmd.args(["-O", "ReleaseSafe"]);
|
||||
} else if matches!(opt_level, OptLevel::Size) {
|
||||
zig_cmd.args(&["-O", "ReleaseSmall"]);
|
||||
zig_cmd.args(["-O", "ReleaseSmall"]);
|
||||
}
|
||||
|
||||
zig_cmd
|
||||
|
@ -400,11 +400,11 @@ pub fn build_c_host_native(
|
|||
let mut clang_cmd = clang();
|
||||
clang_cmd
|
||||
.env_clear()
|
||||
.env("PATH", &env_path)
|
||||
.env("CPATH", &env_cpath)
|
||||
.env("HOME", &env_home)
|
||||
.env("PATH", env_path)
|
||||
.env("CPATH", env_cpath)
|
||||
.env("HOME", env_home)
|
||||
.args(sources)
|
||||
.args(&["-o", dest]);
|
||||
.args(["-o", dest]);
|
||||
if let Some(shared_lib_path) = shared_lib_path {
|
||||
match target.operating_system {
|
||||
OperatingSystem::Windows => {
|
||||
|
@ -425,7 +425,7 @@ pub fn build_c_host_native(
|
|||
);
|
||||
}
|
||||
_ => {
|
||||
clang_cmd.args(&[
|
||||
clang_cmd.args([
|
||||
shared_lib_path.to_str().unwrap(),
|
||||
// This line is commented out because
|
||||
// @bhansconnect: With the addition of Str.graphemes, always
|
||||
|
@ -444,7 +444,7 @@ pub fn build_c_host_native(
|
|||
}
|
||||
}
|
||||
} else {
|
||||
clang_cmd.args(&["-fPIC", "-c"]);
|
||||
clang_cmd.args(["-fPIC", "-c"]);
|
||||
}
|
||||
if matches!(opt_level, OptLevel::Optimize) {
|
||||
clang_cmd.arg("-O3");
|
||||
|
@ -473,8 +473,8 @@ pub fn build_swift_host_native(
|
|||
let mut command = Command::new("arch");
|
||||
command
|
||||
.env_clear()
|
||||
.env("PATH", &env_path)
|
||||
.env("HOME", &env_home);
|
||||
.env("PATH", env_path)
|
||||
.env("HOME", env_home);
|
||||
|
||||
match arch {
|
||||
Architecture::Aarch64(_) => command.arg("-arm64"),
|
||||
|
@ -487,10 +487,10 @@ pub fn build_swift_host_native(
|
|||
.args(sources)
|
||||
.arg("-emit-object")
|
||||
.arg("-parse-as-library")
|
||||
.args(&["-o", dest]);
|
||||
.args(["-o", dest]);
|
||||
|
||||
if let Some(objc_header) = objc_header_path {
|
||||
command.args(&["-import-objc-header", objc_header]);
|
||||
command.args(["-import-objc-header", objc_header]);
|
||||
}
|
||||
|
||||
if matches!(opt_level, OptLevel::Optimize) {
|
||||
|
@ -641,7 +641,7 @@ pub fn rebuild_host(
|
|||
|
||||
let source_file = if shared_lib_path.is_some() {
|
||||
cargo_cmd.env("RUSTFLAGS", "-C link-dead-code");
|
||||
cargo_cmd.args(&["--bin", "host"]);
|
||||
cargo_cmd.args(["--bin", "host"]);
|
||||
"src/main.rs"
|
||||
} else {
|
||||
cargo_cmd.arg("--lib");
|
||||
|
@ -673,7 +673,7 @@ pub fn rebuild_host(
|
|||
|
||||
let mut ld_cmd = Command::new("ld");
|
||||
|
||||
ld_cmd.env_clear().env("PATH", &env_path).args(&[
|
||||
ld_cmd.env_clear().env("PATH", &env_path).args([
|
||||
"-r",
|
||||
"-L",
|
||||
cargo_out_dir.to_str().unwrap(),
|
||||
|
@ -693,7 +693,7 @@ pub fn rebuild_host(
|
|||
} else if rust_host_src.exists() {
|
||||
// Compile and link host.rs, if it exists
|
||||
let mut rustc_cmd = Command::new("rustc");
|
||||
rustc_cmd.args(&[
|
||||
rustc_cmd.args([
|
||||
rust_host_src.to_str().unwrap(),
|
||||
"-o",
|
||||
rust_host_dest.to_str().unwrap(),
|
||||
|
@ -739,7 +739,7 @@ pub fn rebuild_host(
|
|||
|
||||
let mut ld_cmd = Command::new("ld");
|
||||
|
||||
ld_cmd.env_clear().env("PATH", &env_path).args(&[
|
||||
ld_cmd.env_clear().env("PATH", &env_path).args([
|
||||
"-r",
|
||||
c_host_dest.to_str().unwrap(),
|
||||
rust_host_dest.to_str().unwrap(),
|
||||
|
@ -856,9 +856,9 @@ fn link_linux(
|
|||
if let Architecture::X86_32(_) = target.architecture {
|
||||
return Ok((
|
||||
zig()
|
||||
.args(&["build-exe"])
|
||||
.args(["build-exe"])
|
||||
.args(input_paths)
|
||||
.args(&[
|
||||
.args([
|
||||
"-target",
|
||||
"i386-linux-musl",
|
||||
"-lc",
|
||||
|
@ -1011,7 +1011,7 @@ fn link_linux(
|
|||
.filter(|&(ref k, _)| k.starts_with("NIX_"))
|
||||
.collect::<HashMap<String, String>>(),
|
||||
)
|
||||
.args(&[
|
||||
.args([
|
||||
"--gc-sections",
|
||||
"--eh-frame-hdr",
|
||||
"-A",
|
||||
|
@ -1021,11 +1021,11 @@ fn link_linux(
|
|||
&*crtn_path.to_string_lossy(),
|
||||
])
|
||||
.args(&base_args)
|
||||
.args(&["-dynamic-linker", ld_linux])
|
||||
.args(["-dynamic-linker", ld_linux])
|
||||
.args(input_paths)
|
||||
// ld.lld requires this argument, and does not accept --arch
|
||||
// .args(&["-L/usr/lib/x86_64-linux-gnu"])
|
||||
.args(&[
|
||||
.args([
|
||||
// Libraries - see https://github.com/roc-lang/roc/pull/554#discussion_r496365925
|
||||
// for discussion and further references
|
||||
"-lc",
|
||||
|
@ -1076,7 +1076,7 @@ fn link_macos(
|
|||
// The `-l` flags should go after the `.o` arguments
|
||||
// Don't allow LD_ env vars to affect this
|
||||
.env_clear()
|
||||
.args(&[
|
||||
.args([
|
||||
// NOTE: we don't do --gc-sections on macOS because the default
|
||||
// macOS linker doesn't support it, but it's a performance
|
||||
// optimization, so if we ever switch to a different linker,
|
||||
|
@ -1108,7 +1108,7 @@ fn link_macos(
|
|||
ld_command.arg(roc_link_flag);
|
||||
}
|
||||
|
||||
ld_command.args(&[
|
||||
ld_command.args([
|
||||
// Libraries - see https://github.com/roc-lang/roc/pull/554#discussion_r496392274
|
||||
// for discussion and further references
|
||||
"-lSystem",
|
||||
|
@ -1148,7 +1148,7 @@ fn link_macos(
|
|||
Architecture::Aarch64(_) => {
|
||||
ld_child.wait()?;
|
||||
let codesign_child = Command::new("codesign")
|
||||
.args(&["-s", "-", output_path.to_str().unwrap()])
|
||||
.args(["-s", "-", output_path.to_str().unwrap()])
|
||||
.spawn()?;
|
||||
|
||||
Ok((codesign_child, output_path))
|
||||
|
@ -1187,7 +1187,7 @@ fn link_wasm32(
|
|||
let child = zig()
|
||||
// .env_clear()
|
||||
// .env("PATH", &env_path)
|
||||
.args(&["build-exe"])
|
||||
.args(["build-exe"])
|
||||
.args(input_paths)
|
||||
.args([
|
||||
// include wasi libc
|
||||
|
@ -1222,7 +1222,7 @@ fn link_windows(
|
|||
match link_type {
|
||||
LinkType::Dylib => {
|
||||
let child = zig()
|
||||
.args(&["build-lib"])
|
||||
.args(["build-lib"])
|
||||
.args(input_paths)
|
||||
.args([
|
||||
"-lc",
|
||||
|
@ -1244,7 +1244,7 @@ fn link_windows(
|
|||
}
|
||||
LinkType::Executable => {
|
||||
let child = zig()
|
||||
.args(&["build-exe"])
|
||||
.args(["build-exe"])
|
||||
.args(input_paths)
|
||||
.args([
|
||||
"-target",
|
||||
|
|
|
@ -370,7 +370,7 @@ fn gen_from_mono_module_llvm<'a>(
|
|||
|
||||
// run the debugir https://github.com/vaivaswatha/debugir tool
|
||||
match Command::new("debugir")
|
||||
.args(&["-instnamer", app_ll_file.to_str().unwrap()])
|
||||
.args(["-instnamer", app_ll_file.to_str().unwrap()])
|
||||
.output()
|
||||
{
|
||||
Ok(_) => {}
|
||||
|
@ -392,7 +392,7 @@ fn gen_from_mono_module_llvm<'a>(
|
|||
| Architecture::Aarch64(_)
|
||||
| Architecture::Wasm32 => {
|
||||
let ll_to_bc = Command::new("llvm-as")
|
||||
.args(&[
|
||||
.args([
|
||||
app_ll_dbg_file.to_str().unwrap(),
|
||||
"-o",
|
||||
app_bc_file.to_str().unwrap(),
|
||||
|
|
|
@ -90,7 +90,7 @@ fn generate_object_file(bitcode_path: &Path, zig_object: &str, object_file_name:
|
|||
let mut zig_cmd = zig();
|
||||
|
||||
zig_cmd
|
||||
.current_dir(&bitcode_path)
|
||||
.current_dir(bitcode_path)
|
||||
.args(["build", zig_object, "-Drelease=true"]);
|
||||
|
||||
run_command(zig_cmd, 0);
|
||||
|
@ -126,7 +126,7 @@ fn generate_bc_file(bitcode_path: &Path, zig_object: &str, file_name: &str) {
|
|||
let mut zig_cmd = zig();
|
||||
|
||||
zig_cmd
|
||||
.current_dir(&bitcode_path)
|
||||
.current_dir(bitcode_path)
|
||||
.args(["build", zig_object, "-Drelease=true"]);
|
||||
|
||||
run_command(zig_cmd, 0);
|
||||
|
@ -168,7 +168,7 @@ fn copy_zig_builtins_to_target_dir(bitcode_path: &Path) {
|
|||
// recursively copy all the .zig files from this directory, but do *not* recurse into zig-cache/
|
||||
fn cp_unless_zig_cache(src_dir: &Path, target_dir: &Path) -> io::Result<()> {
|
||||
// Make sure the destination directory exists before we try to copy anything into it.
|
||||
std::fs::create_dir_all(&target_dir).unwrap_or_else(|err| {
|
||||
std::fs::create_dir_all(target_dir).unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"Failed to create output library directory for zig bitcode {:?}: {:?}",
|
||||
target_dir, err
|
||||
|
|
|
@ -223,18 +223,18 @@ expect update (single "a" Bool.true) "a" alterValue == empty
|
|||
## Dict.empty
|
||||
## |> Dict.insert 1234 "5678"
|
||||
## |> Dict.contains 1234
|
||||
## |> Bool.isEq Bool.true
|
||||
contains : Dict k v, k -> Bool | k has Eq
|
||||
contains = \@Dict list, needle ->
|
||||
step = \_, Pair key _val ->
|
||||
if key == needle then
|
||||
Break {}
|
||||
else
|
||||
Continue {}
|
||||
List.any list \Pair key _val -> key == needle
|
||||
|
||||
when List.iterate list {} step is
|
||||
Continue _ -> Bool.false
|
||||
Break _ -> Bool.true
|
||||
expect contains empty "a" == Bool.false
|
||||
expect contains (single "a" {}) "a" == Bool.true
|
||||
expect contains (single "b" {}) "a" == Bool.false
|
||||
expect
|
||||
Dict.empty
|
||||
|> Dict.insert 1234 "5678"
|
||||
|> Dict.contains 1234
|
||||
|> Bool.isEq Bool.true
|
||||
|
||||
## Returns a dictionary containing the key and value provided as input.
|
||||
##
|
||||
|
|
|
@ -8,7 +8,6 @@ interface List
|
|||
map,
|
||||
len,
|
||||
withCapacity,
|
||||
iterate,
|
||||
walkBackwards,
|
||||
concat,
|
||||
first,
|
||||
|
|
|
@ -28,7 +28,7 @@ pub struct MemberVariables {
|
|||
|
||||
/// The member and its signature is defined locally, in the module the store is created for.
|
||||
/// We need to instantiate and introduce this during solving.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ResolvedMemberType(Variable);
|
||||
|
||||
/// Member type information that needs to be resolved from imports.
|
||||
|
@ -56,7 +56,7 @@ impl ResolvePhase for Pending {
|
|||
type MemberType = PendingMemberType;
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Resolved;
|
||||
impl ResolvePhase for Resolved {
|
||||
type MemberType = ResolvedMemberType;
|
||||
|
|
|
@ -1821,7 +1821,7 @@ pub(crate) fn sort_can_defs(
|
|||
.strongly_connected_components_subset(group);
|
||||
|
||||
debug_assert!(
|
||||
!group.iter_ones().any(|index| matches!((&defs[index]).as_ref().unwrap().loc_pattern.value, Pattern::AbilityMemberSpecialization{..})),
|
||||
!group.iter_ones().any(|index| matches!(defs[index].as_ref().unwrap().loc_pattern.value, Pattern::AbilityMemberSpecialization{..})),
|
||||
"A specialization is involved in a recursive cycle - this should not be knowable until solving");
|
||||
|
||||
let declaration = if direct_sccs.groups().count() == 1 {
|
||||
|
|
|
@ -65,7 +65,7 @@ impl Output {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Copy)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Copy)]
|
||||
pub enum IntValue {
|
||||
I128([u8; 16]),
|
||||
U128([u8; 16]),
|
||||
|
@ -345,7 +345,7 @@ pub struct ClosureData {
|
|||
///
|
||||
/// We distinguish them from closures so we can have better error messages
|
||||
/// during constraint generation.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct AccessorData {
|
||||
pub name: Symbol,
|
||||
pub function_var: Variable,
|
||||
|
@ -485,7 +485,7 @@ pub struct Field {
|
|||
pub loc_expr: Box<Loc<Expr>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Recursive {
|
||||
NotRecursive = 0,
|
||||
Recursive = 1,
|
||||
|
@ -888,7 +888,7 @@ pub fn canonicalize_expr<'a>(
|
|||
var_store,
|
||||
inner_scope,
|
||||
region,
|
||||
*branch,
|
||||
branch,
|
||||
&mut output,
|
||||
)
|
||||
});
|
||||
|
@ -1493,7 +1493,7 @@ fn canonicalize_fields<'a>(
|
|||
let mut output = Output::default();
|
||||
|
||||
for loc_field in fields.iter() {
|
||||
match canonicalize_field(env, var_store, scope, &loc_field.value, loc_field.region) {
|
||||
match canonicalize_field(env, var_store, scope, &loc_field.value) {
|
||||
Ok((label, field_expr, field_out, field_var)) => {
|
||||
let field = Field {
|
||||
var: field_var,
|
||||
|
@ -1546,7 +1546,6 @@ fn canonicalize_field<'a>(
|
|||
var_store: &mut VarStore,
|
||||
scope: &mut Scope,
|
||||
field: &'a ast::AssignedField<'a, ast::Expr<'a>>,
|
||||
region: Region,
|
||||
) -> Result<(Lowercase, Loc<Expr>, Output, Variable), CanonicalizeFieldProblem> {
|
||||
use roc_parse::ast::AssignedField::*;
|
||||
|
||||
|
@ -1576,7 +1575,7 @@ fn canonicalize_field<'a>(
|
|||
}
|
||||
|
||||
SpaceBefore(sub_field, _) | SpaceAfter(sub_field, _) => {
|
||||
canonicalize_field(env, var_store, scope, sub_field, region)
|
||||
canonicalize_field(env, var_store, scope, sub_field)
|
||||
}
|
||||
|
||||
Malformed(_string) => {
|
||||
|
@ -1652,7 +1651,7 @@ fn canonicalize_var_lookup(
|
|||
}
|
||||
|
||||
/// Currently uses the heuristic of "only inline if it's a builtin"
|
||||
pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) -> Expr {
|
||||
pub fn inline_calls(var_store: &mut VarStore, expr: Expr) -> Expr {
|
||||
use Expr::*;
|
||||
|
||||
match expr {
|
||||
|
@ -1681,7 +1680,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
let mut new_elems = Vec::with_capacity(loc_elems.len());
|
||||
|
||||
for loc_elem in loc_elems {
|
||||
let value = inline_calls(var_store, scope, loc_elem.value);
|
||||
let value = inline_calls(var_store, loc_elem.value);
|
||||
|
||||
new_elems.push(Loc {
|
||||
value,
|
||||
|
@ -1706,20 +1705,20 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
} => {
|
||||
let loc_cond = Box::new(Loc {
|
||||
region: loc_cond.region,
|
||||
value: inline_calls(var_store, scope, loc_cond.value),
|
||||
value: inline_calls(var_store, loc_cond.value),
|
||||
});
|
||||
|
||||
let mut new_branches = Vec::with_capacity(branches.len());
|
||||
|
||||
for branch in branches {
|
||||
let value = Loc {
|
||||
value: inline_calls(var_store, scope, branch.value.value),
|
||||
value: inline_calls(var_store, branch.value.value),
|
||||
region: branch.value.region,
|
||||
};
|
||||
let guard = match branch.guard {
|
||||
Some(loc_expr) => Some(Loc {
|
||||
region: loc_expr.region,
|
||||
value: inline_calls(var_store, scope, loc_expr.value),
|
||||
value: inline_calls(var_store, loc_expr.value),
|
||||
}),
|
||||
None => None,
|
||||
};
|
||||
|
@ -1753,12 +1752,12 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
|
||||
for (loc_cond, loc_expr) in branches {
|
||||
let loc_cond = Loc {
|
||||
value: inline_calls(var_store, scope, loc_cond.value),
|
||||
value: inline_calls(var_store, loc_cond.value),
|
||||
region: loc_cond.region,
|
||||
};
|
||||
|
||||
let loc_expr = Loc {
|
||||
value: inline_calls(var_store, scope, loc_expr.value),
|
||||
value: inline_calls(var_store, loc_expr.value),
|
||||
region: loc_expr.region,
|
||||
};
|
||||
|
||||
|
@ -1767,7 +1766,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
|
||||
let final_else = Box::new(Loc {
|
||||
region: final_else.region,
|
||||
value: inline_calls(var_store, scope, final_else.value),
|
||||
value: inline_calls(var_store, final_else.value),
|
||||
});
|
||||
|
||||
If {
|
||||
|
@ -1785,12 +1784,12 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
} => {
|
||||
let loc_condition = Loc {
|
||||
region: loc_condition.region,
|
||||
value: inline_calls(var_store, scope, loc_condition.value),
|
||||
value: inline_calls(var_store, loc_condition.value),
|
||||
};
|
||||
|
||||
let loc_continuation = Loc {
|
||||
region: loc_continuation.region,
|
||||
value: inline_calls(var_store, scope, loc_continuation.value),
|
||||
value: inline_calls(var_store, loc_continuation.value),
|
||||
};
|
||||
|
||||
Expect {
|
||||
|
@ -1807,12 +1806,12 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
} => {
|
||||
let loc_condition = Loc {
|
||||
region: loc_condition.region,
|
||||
value: inline_calls(var_store, scope, loc_condition.value),
|
||||
value: inline_calls(var_store, loc_condition.value),
|
||||
};
|
||||
|
||||
let loc_continuation = Loc {
|
||||
region: loc_continuation.region,
|
||||
value: inline_calls(var_store, scope, loc_continuation.value),
|
||||
value: inline_calls(var_store, loc_continuation.value),
|
||||
};
|
||||
|
||||
ExpectFx {
|
||||
|
@ -1830,7 +1829,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
loc_pattern: def.loc_pattern,
|
||||
loc_expr: Loc {
|
||||
region: def.loc_expr.region,
|
||||
value: inline_calls(var_store, scope, def.loc_expr.value),
|
||||
value: inline_calls(var_store, def.loc_expr.value),
|
||||
},
|
||||
expr_var: def.expr_var,
|
||||
pattern_vars: def.pattern_vars,
|
||||
|
@ -1840,7 +1839,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
|
||||
let loc_expr = Loc {
|
||||
region: loc_expr.region,
|
||||
value: inline_calls(var_store, scope, loc_expr.value),
|
||||
value: inline_calls(var_store, loc_expr.value),
|
||||
};
|
||||
|
||||
LetRec(new_defs, Box::new(loc_expr), mark)
|
||||
|
@ -1851,7 +1850,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
loc_pattern: def.loc_pattern,
|
||||
loc_expr: Loc {
|
||||
region: def.loc_expr.region,
|
||||
value: inline_calls(var_store, scope, def.loc_expr.value),
|
||||
value: inline_calls(var_store, def.loc_expr.value),
|
||||
},
|
||||
expr_var: def.expr_var,
|
||||
pattern_vars: def.pattern_vars,
|
||||
|
@ -1860,7 +1859,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
|
||||
let loc_expr = Loc {
|
||||
region: loc_expr.region,
|
||||
value: inline_calls(var_store, scope, loc_expr.value),
|
||||
value: inline_calls(var_store, loc_expr.value),
|
||||
};
|
||||
|
||||
LetNonRec(Box::new(def), Box::new(loc_expr))
|
||||
|
@ -1878,7 +1877,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
}) => {
|
||||
let loc_expr = *loc_body;
|
||||
let loc_expr = Loc {
|
||||
value: inline_calls(var_store, scope, loc_expr.value),
|
||||
value: inline_calls(var_store, loc_expr.value),
|
||||
region: loc_expr.region,
|
||||
};
|
||||
|
||||
|
@ -1938,7 +1937,7 @@ pub fn inline_calls(var_store: &mut VarStore, scope: &mut Scope, expr: Expr) ->
|
|||
let (var, loc_expr) = *argument;
|
||||
let argument = Box::new((
|
||||
var,
|
||||
loc_expr.map_owned(|expr| inline_calls(var_store, scope, expr)),
|
||||
loc_expr.map_owned(|expr| inline_calls(var_store, expr)),
|
||||
));
|
||||
|
||||
OpaqueRef {
|
||||
|
@ -2737,7 +2736,7 @@ fn get_lookup_symbols(expr: &Expr) -> Vec<ExpectLookup> {
|
|||
| Expr::ExpectFx {
|
||||
loc_continuation, ..
|
||||
} => {
|
||||
stack.push(&(*loc_continuation).value);
|
||||
stack.push(&loc_continuation.value);
|
||||
|
||||
// Intentionally ignore the lookups in the nested `expect` condition itself,
|
||||
// because they couldn't possibly influence the outcome of this `expect`!
|
||||
|
|
|
@ -79,7 +79,7 @@ fn desugar_value_def<'a>(arena: &'a Bump, def: &'a ValueDef<'a>) -> ValueDef<'a>
|
|||
ann_pattern,
|
||||
ann_type,
|
||||
comment: *comment,
|
||||
body_pattern: *body_pattern,
|
||||
body_pattern,
|
||||
body_expr: desugar_expr(arena, body_expr),
|
||||
},
|
||||
Expect {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{borrow::Borrow, iter::FromIterator};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VecSet<T> {
|
||||
elements: Vec<T>,
|
||||
}
|
||||
|
|
|
@ -99,14 +99,11 @@ impl DerivedModule {
|
|||
exposed_by_module: &ExposedByModule,
|
||||
key: DeriveKey,
|
||||
) -> &(Symbol, Def, SpecializationLambdaSets) {
|
||||
match self.map.get(&key) {
|
||||
Some(entry) => {
|
||||
// rustc won't let us return an immutable reference *and* continue using
|
||||
// `self.map` immutably below, but this is safe, because we are not returning
|
||||
// an immutable reference to the entry.
|
||||
return unsafe { std::mem::transmute(entry) };
|
||||
}
|
||||
None => {}
|
||||
if let Some(entry) = self.map.get(&key) {
|
||||
// rustc won't let us return an immutable reference *and* continue using
|
||||
// `self.map` immutably below, but this is safe, because we are not returning
|
||||
// an immutable reference to the entry.
|
||||
return unsafe { std::mem::transmute(entry) };
|
||||
}
|
||||
|
||||
let ident_id = if cfg!(debug_assertions) || cfg!(feature = "debug-derived-symbols") {
|
||||
|
|
|
@ -25,7 +25,7 @@ use hash::{FlatHash, FlatHashKey};
|
|||
use roc_module::symbol::Symbol;
|
||||
use roc_types::subs::{Subs, Variable};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum DeriveError {
|
||||
/// Unbound variable present in the type-to-derive. It may be possible to derive for this type
|
||||
/// once the unbound variable is resolved.
|
||||
|
|
|
@ -166,8 +166,8 @@ impl<'a> Formattable for TypeAnnotation<'a> {
|
|||
|
||||
Wildcard | Inferred | BoundVariable(_) | Malformed(_) => false,
|
||||
Function(args, result) => {
|
||||
(&result.value).is_multiline()
|
||||
|| args.iter().any(|loc_arg| (&loc_arg.value).is_multiline())
|
||||
result.value.is_multiline()
|
||||
|| args.iter().any(|loc_arg| loc_arg.value.is_multiline())
|
||||
}
|
||||
Apply(_, _, args) => args.iter().any(|loc_arg| loc_arg.value.is_multiline()),
|
||||
As(lhs, _, _) => lhs.value.is_multiline(),
|
||||
|
@ -226,7 +226,7 @@ impl<'a> Formattable for TypeAnnotation<'a> {
|
|||
buf.newline();
|
||||
}
|
||||
|
||||
(&argument.value).format_with_options(
|
||||
argument.value.format_with_options(
|
||||
buf,
|
||||
Parens::InFunctionType,
|
||||
Newlines::No,
|
||||
|
@ -251,7 +251,8 @@ impl<'a> Formattable for TypeAnnotation<'a> {
|
|||
buf.push_str("->");
|
||||
buf.spaces(1);
|
||||
|
||||
(&ret.value).format_with_options(buf, Parens::InFunctionType, Newlines::No, indent);
|
||||
ret.value
|
||||
.format_with_options(buf, Parens::InFunctionType, Newlines::No, indent);
|
||||
|
||||
if needs_parens {
|
||||
buf.push(')')
|
||||
|
@ -275,12 +276,9 @@ impl<'a> Formattable for TypeAnnotation<'a> {
|
|||
|
||||
for argument in *arguments {
|
||||
buf.spaces(1);
|
||||
(&argument.value).format_with_options(
|
||||
buf,
|
||||
Parens::InApply,
|
||||
Newlines::No,
|
||||
indent,
|
||||
);
|
||||
argument
|
||||
.value
|
||||
.format_with_options(buf, Parens::InApply, Newlines::No, indent);
|
||||
}
|
||||
|
||||
if write_parens {
|
||||
|
@ -371,12 +369,12 @@ impl<'a> Formattable for AssignedField<'a, TypeAnnotation<'a>> {
|
|||
fn format_with_options<'buf>(
|
||||
&self,
|
||||
buf: &mut Buf<'buf>,
|
||||
parens: Parens,
|
||||
_parens: Parens,
|
||||
newlines: Newlines,
|
||||
indent: u16,
|
||||
) {
|
||||
// we abuse the `Newlines` type to decide between multiline or single-line layout
|
||||
format_assigned_field_help(self, buf, parens, indent, 1, newlines == Newlines::Yes);
|
||||
format_assigned_field_help(self, buf, indent, 1, newlines == Newlines::Yes);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,12 +386,12 @@ impl<'a> Formattable for AssignedField<'a, Expr<'a>> {
|
|||
fn format_with_options<'buf>(
|
||||
&self,
|
||||
buf: &mut Buf<'buf>,
|
||||
parens: Parens,
|
||||
_parens: Parens,
|
||||
newlines: Newlines,
|
||||
indent: u16,
|
||||
) {
|
||||
// we abuse the `Newlines` type to decide between multiline or single-line layout
|
||||
format_assigned_field_help(self, buf, parens, indent, 0, newlines == Newlines::Yes);
|
||||
format_assigned_field_help(self, buf, indent, 0, newlines == Newlines::Yes);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,7 +411,6 @@ fn is_multiline_assigned_field_help<T: Formattable>(afield: &AssignedField<'_, T
|
|||
fn format_assigned_field_help<'a, 'buf, T>(
|
||||
zelf: &AssignedField<'a, T>,
|
||||
buf: &mut Buf<'buf>,
|
||||
parens: Parens,
|
||||
indent: u16,
|
||||
separator_spaces: usize,
|
||||
is_multiline: bool,
|
||||
|
@ -466,24 +463,10 @@ fn format_assigned_field_help<'a, 'buf, T>(
|
|||
}
|
||||
AssignedField::SpaceBefore(sub_field, spaces) => {
|
||||
fmt_comments_only(buf, spaces.iter(), NewlineAt::Bottom, indent);
|
||||
format_assigned_field_help(
|
||||
sub_field,
|
||||
buf,
|
||||
parens,
|
||||
indent,
|
||||
separator_spaces,
|
||||
is_multiline,
|
||||
);
|
||||
format_assigned_field_help(sub_field, buf, indent, separator_spaces, is_multiline);
|
||||
}
|
||||
AssignedField::SpaceAfter(sub_field, spaces) => {
|
||||
format_assigned_field_help(
|
||||
sub_field,
|
||||
buf,
|
||||
parens,
|
||||
indent,
|
||||
separator_spaces,
|
||||
is_multiline,
|
||||
);
|
||||
format_assigned_field_help(sub_field, buf, indent, separator_spaces, is_multiline);
|
||||
fmt_comments_only(buf, spaces.iter(), NewlineAt::Bottom, indent);
|
||||
}
|
||||
Malformed(raw) => {
|
||||
|
@ -497,7 +480,7 @@ impl<'a> Formattable for Tag<'a> {
|
|||
use self::Tag::*;
|
||||
|
||||
match self {
|
||||
Apply { args, .. } => args.iter().any(|arg| (&arg.value).is_multiline()),
|
||||
Apply { args, .. } => args.iter().any(|arg| arg.value.is_multiline()),
|
||||
Tag::SpaceBefore(_, _) | Tag::SpaceAfter(_, _) => true,
|
||||
Malformed(text) => text.chars().any(|c| c == '\n'),
|
||||
}
|
||||
|
|
|
@ -542,7 +542,7 @@ fn fmt_binops<'a, 'buf>(
|
|||
indent: u16,
|
||||
) {
|
||||
let is_multiline = part_of_multi_line_binops
|
||||
|| (&loc_right_side.value).is_multiline()
|
||||
|| loc_right_side.value.is_multiline()
|
||||
|| lefts.iter().any(|(expr, _)| expr.value.is_multiline());
|
||||
|
||||
for (loc_left_side, loc_binop) in lefts {
|
||||
|
@ -1045,7 +1045,7 @@ fn fmt_closure<'a, 'buf>(
|
|||
|
||||
buf.push_str("->");
|
||||
|
||||
let is_multiline = (&loc_ret.value).is_multiline();
|
||||
let is_multiline = loc_ret.value.is_multiline();
|
||||
|
||||
// If the body is multiline, go down a line and indent.
|
||||
let body_indent = if is_multiline {
|
||||
|
@ -1156,7 +1156,7 @@ fn fmt_backpassing<'a, 'buf>(
|
|||
|
||||
buf.push_str("<-");
|
||||
|
||||
let is_multiline = (&loc_ret.value).is_multiline();
|
||||
let is_multiline = loc_ret.value.is_multiline();
|
||||
|
||||
// If the body is multiline, go down a line and indent.
|
||||
let body_indent = if is_multiline {
|
||||
|
|
|
@ -19,7 +19,7 @@ macro_rules! disassembler_test {
|
|||
// TODO: Not sure if there is a better way to merge these together,
|
||||
// but I like the end use of this a lot better than the old tests.
|
||||
($assemble_fn: expr, $format_fn: expr) => {{
|
||||
use crate::generic64::disassembler_test_macro::merge_instructions_without_line_numbers;
|
||||
use $crate::generic64::disassembler_test_macro::merge_instructions_without_line_numbers;
|
||||
let arena = bumpalo::Bump::new();
|
||||
let (mut buf, cs) = setup_capstone_and_arena(&arena);
|
||||
$assemble_fn(&mut buf);
|
||||
|
|
|
@ -1011,7 +1011,7 @@ impl Assembler<X86_64GeneralReg, X86_64FloatReg> for X86_64Assembler {
|
|||
|
||||
#[inline(always)]
|
||||
fn call(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>, fn_name: String) {
|
||||
buf.extend(&[0xE8, 0x00, 0x00, 0x00, 0x00]);
|
||||
buf.extend([0xE8, 0x00, 0x00, 0x00, 0x00]);
|
||||
relocs.push(Relocation::LinkedFunction {
|
||||
offset: buf.len() as u64 - 4,
|
||||
name: fn_name,
|
||||
|
@ -1478,7 +1478,7 @@ fn binop_reg64_reg64(
|
|||
let rex = add_reg_extension(src, rex);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
let src_mod = (src as u8 % 8) << 3;
|
||||
buf.extend(&[rex, op_code, 0xC0 | dst_mod | src_mod]);
|
||||
buf.extend([rex, op_code, 0xC0 | dst_mod | src_mod]);
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -1493,7 +1493,7 @@ fn extended_binop_reg64_reg64(
|
|||
let rex = add_reg_extension(src, rex);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
let src_mod = (src as u8 % 8) << 3;
|
||||
buf.extend(&[rex, op_code1, op_code2, 0xC0 | dst_mod | src_mod]);
|
||||
buf.extend([rex, op_code1, op_code2, 0xC0 | dst_mod | src_mod]);
|
||||
}
|
||||
|
||||
// Below here are the functions for all of the assembly instructions.
|
||||
|
@ -1508,8 +1508,8 @@ fn add_reg64_imm32(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i32) {
|
|||
let rex = add_rm_extension(dst, REX_W);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
buf.reserve(7);
|
||||
buf.extend(&[rex, 0x81, 0xC0 | dst_mod]);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend([rex, 0x81, 0xC0 | dst_mod]);
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `ADD r/m64,r64` -> Add r64 to r/m64.
|
||||
|
@ -1547,7 +1547,7 @@ fn addsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF2,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1555,7 +1555,7 @@ fn addsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF2, 0x0F, 0x58, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF2, 0x0F, 0x58, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1567,7 +1567,7 @@ fn addss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF3,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1575,7 +1575,7 @@ fn addss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF3, 0x0F, 0x58, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF3, 0x0F, 0x58, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1587,7 +1587,7 @@ fn mulsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF2,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1595,7 +1595,7 @@ fn mulsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF2, 0x0F, 0x59, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF2, 0x0F, 0x59, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1607,7 +1607,7 @@ fn divss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF3,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1615,7 +1615,7 @@ fn divss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF3, 0x0F, 0x5E, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF3, 0x0F, 0x5E, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1627,7 +1627,7 @@ fn divsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF2,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1635,7 +1635,7 @@ fn divsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF2, 0x0F, 0x5E, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF2, 0x0F, 0x5E, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1647,7 +1647,7 @@ fn mulss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF3,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1655,7 +1655,7 @@ fn mulss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF3, 0x0F, 0x59, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF3, 0x0F, 0x59, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1667,7 +1667,7 @@ fn andpd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
let src_mod = src as u8 % 8;
|
||||
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0x66,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1675,7 +1675,7 @@ fn andpd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0x66, 0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0x66, 0x0F, 0x54, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1684,7 +1684,7 @@ fn andpd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_64Fl
|
|||
fn and_reg64_imm8(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i8) {
|
||||
let rex = add_rm_extension(dst, REX_W);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
buf.extend(&[rex, 0x83, 0xE0 | dst_mod, imm as u8]);
|
||||
buf.extend([rex, 0x83, 0xE0 | dst_mod, imm as u8]);
|
||||
}
|
||||
|
||||
/// `CMOVL r64,r/m64` -> Move if less (SF≠ OF).
|
||||
|
@ -1694,7 +1694,7 @@ fn cmovl_reg64_reg64(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, src: X86_64Ge
|
|||
let rex = add_rm_extension(src, rex);
|
||||
let dst_mod = (dst as u8 % 8) << 3;
|
||||
let src_mod = src as u8 % 8;
|
||||
buf.extend(&[rex, 0x0F, 0x4C, 0xC0 | dst_mod | src_mod]);
|
||||
buf.extend([rex, 0x0F, 0x4C, 0xC0 | dst_mod | src_mod]);
|
||||
}
|
||||
|
||||
/// `CMP r/m64,i32` -> Compare i32 to r/m64.
|
||||
|
@ -1703,8 +1703,8 @@ fn cmp_reg64_imm32(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i32) {
|
|||
let rex = add_rm_extension(dst, REX_W);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
buf.reserve(7);
|
||||
buf.extend(&[rex, 0x81, 0xF8 | dst_mod]);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend([rex, 0x81, 0xF8 | dst_mod]);
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `CMP r/m64,r64` -> Compare r64 to r/m64.
|
||||
|
@ -1738,7 +1738,7 @@ fn mul_reg64_reg64(buf: &mut Vec<'_, u8>, src: X86_64GeneralReg) {
|
|||
rex |= REX_PREFIX_B;
|
||||
}
|
||||
|
||||
buf.extend(&[rex, 0xF7, 0b1110_0000 | (src as u8 % 8)]);
|
||||
buf.extend([rex, 0xF7, 0b1110_0000 | (src as u8 % 8)]);
|
||||
}
|
||||
|
||||
/// `IDIV r/m64` -> Signed divide RDX:RAX by r/m64, with result stored in RAX ← Quotient, RDX ← Remainder.
|
||||
|
@ -1756,9 +1756,9 @@ fn idiv_reg64_reg64(buf: &mut Vec<'_, u8>, src: X86_64GeneralReg) {
|
|||
//
|
||||
// The CQO instruction (available in 64-bit mode only) copies the sign (bit 63)
|
||||
// of the value in the RAX register into every bit position in the RDX register
|
||||
buf.extend(&[0x48, 0x99]);
|
||||
buf.extend([0x48, 0x99]);
|
||||
|
||||
buf.extend(&[rex, 0xF7, 0b1111_1000 | (src as u8 % 8)]);
|
||||
buf.extend([rex, 0xF7, 0b1111_1000 | (src as u8 % 8)]);
|
||||
}
|
||||
|
||||
/// `DIV r/m64` -> Unsigned divide RDX:RAX by r/m64, with result stored in RAX ← Quotient, RDX ← Remainder.
|
||||
|
@ -1776,10 +1776,10 @@ fn udiv_reg64_reg64(buf: &mut Vec<'_, u8>, src: X86_64GeneralReg) {
|
|||
//
|
||||
// The CQO instruction (available in 64-bit mode only) copies the sign (bit 63)
|
||||
// of the value in the RAX register into every bit position in the RDX register
|
||||
buf.extend(&[0x48, 0x99]);
|
||||
buf.extend([0x48, 0x99]);
|
||||
|
||||
// adds a cqo (convert doubleword to quadword)
|
||||
buf.extend(&[rex, 0xF7, 0b1111_0000 | (src as u8 % 8)]);
|
||||
buf.extend([rex, 0xF7, 0b1111_0000 | (src as u8 % 8)]);
|
||||
}
|
||||
|
||||
/// Jump near, relative, RIP = RIP + 32-bit displacement sign extended to 64-bits.
|
||||
|
@ -1787,7 +1787,7 @@ fn udiv_reg64_reg64(buf: &mut Vec<'_, u8>, src: X86_64GeneralReg) {
|
|||
fn jmp_imm32(buf: &mut Vec<'_, u8>, imm: i32) {
|
||||
buf.reserve(5);
|
||||
buf.push(0xE9);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
|
||||
/// Jump near if not equal (ZF=0).
|
||||
|
@ -1796,7 +1796,7 @@ fn jne_imm32(buf: &mut Vec<'_, u8>, imm: i32) {
|
|||
buf.reserve(6);
|
||||
buf.push(0x0F);
|
||||
buf.push(0x85);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOV r/m64, imm32` -> Move imm32 sign extended to 64-bits to r/m64.
|
||||
|
@ -1805,8 +1805,8 @@ fn mov_reg64_imm32(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i32) {
|
|||
let rex = add_rm_extension(dst, REX_W);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
buf.reserve(7);
|
||||
buf.extend(&[rex, 0xC7, 0xC0 | dst_mod]);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend([rex, 0xC7, 0xC0 | dst_mod]);
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOV r64, imm64` -> Move imm64 to r64.
|
||||
|
@ -1818,8 +1818,8 @@ fn mov_reg64_imm64(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i64) {
|
|||
let rex = add_opcode_extension(dst, REX_W);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
buf.reserve(10);
|
||||
buf.extend(&[rex, 0xB8 | dst_mod]);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend([rex, 0xB8 | dst_mod]);
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1854,12 +1854,12 @@ fn mov_base64_offset32_reg64(
|
|||
let src_mod = (src as u8 % 8) << 3;
|
||||
let base_mod = base as u8 % 8;
|
||||
buf.reserve(8);
|
||||
buf.extend(&[rex, 0x89, 0x80 | src_mod | base_mod]);
|
||||
buf.extend([rex, 0x89, 0x80 | src_mod | base_mod]);
|
||||
// Using RSP or R12 requires a secondary index byte.
|
||||
if base == X86_64GeneralReg::RSP || base == X86_64GeneralReg::R12 {
|
||||
buf.push(0x24);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOV r64,r/m64` -> Move r/m64 to r64, where m64 references a base + offset.
|
||||
|
@ -1875,12 +1875,12 @@ fn mov_reg64_base64_offset32(
|
|||
let dst_mod = (dst as u8 % 8) << 3;
|
||||
let base_mod = base as u8 % 8;
|
||||
buf.reserve(8);
|
||||
buf.extend(&[rex, 0x8B, 0x80 | dst_mod | base_mod]);
|
||||
buf.extend([rex, 0x8B, 0x80 | dst_mod | base_mod]);
|
||||
// Using RSP or R12 requires a secondary index byte.
|
||||
if base == X86_64GeneralReg::RSP || base == X86_64GeneralReg::R12 {
|
||||
buf.push(0x24);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOVZX r64,r/m8` -> Move r/m8 with zero extention to r64, where m8 references a base + offset.
|
||||
|
@ -1896,12 +1896,12 @@ fn movzx_reg64_base8_offset32(
|
|||
let dst_mod = (dst as u8 % 8) << 3;
|
||||
let base_mod = base as u8 % 8;
|
||||
buf.reserve(9);
|
||||
buf.extend(&[rex, 0x0F, 0xB6, 0x80 | dst_mod | base_mod]);
|
||||
buf.extend([rex, 0x0F, 0xB6, 0x80 | dst_mod | base_mod]);
|
||||
// Using RSP or R12 requires a secondary index byte.
|
||||
if base == X86_64GeneralReg::RSP || base == X86_64GeneralReg::R12 {
|
||||
buf.push(0x24);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOVSD xmm1,xmm2` -> Move scalar double-precision floating-point value from xmm2 to xmm1 register.
|
||||
|
@ -1922,7 +1922,7 @@ fn raw_movsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF2,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1930,7 +1930,7 @@ fn raw_movsd_freg64_freg64(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF2, 0x0F, 0x10, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF2, 0x0F, 0x10, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1952,7 +1952,7 @@ fn raw_movss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_
|
|||
let src_high = src as u8 > 7;
|
||||
let src_mod = src as u8 % 8;
|
||||
if dst_high || src_high {
|
||||
buf.extend(&[
|
||||
buf.extend([
|
||||
0xF3,
|
||||
0x40 | ((dst_high as u8) << 2) | (src_high as u8),
|
||||
0x0F,
|
||||
|
@ -1960,7 +1960,7 @@ fn raw_movss_freg32_freg32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, src: X86_
|
|||
0xC0 | (dst_mod << 3) | (src_mod),
|
||||
])
|
||||
} else {
|
||||
buf.extend(&[0xF3, 0x0F, 0x10, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
buf.extend([0xF3, 0x0F, 0x10, 0xC0 | (dst_mod << 3) | (src_mod)])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1970,12 +1970,12 @@ fn movss_freg32_rip_offset32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, offset:
|
|||
let dst_mod = dst as u8 % 8;
|
||||
if dst as u8 > 7 {
|
||||
buf.reserve(9);
|
||||
buf.extend(&[0xF3, 0x44, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
buf.extend([0xF3, 0x44, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
} else {
|
||||
buf.reserve(8);
|
||||
buf.extend(&[0xF3, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
buf.extend([0xF3, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
// `MOVSD xmm, m64` -> Load scalar double-precision floating-point value from m64 to xmm register.
|
||||
|
@ -1984,12 +1984,12 @@ fn movsd_freg64_rip_offset32(buf: &mut Vec<'_, u8>, dst: X86_64FloatReg, offset:
|
|||
let dst_mod = dst as u8 % 8;
|
||||
if dst as u8 > 7 {
|
||||
buf.reserve(9);
|
||||
buf.extend(&[0xF2, 0x44, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
buf.extend([0xF2, 0x44, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
} else {
|
||||
buf.reserve(8);
|
||||
buf.extend(&[0xF2, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
buf.extend([0xF2, 0x0F, 0x10, 0x05 | (dst_mod << 3)]);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOVSD r/m64,xmm1` -> Move xmm1 to r/m64. where m64 references the base pointer.
|
||||
|
@ -2009,12 +2009,12 @@ fn movsd_base64_offset32_freg64(
|
|||
if src as u8 > 7 || base as u8 > 7 {
|
||||
buf.push(rex);
|
||||
}
|
||||
buf.extend(&[0x0F, 0x11, 0x80 | src_mod | base_mod]);
|
||||
buf.extend([0x0F, 0x11, 0x80 | src_mod | base_mod]);
|
||||
// Using RSP or R12 requires a secondary index byte.
|
||||
if base == X86_64GeneralReg::RSP || base == X86_64GeneralReg::R12 {
|
||||
buf.push(0x24);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `MOVSD xmm1,r/m64` -> Move r/m64 to xmm1. where m64 references the base pointer.
|
||||
|
@ -2034,12 +2034,12 @@ fn movsd_freg64_base64_offset32(
|
|||
if dst as u8 > 7 || base as u8 > 7 {
|
||||
buf.push(rex);
|
||||
}
|
||||
buf.extend(&[0x0F, 0x10, 0x80 | dst_mod | base_mod]);
|
||||
buf.extend([0x0F, 0x10, 0x80 | dst_mod | base_mod]);
|
||||
// Using RSP or R12 requires a secondary index byte.
|
||||
if base == X86_64GeneralReg::RSP || base == X86_64GeneralReg::R12 {
|
||||
buf.push(0x24);
|
||||
}
|
||||
buf.extend(&offset.to_le_bytes());
|
||||
buf.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `NEG r/m64` -> Two's complement negate r/m64.
|
||||
|
@ -2047,7 +2047,7 @@ fn movsd_freg64_base64_offset32(
|
|||
fn neg_reg64(buf: &mut Vec<'_, u8>, reg: X86_64GeneralReg) {
|
||||
let rex = add_rm_extension(reg, REX_W);
|
||||
let reg_mod = reg as u8 % 8;
|
||||
buf.extend(&[rex, 0xF7, 0xD8 | reg_mod]);
|
||||
buf.extend([rex, 0xF7, 0xD8 | reg_mod]);
|
||||
}
|
||||
|
||||
// helper function for `set*` instructions
|
||||
|
@ -2060,10 +2060,10 @@ fn set_reg64_help(op_code: u8, buf: &mut Vec<'_, u8>, reg: X86_64GeneralReg) {
|
|||
let reg_mod = reg as u8 % 8;
|
||||
use X86_64GeneralReg::*;
|
||||
match reg {
|
||||
RAX | RCX | RDX | RBX => buf.extend(&[0x0F, op_code, 0xC0 | reg_mod]),
|
||||
RSP | RBP | RSI | RDI => buf.extend(&[REX, 0x0F, op_code, 0xC0 | reg_mod]),
|
||||
RAX | RCX | RDX | RBX => buf.extend([0x0F, op_code, 0xC0 | reg_mod]),
|
||||
RSP | RBP | RSI | RDI => buf.extend([REX, 0x0F, op_code, 0xC0 | reg_mod]),
|
||||
R8 | R9 | R10 | R11 | R12 | R13 | R14 | R15 => {
|
||||
buf.extend(&[REX | 1, 0x0F, op_code, 0xC0 | reg_mod])
|
||||
buf.extend([REX | 1, 0x0F, op_code, 0xC0 | reg_mod])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2085,7 +2085,7 @@ fn cvtsi2_help<T: RegTrait, U: RegTrait>(
|
|||
let mod1 = (dst.value() % 8) << 3;
|
||||
let mod2 = src.value() % 8;
|
||||
|
||||
buf.extend(&[op_code1, rex, 0x0F, op_code2, 0xC0 | mod1 | mod2])
|
||||
buf.extend([op_code1, rex, 0x0F, op_code2, 0xC0 | mod1 | mod2])
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -2099,7 +2099,7 @@ fn cvtsx2_help<T: RegTrait, V: RegTrait>(
|
|||
let mod1 = (dst.value() % 8) << 3;
|
||||
let mod2 = src.value() % 8;
|
||||
|
||||
buf.extend(&[op_code1, 0x0F, op_code2, 0xC0 | mod1 | mod2])
|
||||
buf.extend([op_code1, 0x0F, op_code2, 0xC0 | mod1 | mod2])
|
||||
}
|
||||
|
||||
/// `SETE r/m64` -> Set Byte on Condition - zero/equal (ZF=1)
|
||||
|
@ -2183,8 +2183,8 @@ fn sub_reg64_imm32(buf: &mut Vec<'_, u8>, dst: X86_64GeneralReg, imm: i32) {
|
|||
let rex = add_rm_extension(dst, REX_W);
|
||||
let dst_mod = dst as u8 % 8;
|
||||
buf.reserve(7);
|
||||
buf.extend(&[rex, 0x81, 0xE8 | dst_mod]);
|
||||
buf.extend(&imm.to_le_bytes());
|
||||
buf.extend([rex, 0x81, 0xE8 | dst_mod]);
|
||||
buf.extend(imm.to_le_bytes());
|
||||
}
|
||||
|
||||
/// `SUB r/m64,r64` -> Sub r64 to r/m64.
|
||||
|
@ -2199,7 +2199,7 @@ fn pop_reg64(buf: &mut Vec<'_, u8>, reg: X86_64GeneralReg) {
|
|||
let reg_mod = reg as u8 % 8;
|
||||
if reg as u8 > 7 {
|
||||
let rex = add_opcode_extension(reg, REX);
|
||||
buf.extend(&[rex, 0x58 | reg_mod]);
|
||||
buf.extend([rex, 0x58 | reg_mod]);
|
||||
} else {
|
||||
buf.push(0x58 | reg_mod);
|
||||
}
|
||||
|
@ -2211,7 +2211,7 @@ fn push_reg64(buf: &mut Vec<'_, u8>, reg: X86_64GeneralReg) {
|
|||
let reg_mod = reg as u8 % 8;
|
||||
if reg as u8 > 7 {
|
||||
let rex = add_opcode_extension(reg, REX);
|
||||
buf.extend(&[rex, 0x50 | reg_mod]);
|
||||
buf.extend([rex, 0x50 | reg_mod]);
|
||||
} else {
|
||||
buf.push(0x50 | reg_mod);
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ trait Backend<'a> {
|
|||
let module_id = env.module_id;
|
||||
let ident_ids = interns.all_ident_ids.get_mut(&module_id).unwrap();
|
||||
|
||||
rc_proc_gen.expand_refcount_stmt(ident_ids, layout, modify, *following)
|
||||
rc_proc_gen.expand_refcount_stmt(ident_ids, layout, modify, following)
|
||||
};
|
||||
|
||||
for spec in new_specializations.into_iter() {
|
||||
|
|
|
@ -421,7 +421,7 @@ fn build_proc<'a, B: Backend<'a>>(
|
|||
}
|
||||
Relocation::LinkedFunction { offset, name } => {
|
||||
// If the symbol is an undefined roc function, we need to add it here.
|
||||
if output.symbol_id(name.as_bytes()) == None && name.starts_with("roc_") {
|
||||
if output.symbol_id(name.as_bytes()).is_none() && name.starts_with("roc_") {
|
||||
let builtin_symbol = Symbol {
|
||||
name: name.as_bytes().to_vec(),
|
||||
value: 0,
|
||||
|
@ -435,7 +435,7 @@ fn build_proc<'a, B: Backend<'a>>(
|
|||
output.add_symbol(builtin_symbol);
|
||||
}
|
||||
// If the symbol is an undefined reference counting procedure, we need to add it here.
|
||||
if output.symbol_id(name.as_bytes()) == None {
|
||||
if output.symbol_id(name.as_bytes()).is_none() {
|
||||
for (sym, rc_name) in rc_proc_names.iter() {
|
||||
if name == rc_name {
|
||||
let section_id = output.add_section(
|
||||
|
|
|
@ -411,16 +411,16 @@ fn build_rc_wrapper<'a, 'ctx, 'env>(
|
|||
match rc_operation {
|
||||
Mode::Inc => {
|
||||
let n = 1;
|
||||
increment_refcount_layout(env, function_value, layout_ids, n, value, layout);
|
||||
increment_refcount_layout(env, layout_ids, n, value, layout);
|
||||
}
|
||||
Mode::IncN => {
|
||||
let n = it.next().unwrap().into_int_value();
|
||||
n.set_name(Symbol::ARG_2.as_str(&env.interns));
|
||||
|
||||
increment_n_refcount_layout(env, function_value, layout_ids, n, value, layout);
|
||||
increment_n_refcount_layout(env, layout_ids, n, value, layout);
|
||||
}
|
||||
Mode::Dec => {
|
||||
decrement_refcount_layout(env, function_value, layout_ids, value, layout);
|
||||
decrement_refcount_layout(env, layout_ids, value, layout);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ impl<'ctx> Iterator for FunctionIterator<'ctx> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq)]
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Scope<'a, 'ctx> {
|
||||
symbols: ImMap<Symbol, (Layout<'a>, BasicValueEnum<'ctx>)>,
|
||||
pub top_level_thunks: ImMap<Symbol, (ProcLayout<'a>, FunctionValue<'ctx>)>,
|
||||
|
@ -977,7 +977,7 @@ pub fn build_exp_literal<'a, 'ctx, 'env>(
|
|||
_ => unreachable!("incorrect small_str_bytes"),
|
||||
}
|
||||
} else {
|
||||
let ptr = define_global_str_literal_ptr(env, *str_literal);
|
||||
let ptr = define_global_str_literal_ptr(env, str_literal);
|
||||
let number_of_elements = env.ptr_int().const_int(str_literal.len() as u64, false);
|
||||
|
||||
let alloca =
|
||||
|
@ -2727,14 +2727,7 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
|
|||
let layout = *layout;
|
||||
|
||||
if layout.contains_refcounted(env.layout_interner) {
|
||||
increment_refcount_layout(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
*inc_amount,
|
||||
value,
|
||||
&layout,
|
||||
);
|
||||
increment_refcount_layout(env, layout_ids, *inc_amount, value, &layout);
|
||||
}
|
||||
|
||||
build_exp_stmt(env, layout_ids, func_spec_solutions, scope, parent, cont)
|
||||
|
@ -2743,7 +2736,7 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
|
|||
let (value, layout) = load_symbol_and_layout(scope, symbol);
|
||||
|
||||
if layout.contains_refcounted(env.layout_interner) {
|
||||
decrement_refcount_layout(env, parent, layout_ids, value, layout);
|
||||
decrement_refcount_layout(env, layout_ids, value, layout);
|
||||
}
|
||||
|
||||
build_exp_stmt(env, layout_ids, func_spec_solutions, scope, parent, cont)
|
||||
|
@ -3859,12 +3852,9 @@ fn expose_function_to_host_help_c_abi_v2<'a, 'ctx, 'env>(
|
|||
arg_type.into_pointer_type().get_element_type(),
|
||||
);
|
||||
// C return pointer goes at the beginning of params, and we must skip it if it exists.
|
||||
let param_index = (i
|
||||
+ (if matches!(cc_return, CCReturn::ByPointer) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
})) as u32;
|
||||
let returns_pointer = matches!(cc_return, CCReturn::ByPointer);
|
||||
let param_index = i as u32 + returns_pointer as u32;
|
||||
|
||||
c_function.add_attribute(AttributeLoc::Param(param_index), byval);
|
||||
c_function.add_attribute(AttributeLoc::Param(param_index), nonnull);
|
||||
}
|
||||
|
@ -4568,7 +4558,7 @@ fn build_procedures_help<'a, 'ctx, 'env>(
|
|||
fn_val.print_to_stderr();
|
||||
|
||||
if let Some(app_ll_file) = debug_output_file {
|
||||
env.module.print_to_file(&app_ll_file).unwrap();
|
||||
env.module.print_to_file(app_ll_file).unwrap();
|
||||
|
||||
panic!(
|
||||
r"😱 LLVM errors when defining function {:?}; I wrote the full LLVM IR to {:?}",
|
||||
|
@ -6223,14 +6213,7 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
|
||||
let element_layout = list_element_layout!(list_layout);
|
||||
|
||||
list_get_unsafe(
|
||||
env,
|
||||
layout_ids,
|
||||
parent,
|
||||
element_layout,
|
||||
elem_index,
|
||||
wrapper_struct,
|
||||
)
|
||||
list_get_unsafe(env, layout_ids, element_layout, elem_index, wrapper_struct)
|
||||
}
|
||||
ListReplaceUnsafe => {
|
||||
let list = load_symbol(scope, &args[0]);
|
||||
|
|
|
@ -121,7 +121,6 @@ pub(crate) fn list_with_capacity<'a, 'ctx, 'env>(
|
|||
pub(crate) fn list_get_unsafe<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
element_layout: &Layout<'a>,
|
||||
elem_index: IntValue<'ctx>,
|
||||
wrapper_struct: StructValue<'ctx>,
|
||||
|
@ -140,7 +139,7 @@ pub(crate) fn list_get_unsafe<'a, 'ctx, 'env>(
|
|||
|
||||
let result = load_roc_value(env, *element_layout, elem_ptr, "list_get_load_element");
|
||||
|
||||
increment_refcount_layout(env, parent, layout_ids, 1, result, element_layout);
|
||||
increment_refcount_layout(env, layout_ids, 1, result, element_layout);
|
||||
|
||||
result
|
||||
}
|
||||
|
|
|
@ -327,8 +327,6 @@ fn modify_refcount_struct_help<'a, 'ctx, 'env>(
|
|||
|
||||
arg_val.set_name(arg_symbol.as_str(&env.interns));
|
||||
|
||||
let parent = fn_val;
|
||||
|
||||
let wrapper_struct = arg_val.into_struct_value();
|
||||
|
||||
for (i, field_layout) in layouts.iter().enumerate() {
|
||||
|
@ -347,7 +345,6 @@ fn modify_refcount_struct_help<'a, 'ctx, 'env>(
|
|||
|
||||
modify_refcount_layout_help(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode.to_call_mode(fn_val),
|
||||
when_recursive,
|
||||
|
@ -362,42 +359,32 @@ fn modify_refcount_struct_help<'a, 'ctx, 'env>(
|
|||
|
||||
pub fn increment_refcount_layout<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
inc_amount: u64,
|
||||
value: BasicValueEnum<'ctx>,
|
||||
layout: &Layout<'a>,
|
||||
) {
|
||||
let amount = env.ptr_int().const_int(inc_amount, false);
|
||||
increment_n_refcount_layout(env, parent, layout_ids, amount, value, layout);
|
||||
increment_n_refcount_layout(env, layout_ids, amount, value, layout);
|
||||
}
|
||||
|
||||
pub fn increment_n_refcount_layout<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
amount: IntValue<'ctx>,
|
||||
value: BasicValueEnum<'ctx>,
|
||||
layout: &Layout<'a>,
|
||||
) {
|
||||
modify_refcount_layout(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
CallMode::Inc(amount),
|
||||
value,
|
||||
layout,
|
||||
);
|
||||
modify_refcount_layout(env, layout_ids, CallMode::Inc(amount), value, layout);
|
||||
}
|
||||
|
||||
pub fn decrement_refcount_layout<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
value: BasicValueEnum<'ctx>,
|
||||
layout: &Layout<'a>,
|
||||
) {
|
||||
modify_refcount_layout(env, parent, layout_ids, CallMode::Dec, value, layout);
|
||||
modify_refcount_layout(env, layout_ids, CallMode::Dec, value, layout);
|
||||
}
|
||||
|
||||
fn modify_refcount_builtin<'a, 'ctx, 'env>(
|
||||
|
@ -435,7 +422,6 @@ fn modify_refcount_builtin<'a, 'ctx, 'env>(
|
|||
|
||||
fn modify_refcount_layout<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
call_mode: CallMode<'ctx>,
|
||||
value: BasicValueEnum<'ctx>,
|
||||
|
@ -443,7 +429,6 @@ fn modify_refcount_layout<'a, 'ctx, 'env>(
|
|||
) {
|
||||
modify_refcount_layout_help(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
call_mode,
|
||||
&WhenRecursive::Unreachable,
|
||||
|
@ -460,7 +445,6 @@ enum WhenRecursive<'a> {
|
|||
|
||||
fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
call_mode: CallMode<'ctx>,
|
||||
when_recursive: &WhenRecursive<'a>,
|
||||
|
@ -474,7 +458,6 @@ fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
|||
|
||||
let function = match modify_refcount_layout_build_function(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode,
|
||||
when_recursive,
|
||||
|
@ -538,7 +521,6 @@ fn call_help<'a, 'ctx, 'env>(
|
|||
|
||||
fn modify_refcount_layout_build_function<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
mode: Mode,
|
||||
when_recursive: &WhenRecursive<'a>,
|
||||
|
@ -603,7 +585,6 @@ fn modify_refcount_layout_build_function<'a, 'ctx, 'env>(
|
|||
|
||||
let function = modify_refcount_layout_build_function(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode,
|
||||
when_recursive,
|
||||
|
@ -615,7 +596,6 @@ fn modify_refcount_layout_build_function<'a, 'ctx, 'env>(
|
|||
},
|
||||
LambdaSet(lambda_set) => modify_refcount_layout_build_function(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode,
|
||||
when_recursive,
|
||||
|
@ -731,7 +711,6 @@ fn modify_refcount_list_help<'a, 'ctx, 'env>(
|
|||
let loop_fn = |_index, element| {
|
||||
modify_refcount_layout_help(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode.to_call_mode(fn_val),
|
||||
when_recursive,
|
||||
|
@ -1302,7 +1281,6 @@ fn build_rec_union_recursive_decrement<'a, 'ctx, 'env>(
|
|||
for (field, field_layout) in deferred_nonrec {
|
||||
modify_refcount_layout_help(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode.to_call_mode(decrement_fn),
|
||||
when_recursive,
|
||||
|
@ -1366,7 +1344,7 @@ fn union_layout_tags<'a>(
|
|||
match union_layout {
|
||||
NullableWrapped {
|
||||
other_tags: tags, ..
|
||||
} => *tags,
|
||||
} => tags,
|
||||
NullableUnwrapped { other_fields, .. } => arena.alloc([*other_fields]),
|
||||
NonNullableUnwrapped(fields) => arena.alloc([*fields]),
|
||||
Recursive(tags) => tags,
|
||||
|
@ -1687,7 +1665,6 @@ fn modify_refcount_union_help<'a, 'ctx, 'env>(
|
|||
|
||||
modify_refcount_layout_help(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode.to_call_mode(fn_val),
|
||||
when_recursive,
|
||||
|
@ -1709,7 +1686,6 @@ fn modify_refcount_union_help<'a, 'ctx, 'env>(
|
|||
|
||||
modify_refcount_layout_help(
|
||||
env,
|
||||
parent,
|
||||
layout_ids,
|
||||
mode.to_call_mode(fn_val),
|
||||
when_recursive,
|
||||
|
|
|
@ -120,7 +120,11 @@ macro_rules! run_jit_function {
|
|||
|
||||
$transform(success)
|
||||
}
|
||||
Err(error_msg) => panic!("Roc failed with message: {}", error_msg),
|
||||
Err(error_msg) => {
|
||||
eprintln!("This Roc code crashed with: \"{error_msg}\"");
|
||||
|
||||
Expr::MalformedClosure
|
||||
}
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
|
|
@ -1237,7 +1237,7 @@ impl<'a> WasmBackend<'a> {
|
|||
}
|
||||
|
||||
CallType::HigherOrder(higher_order_lowlevel) => {
|
||||
call_higher_order_lowlevel(self, ret_sym, ret_layout, *higher_order_lowlevel)
|
||||
call_higher_order_lowlevel(self, ret_sym, ret_layout, higher_order_lowlevel)
|
||||
}
|
||||
|
||||
CallType::Foreign {
|
||||
|
|
|
@ -69,7 +69,7 @@ impl std::fmt::Debug for VmBlock<'_> {
|
|||
/// Rust representation matches Wasm encoding.
|
||||
/// It's an error to specify alignment higher than the "natural" alignment of the instruction
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd)]
|
||||
pub enum Align {
|
||||
Bytes1 = 0,
|
||||
Bytes2 = 1,
|
||||
|
@ -111,7 +111,7 @@ impl From<u32> for Align {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Copy)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Copy)]
|
||||
pub enum VmSymbolState {
|
||||
/// Value doesn't exist yet
|
||||
NotYetPushed,
|
||||
|
|
|
@ -303,7 +303,7 @@ impl<'a> Serialize for TypeSection<'a> {
|
|||
*
|
||||
*******************************************************************/
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum ImportDesc {
|
||||
Func { signature_index: u32 },
|
||||
Table { ty: TableType },
|
||||
|
@ -359,7 +359,7 @@ impl Serialize for ImportDesc {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct Import<'a> {
|
||||
pub module: &'a str,
|
||||
pub name: &'a str,
|
||||
|
@ -551,7 +551,7 @@ impl Parse<()> for RefType {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct TableType {
|
||||
pub ref_type: RefType,
|
||||
pub limits: Limits,
|
||||
|
@ -659,7 +659,7 @@ impl Serialize for TableSection {
|
|||
*
|
||||
*******************************************************************/
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Limits {
|
||||
Min(u32),
|
||||
MinMax(u32, u32),
|
||||
|
@ -749,7 +749,7 @@ section_impl!(MemorySection, SectionId::Memory);
|
|||
*
|
||||
*******************************************************************/
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct GlobalType {
|
||||
pub value_type: ValueType,
|
||||
pub is_mutable: bool,
|
||||
|
|
|
@ -44,7 +44,7 @@ fn write_subs_for_module(module_id: ModuleId, filename: &str) {
|
|||
println!("cargo:rerun-if-changed={}", filepath.to_str().unwrap());
|
||||
|
||||
let mut output_path = PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||
output_path.extend(&[filename]);
|
||||
output_path.extend([filename]);
|
||||
output_path.set_extension("dat");
|
||||
|
||||
#[cfg(not(windows))]
|
||||
|
@ -64,7 +64,7 @@ fn write_subs_for_module(module_id: ModuleId, filename: &str) {
|
|||
|
||||
fn write_types_for_module_dummy(output_path: &Path) {
|
||||
// write out a dummy file
|
||||
std::fs::write(output_path, &[]).unwrap();
|
||||
std::fs::write(output_path, []).unwrap();
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
|
@ -107,7 +107,7 @@ fn write_types_for_module_real(module_id: ModuleId, filename: &str, output_path:
|
|||
let abilities = module.abilities_store;
|
||||
let solved_implementations = module.resolved_implementations;
|
||||
|
||||
let mut file = std::fs::File::create(&output_path).unwrap();
|
||||
let mut file = std::fs::File::create(output_path).unwrap();
|
||||
|
||||
let type_state = TypeState {
|
||||
subs,
|
||||
|
|
|
@ -3107,7 +3107,7 @@ fn load_platform_module<'a>(
|
|||
) -> Result<Msg<'a>, LoadingProblem<'a>> {
|
||||
let module_start_time = Instant::now();
|
||||
let file_io_start = Instant::now();
|
||||
let file = fs::read(&filename);
|
||||
let file = fs::read(filename);
|
||||
let file_io_duration = file_io_start.elapsed();
|
||||
|
||||
match file {
|
||||
|
|
|
@ -70,7 +70,7 @@ pub enum ArgSide {
|
|||
Right,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Associativity {
|
||||
/// left-associative operators:
|
||||
///
|
||||
|
|
|
@ -44,7 +44,7 @@ const SYMBOL_HAS_NICHE: () =
|
|||
// register_debug_idents calls (which should be made in debug mode).
|
||||
// Set it to false if you want to see the raw ModuleId and IdentId ints,
|
||||
// but please set it back to true before checking in the result!
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(any(debug_assertions, feature = "debug-symbols"))]
|
||||
const PRETTY_PRINT_DEBUG_SYMBOLS: bool = true;
|
||||
|
||||
pub const DERIVABLE_ABILITIES: &[(Symbol, &[Symbol])] = &[
|
||||
|
@ -183,7 +183,7 @@ impl Symbol {
|
|||
///
|
||||
/// `Foo.bar`
|
||||
impl fmt::Debug for Symbol {
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(any(debug_assertions, feature = "debug-symbols"))]
|
||||
#[allow(clippy::print_in_format_impl)]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if PRETTY_PRINT_DEBUG_SYMBOLS {
|
||||
|
@ -216,7 +216,7 @@ impl fmt::Debug for Symbol {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(debug_assertions, feature = "debug-symbols")))]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fallback_debug_fmt(*self, f)
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ fn fallback_debug_fmt(symbol: Symbol, f: &mut fmt::Formatter) -> fmt::Result {
|
|||
// end up using it in release builds anyway. Right? ...Right?
|
||||
lazy_static! {}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(any(debug_assertions, feature = "debug-symbols"))]
|
||||
lazy_static! {
|
||||
/// This is used in Debug builds only, to let us have a Debug instance
|
||||
/// which displays not only the Module ID, but also the Module Name which
|
||||
|
@ -399,7 +399,7 @@ impl fmt::Debug for ModuleId {
|
|||
/// needs a global mutex, so we don't do this in release builds. This means
|
||||
/// the Debug impl in release builds only shows the number, not the name (which
|
||||
/// it does not have available, due to having never stored it in the mutexed intern table.)
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(any(debug_assertions, feature = "debug-symbols"))]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
// Originally, this printed both name and numeric ID, but the numeric ID
|
||||
// didn't seem to add anything useful. Feel free to temporarily re-add it
|
||||
|
@ -425,7 +425,7 @@ impl fmt::Debug for ModuleId {
|
|||
}
|
||||
|
||||
/// In release builds, all we have access to is the number, so only display that.
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(debug_assertions, feature = "debug-symbols")))]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.0.fmt(f)
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ impl<'a> PackageModuleIds<'a> {
|
|||
// didn't find it, so we'll add it
|
||||
let module_id = ModuleId::from_zero_indexed(self.by_id.len());
|
||||
self.by_id.push(module_name.clone());
|
||||
if cfg!(debug_assertions) {
|
||||
if cfg!(any(debug_assertions, feature = "debug-symbols")) {
|
||||
Self::insert_debug_name(module_id, module_name);
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,7 @@ impl<'a> PackageModuleIds<'a> {
|
|||
ModuleIds { by_id }
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(any(debug_assertions, feature = "debug-symbols"))]
|
||||
fn insert_debug_name(module_id: ModuleId, module_name: &PQModuleName) {
|
||||
let mut names = DEBUG_MODULE_ID_NAMES.lock().expect("Failed to acquire lock for Debug interning into DEBUG_MODULE_ID_NAMES, presumably because a thread panicked.");
|
||||
|
||||
|
@ -503,7 +503,7 @@ impl<'a> PackageModuleIds<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(debug_assertions, feature = "debug-symbols")))]
|
||||
fn insert_debug_name(_module_id: ModuleId, _module_name: &PQModuleName) {
|
||||
// By design, this is a no-op in release builds!
|
||||
}
|
||||
|
@ -557,14 +557,14 @@ impl ModuleIds {
|
|||
// didn't find it, so we'll add it
|
||||
let module_id = ModuleId::from_zero_indexed(self.by_id.len());
|
||||
self.by_id.push(module_name.clone());
|
||||
if cfg!(debug_assertions) {
|
||||
if cfg!(any(debug_assertions, feature = "debug-symbols")) {
|
||||
Self::insert_debug_name(module_id, module_name);
|
||||
}
|
||||
|
||||
module_id
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(any(debug_assertions, feature = "debug-symbols"))]
|
||||
fn insert_debug_name(module_id: ModuleId, module_name: &ModuleName) {
|
||||
let mut names = DEBUG_MODULE_ID_NAMES.lock().expect("Failed to acquire lock for Debug interning into DEBUG_MODULE_ID_NAMES, presumably because a thread panicked.");
|
||||
|
||||
|
@ -574,7 +574,7 @@ impl ModuleIds {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(debug_assertions, feature = "debug-symbols")))]
|
||||
fn insert_debug_name(_module_id: ModuleId, _module_name: &ModuleName) {
|
||||
// By design, this is a no-op in release builds!
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ macro_rules! define_builtins {
|
|||
IdentIds{ interner }
|
||||
};
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
if cfg!(any(debug_assertions, feature = "debug-symbols")) {
|
||||
let name = PQModuleName::Unqualified($module_name.into());
|
||||
PackageModuleIds::insert_debug_name(module_id, &name);
|
||||
module_id.register_debug_idents(&ident_ids);
|
||||
|
@ -910,7 +910,7 @@ macro_rules! define_builtins {
|
|||
let mut insert_both = |id: ModuleId, name_str: &'static str| {
|
||||
let name: ModuleName = name_str.into();
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
if cfg!(any(debug_assertions, feature = "debug-symbols")) {
|
||||
Self::insert_debug_name(id, &name);
|
||||
}
|
||||
|
||||
|
@ -936,7 +936,7 @@ macro_rules! define_builtins {
|
|||
let raw_name: IdentStr = name_str.into();
|
||||
let name = PQModuleName::Unqualified(raw_name.into());
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
if cfg!(any(debug_assertions, feature = "debug-symbols")) {
|
||||
Self::insert_debug_name(id, &name);
|
||||
}
|
||||
|
||||
|
|
|
@ -471,7 +471,7 @@ impl<'a> CodeGenHelp<'a> {
|
|||
) -> (bool, Vec<'a, Option<usize>>) {
|
||||
use UnionLayout::*;
|
||||
match union {
|
||||
NonRecursive(_) => return (false, bumpalo::vec![in self.arena]),
|
||||
NonRecursive(_) => (false, bumpalo::vec![in self.arena]),
|
||||
|
||||
Recursive(tags) => self.union_tail_recursion_fields_help(tags),
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ impl AbilityAliases {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum CapturedSymbols<'a> {
|
||||
None,
|
||||
Captured(&'a [(Symbol, Variable)]),
|
||||
|
@ -317,7 +317,7 @@ pub struct Proc<'a> {
|
|||
pub host_exposed_layouts: HostExposedLayouts<'a>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum HostExposedLayouts<'a> {
|
||||
NotHostExposed,
|
||||
HostExposed {
|
||||
|
@ -326,13 +326,13 @@ pub enum HostExposedLayouts<'a> {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum SelfRecursive {
|
||||
NotSelfRecursive,
|
||||
SelfRecursive(JoinPointId),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Parens {
|
||||
NotNeeded,
|
||||
InTypeParam,
|
||||
|
@ -1575,7 +1575,7 @@ impl<'a, 'i> Env<'a, 'i> {
|
|||
#[derive(Clone, Debug, PartialEq, Copy, Eq, Hash)]
|
||||
pub struct JoinPointId(pub Symbol);
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct Param<'a> {
|
||||
pub symbol: Symbol,
|
||||
pub borrow: bool,
|
||||
|
@ -1659,7 +1659,7 @@ pub enum Stmt<'a> {
|
|||
}
|
||||
|
||||
/// in the block below, symbol `scrutinee` is assumed be be of shape `tag_id`
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum BranchInfo<'a> {
|
||||
None,
|
||||
Constructor {
|
||||
|
@ -1702,7 +1702,7 @@ impl<'a> BranchInfo<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum ModifyRc {
|
||||
/// Increment a reference count
|
||||
Inc(Symbol, u64),
|
||||
|
@ -1848,7 +1848,7 @@ impl<'a> Call<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct CallSpecId {
|
||||
id: u32,
|
||||
}
|
||||
|
@ -1863,7 +1863,7 @@ impl CallSpecId {
|
|||
pub const BACKEND_DUMMY: Self = Self { id: 0 };
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct UpdateModeId {
|
||||
id: u32,
|
||||
}
|
||||
|
@ -1878,7 +1878,7 @@ impl UpdateModeId {
|
|||
pub const BACKEND_DUMMY: Self = Self { id: 0 };
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct UpdateModeIds {
|
||||
next: u32,
|
||||
}
|
||||
|
@ -1895,7 +1895,7 @@ impl UpdateModeIds {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum CallType<'a> {
|
||||
ByName {
|
||||
name: LambdaName<'a>,
|
||||
|
@ -1914,7 +1914,7 @@ pub enum CallType<'a> {
|
|||
HigherOrder(&'a HigherOrderLowLevel<'a>),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct PassedFunction<'a> {
|
||||
/// name of the top-level function that is passed as an argument
|
||||
/// e.g. in `List.map xs Num.abs` this would be `Num.abs`
|
||||
|
@ -1931,7 +1931,7 @@ pub struct PassedFunction<'a> {
|
|||
pub owns_captured_environment: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct HigherOrderLowLevel<'a> {
|
||||
pub op: crate::low_level::HigherOrder,
|
||||
|
||||
|
@ -7009,7 +7009,7 @@ fn substitute_in_call<'a>(
|
|||
} => substitute(subs, name.name()).map(|new| CallType::ByName {
|
||||
name: name.replace_name(new),
|
||||
arg_layouts,
|
||||
ret_layout: *ret_layout,
|
||||
ret_layout,
|
||||
specialization_id: *specialization_id,
|
||||
}),
|
||||
CallType::Foreign { .. } => None,
|
||||
|
@ -7158,7 +7158,7 @@ fn substitute_in_expr<'a>(
|
|||
} => match substitute(subs, *structure) {
|
||||
Some(structure) => Some(StructAtIndex {
|
||||
index: *index,
|
||||
field_layouts: *field_layouts,
|
||||
field_layouts,
|
||||
structure,
|
||||
}),
|
||||
None => None,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use roc_module::symbol::Symbol;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum HigherOrder {
|
||||
ListMap {
|
||||
xs: Symbol,
|
||||
|
|
|
@ -128,7 +128,7 @@ fn function_s<'a, 'i>(
|
|||
remainder,
|
||||
} => {
|
||||
let id = *id;
|
||||
let body: &Stmt = *body;
|
||||
let body: &Stmt = body;
|
||||
let new_body = function_s(env, w, c, body);
|
||||
|
||||
let new_join = if std::ptr::eq(body, new_body) || body == new_body {
|
||||
|
@ -179,7 +179,7 @@ fn function_s<'a, 'i>(
|
|||
arena.alloc(new_switch)
|
||||
}
|
||||
Refcounting(op, continuation) => {
|
||||
let continuation: &Stmt = *continuation;
|
||||
let continuation: &Stmt = continuation;
|
||||
let new_continuation = function_s(env, w, c, continuation);
|
||||
|
||||
if std::ptr::eq(continuation, new_continuation) || continuation == new_continuation {
|
||||
|
@ -198,7 +198,7 @@ fn function_s<'a, 'i>(
|
|||
layouts,
|
||||
remainder,
|
||||
} => {
|
||||
let continuation: &Stmt = *remainder;
|
||||
let continuation: &Stmt = remainder;
|
||||
let new_continuation = function_s(env, w, c, continuation);
|
||||
|
||||
if std::ptr::eq(continuation, new_continuation) || continuation == new_continuation {
|
||||
|
@ -223,7 +223,7 @@ fn function_s<'a, 'i>(
|
|||
layouts,
|
||||
remainder,
|
||||
} => {
|
||||
let continuation: &Stmt = *remainder;
|
||||
let continuation: &Stmt = remainder;
|
||||
let new_continuation = function_s(env, w, c, continuation);
|
||||
|
||||
if std::ptr::eq(continuation, new_continuation) || continuation == new_continuation {
|
||||
|
|
|
@ -109,7 +109,7 @@ pub enum StrSegment<'a> {
|
|||
Interpolated(Loc<&'a Expr<'a>>), // e.g. (name) in "Hi, \(name)!"
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum EscapedChar {
|
||||
Newline, // \n
|
||||
Tab, // \t
|
||||
|
@ -581,7 +581,7 @@ pub enum AssignedField<'a, Val> {
|
|||
Malformed(&'a str),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum CommentOrNewline<'a> {
|
||||
Newline,
|
||||
LineComment(&'a str),
|
||||
|
@ -615,6 +615,14 @@ impl<'a> CommentOrNewline<'a> {
|
|||
DocComment(comment_str) => format!("##{}", comment_str),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn comment_str(&'a self) -> Option<&'a str> {
|
||||
match self {
|
||||
CommentOrNewline::LineComment(s) => Some(*s),
|
||||
CommentOrNewline::DocComment(s) => Some(*s),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
|
@ -880,7 +888,7 @@ impl<'a, T> Collection<'a, T> {
|
|||
|
||||
pub fn final_comments(&self) -> &'a [CommentOrNewline<'a>] {
|
||||
if let Some(final_comments) = self.final_comments {
|
||||
*final_comments
|
||||
final_comments
|
||||
} else {
|
||||
&[]
|
||||
}
|
||||
|
|
|
@ -56,13 +56,13 @@ pub struct ExprParseOptions {
|
|||
/// This is usually true, but false within list/record literals
|
||||
/// because the comma separating backpassing arguments conflicts
|
||||
/// with the comma separating literal elements
|
||||
accept_multi_backpassing: bool,
|
||||
pub accept_multi_backpassing: bool,
|
||||
|
||||
/// Check for the `->` token, and raise an error if found
|
||||
/// This is usually true, but false in if-guards
|
||||
///
|
||||
/// > Just foo if foo == 2 -> ...
|
||||
check_for_arrow: bool,
|
||||
pub check_for_arrow: bool,
|
||||
}
|
||||
|
||||
impl Default for ExprParseOptions {
|
||||
|
@ -346,6 +346,7 @@ fn parse_expr_start<'a>(
|
|||
loc!(move |a, s, m| parse_expr_operator_chain(m, options, a, s)),
|
||||
fail_expr_start_e()
|
||||
]
|
||||
.trace("expr_start")
|
||||
.parse(arena, state, min_indent)
|
||||
}
|
||||
|
||||
|
@ -546,7 +547,7 @@ fn numeric_negate_expression<'a, T>(
|
|||
expr: Loc<Expr<'a>>,
|
||||
spaces: &'a [CommentOrNewline<'a>],
|
||||
) -> Loc<Expr<'a>> {
|
||||
debug_assert_eq!(state.bytes().get(0), Some(&b'-'));
|
||||
debug_assert_eq!(state.bytes().first(), Some(&b'-'));
|
||||
// for overflow reasons, we must make the unary minus part of the number literal.
|
||||
let start = state.pos();
|
||||
let region = Region::new(start, expr.region.end());
|
||||
|
@ -895,6 +896,65 @@ pub fn parse_single_def<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
// This is a macro only because trying to make it be a function caused lifetime issues.
|
||||
#[macro_export]
|
||||
macro_rules! join_ann_to_body {
|
||||
($arena:expr, $loc_pattern:expr, $loc_def_expr:expr, $ann_pattern:expr, $ann_type:expr, $spaces_before_current:expr, $region:expr) => {{
|
||||
// join this body with the preceding annotation
|
||||
|
||||
let value_def = ValueDef::AnnotatedBody {
|
||||
ann_pattern: $arena.alloc(*$ann_pattern),
|
||||
ann_type: $arena.alloc(*$ann_type),
|
||||
comment: $spaces_before_current
|
||||
.first()
|
||||
.and_then($crate::ast::CommentOrNewline::comment_str),
|
||||
body_pattern: $arena.alloc($loc_pattern),
|
||||
body_expr: *$arena.alloc($loc_def_expr),
|
||||
};
|
||||
|
||||
(
|
||||
value_def,
|
||||
roc_region::all::Region::span_across(&$ann_pattern.region, &$region),
|
||||
)
|
||||
}};
|
||||
}
|
||||
|
||||
// This is a macro only because trying to make it be a function caused lifetime issues.
|
||||
#[macro_export]
|
||||
macro_rules! join_alias_to_body {
|
||||
($arena:expr, $loc_pattern:expr, $loc_def_expr:expr, $header:expr, $ann_type:expr, $spaces_before_current:expr, $region:expr) => {{
|
||||
use roc_region::all::Region;
|
||||
|
||||
// This is a case like
|
||||
// UserId x : [UserId Int]
|
||||
// UserId x = UserId 42
|
||||
// We optimistically parsed the first line as an alias; we now turn it
|
||||
// into an annotation.
|
||||
|
||||
let loc_name = $arena.alloc($header.name.map(|x| Pattern::Tag(x)));
|
||||
let ann_pattern = Pattern::Apply(loc_name, $header.vars);
|
||||
|
||||
let vars_region = Region::across_all($header.vars.iter().map(|v| &v.region));
|
||||
let region_ann_pattern = Region::span_across(&loc_name.region, &vars_region);
|
||||
let loc_ann_pattern = Loc::at(region_ann_pattern, ann_pattern);
|
||||
|
||||
let value_def = ValueDef::AnnotatedBody {
|
||||
ann_pattern: $arena.alloc(loc_ann_pattern),
|
||||
ann_type: $arena.alloc(*$ann_type),
|
||||
comment: $spaces_before_current
|
||||
.first()
|
||||
.and_then($crate::ast::CommentOrNewline::comment_str),
|
||||
body_pattern: $arena.alloc($loc_pattern),
|
||||
body_expr: *$arena.alloc($loc_def_expr),
|
||||
};
|
||||
|
||||
(
|
||||
value_def,
|
||||
Region::span_across(&$header.name.region, &$region),
|
||||
)
|
||||
}};
|
||||
}
|
||||
|
||||
fn parse_defs_end<'a>(
|
||||
_options: ExprParseOptions,
|
||||
min_indent: u32,
|
||||
|
@ -919,94 +979,64 @@ fn parse_defs_end<'a>(
|
|||
Either::Second(value_def) => {
|
||||
// If we got a ValueDef::Body, check if a type annotation preceded it.
|
||||
// If so, we may need to combine them into an AnnotatedBody.
|
||||
match value_def {
|
||||
let joined = match value_def {
|
||||
ValueDef::Body(loc_pattern, loc_def_expr)
|
||||
if spaces_before_current.len() <= 1 =>
|
||||
{
|
||||
let region =
|
||||
Region::span_across(&loc_pattern.region, &loc_def_expr.region);
|
||||
|
||||
let comment = match spaces_before_current.get(0) {
|
||||
Some(CommentOrNewline::LineComment(s)) => Some(*s),
|
||||
Some(CommentOrNewline::DocComment(s)) => Some(*s),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
match defs.last() {
|
||||
Some(Err(ValueDef::Annotation(ann_pattern, ann_type))) => {
|
||||
// join this body with the preceding annotation
|
||||
|
||||
let value_def = ValueDef::AnnotatedBody {
|
||||
ann_pattern: arena.alloc(*ann_pattern),
|
||||
ann_type: arena.alloc(*ann_type),
|
||||
comment,
|
||||
body_pattern: arena.alloc(loc_pattern),
|
||||
body_expr: *arena.alloc(loc_def_expr),
|
||||
};
|
||||
|
||||
let region =
|
||||
Region::span_across(&ann_pattern.region, ®ion);
|
||||
let (value_def, region) = join_ann_to_body!(
|
||||
arena,
|
||||
loc_pattern,
|
||||
loc_def_expr,
|
||||
ann_pattern,
|
||||
ann_type,
|
||||
spaces_before_current,
|
||||
region
|
||||
);
|
||||
|
||||
defs.replace_with_value_def(
|
||||
defs.tags.len() - 1,
|
||||
value_def,
|
||||
region,
|
||||
)
|
||||
);
|
||||
|
||||
true
|
||||
}
|
||||
Some(Ok(TypeDef::Alias {
|
||||
header,
|
||||
ann: ann_type,
|
||||
})) => {
|
||||
// This is a case like
|
||||
// UserId x : [UserId Int]
|
||||
// UserId x = UserId 42
|
||||
// We optimistically parsed the first line as an alias; we now turn it
|
||||
// into an annotation.
|
||||
|
||||
let loc_name =
|
||||
arena.alloc(header.name.map(|x| Pattern::Tag(x)));
|
||||
let ann_pattern = Pattern::Apply(loc_name, header.vars);
|
||||
|
||||
let vars_region = Region::across_all(
|
||||
header.vars.iter().map(|v| &v.region),
|
||||
let (value_def, region) = join_alias_to_body!(
|
||||
arena,
|
||||
loc_pattern,
|
||||
loc_def_expr,
|
||||
header,
|
||||
ann_type,
|
||||
spaces_before_current,
|
||||
region
|
||||
);
|
||||
let region_ann_pattern =
|
||||
Region::span_across(&loc_name.region, &vars_region);
|
||||
let loc_ann_pattern =
|
||||
Loc::at(region_ann_pattern, ann_pattern);
|
||||
|
||||
let value_def = ValueDef::AnnotatedBody {
|
||||
ann_pattern: arena.alloc(loc_ann_pattern),
|
||||
ann_type: arena.alloc(*ann_type),
|
||||
comment,
|
||||
body_pattern: arena.alloc(loc_pattern),
|
||||
body_expr: *arena.alloc(loc_def_expr),
|
||||
};
|
||||
|
||||
let region =
|
||||
Region::span_across(&header.name.region, ®ion);
|
||||
|
||||
defs.replace_with_value_def(
|
||||
defs.tags.len() - 1,
|
||||
value_def,
|
||||
region,
|
||||
)
|
||||
}
|
||||
_ => {
|
||||
// the previous and current def can't be joined up
|
||||
defs.push_value_def(
|
||||
value_def,
|
||||
region,
|
||||
spaces_before_current,
|
||||
&[],
|
||||
);
|
||||
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// the previous and current def can't be joined up
|
||||
defs.push_value_def(value_def, region, spaces_before_current, &[]);
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
if !joined {
|
||||
// the previous and current def can't be joined up
|
||||
defs.push_value_def(value_def, region, spaces_before_current, &[]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1020,9 +1050,9 @@ fn parse_defs_end<'a>(
|
|||
}
|
||||
|
||||
pub struct SingleDef<'a> {
|
||||
type_or_value: Either<TypeDef<'a>, ValueDef<'a>>,
|
||||
region: Region,
|
||||
spaces_before: &'a [CommentOrNewline<'a>],
|
||||
pub type_or_value: Either<TypeDef<'a>, ValueDef<'a>>,
|
||||
pub region: Region,
|
||||
pub spaces_before: &'a [CommentOrNewline<'a>],
|
||||
}
|
||||
|
||||
fn parse_defs_expr<'a>(
|
||||
|
@ -1904,7 +1934,7 @@ fn expr_to_pattern_help<'a>(arena: &'a Bump, expr: &Expr<'a>) -> Result<Pattern<
|
|||
| Expr::UnaryOp(_, _) => Err(()),
|
||||
|
||||
Expr::Str(string) => Ok(Pattern::StrLiteral(*string)),
|
||||
Expr::SingleQuote(string) => Ok(Pattern::SingleQuote(*string)),
|
||||
Expr::SingleQuote(string) => Ok(Pattern::SingleQuote(string)),
|
||||
Expr::MalformedIdent(string, _problem) => Ok(Pattern::Malformed(string)),
|
||||
}
|
||||
}
|
||||
|
@ -2076,10 +2106,10 @@ mod when {
|
|||
parser::keyword_e(keyword::IS, EWhen::Is)
|
||||
)
|
||||
),
|
||||
move |arena, state, progress, (case_indent, loc_condition), min_indent| {
|
||||
move |arena, state, _progress, (case_indent, loc_condition), min_indent| {
|
||||
if case_indent < min_indent {
|
||||
return Err((
|
||||
progress,
|
||||
MadeProgress,
|
||||
// TODO maybe pass case_indent here?
|
||||
EWhen::PatternAlignment(5, state.pos()),
|
||||
state,
|
||||
|
@ -2089,15 +2119,18 @@ mod when {
|
|||
// Everything in the branches must be indented at least as much as the case itself.
|
||||
let min_indent = case_indent;
|
||||
|
||||
let (p1, branches, state) = branches(options).parse(arena, state, min_indent)?;
|
||||
let (_p1, branches, state) = branches(options)
|
||||
.parse(arena, state, min_indent)
|
||||
.map_err(|(_p, e, s)| (MadeProgress, e, s))?;
|
||||
|
||||
Ok((
|
||||
progress.or(p1),
|
||||
MadeProgress,
|
||||
Expr::When(arena.alloc(loc_condition), branches.into_bump_slice()),
|
||||
state,
|
||||
))
|
||||
},
|
||||
)
|
||||
.trace("when")
|
||||
}
|
||||
|
||||
/// Parsing when with indentation.
|
||||
|
|
|
@ -52,7 +52,7 @@ pub enum VersionComparison {
|
|||
DisallowsEqual,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
pub struct PackageName<'a>(&'a str);
|
||||
|
||||
impl<'a> PackageName<'a> {
|
||||
|
@ -160,7 +160,7 @@ pub struct HostedHeader<'a> {
|
|||
pub after_with: &'a [CommentOrNewline<'a>],
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum To<'a> {
|
||||
ExistingPackage(&'a str),
|
||||
NewPackage(PackageName<'a>),
|
||||
|
@ -262,7 +262,7 @@ pub struct TypedIdent<'a> {
|
|||
pub ann: Loc<TypeAnnotation<'a>>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct PackageEntry<'a> {
|
||||
pub shorthand: &'a str,
|
||||
pub spaces_after_shorthand: &'a [CommentOrNewline<'a>],
|
||||
|
|
|
@ -737,6 +737,7 @@ pub trait Parser<'a, Output, Error> {
|
|||
) -> ParseResult<'a, Output, Error>;
|
||||
|
||||
#[cfg(not(feature = "parse_debug_trace"))]
|
||||
#[inline(always)]
|
||||
fn trace(self, _message: &'static str) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
|
@ -789,7 +790,7 @@ impl<'a, O: std::fmt::Debug, E: std::fmt::Debug, P: Parser<'a, O, E>> Parser<'a,
|
|||
where
|
||||
E: 'a,
|
||||
{
|
||||
fn parse(&self, arena: &'a Bump, state: State<'a>) -> ParseResult<'a, O, E> {
|
||||
fn parse(&self, arena: &'a Bump, state: State<'a>, min_indent: u32) -> ParseResult<'a, O, E> {
|
||||
use std::cell::RefCell;
|
||||
|
||||
thread_local! {
|
||||
|
@ -803,7 +804,7 @@ where
|
|||
let cur_indent = INDENT.with(|i| *i.borrow());
|
||||
|
||||
println!(
|
||||
"{:>5?}: {}{:<50}",
|
||||
"{:<5?}: {}{:<50}",
|
||||
state.pos(),
|
||||
&indent_text[..cur_indent * 2],
|
||||
self.message
|
||||
|
@ -1379,11 +1380,12 @@ macro_rules! and {
|
|||
macro_rules! one_of {
|
||||
($p1:expr, $p2:expr) => {
|
||||
move |arena: &'a bumpalo::Bump, state: $crate::state::State<'a>, min_indent: u32| {
|
||||
let original_state = state.clone();
|
||||
|
||||
match $p1.parse(arena, state, min_indent) {
|
||||
valid @ Ok(_) => valid,
|
||||
Err((MadeProgress, fail, state)) => Err((MadeProgress, fail, state)),
|
||||
Err((NoProgress, _, state)) => $p2.parse(arena, state, min_indent),
|
||||
Err((NoProgress, _, _)) => $p2.parse(arena, original_state, min_indent),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -122,10 +122,7 @@ pub fn parse_single_quote<'a>() -> impl Parser<'a, &'a str, EString<'a>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn consume_indent<'a>(
|
||||
mut state: State<'a>,
|
||||
mut indent: u32,
|
||||
) -> Result<State, (Progress, EString<'a>, State<'a>)> {
|
||||
fn consume_indent(mut state: State, mut indent: u32) -> Result<State, (Progress, EString, State)> {
|
||||
while indent > 0 {
|
||||
match state.bytes().first() {
|
||||
Some(b' ') => {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Expr(When(Arrow(@24), @24), @0)
|
|
@ -0,0 +1,6 @@
|
|||
when Just 4 is
|
||||
Just when ->
|
||||
4
|
||||
|
||||
_ ->
|
||||
2
|
|
@ -0,0 +1 @@
|
|||
Expr(When(Arrow(@26), @20), @0)
|
|
@ -0,0 +1,3 @@
|
|||
when 5 is
|
||||
1 -> 2
|
||||
_
|
|
@ -124,6 +124,8 @@ mod test_parse {
|
|||
fail/lambda_missing_indent.expr,
|
||||
fail/type_argument_no_arrow.expr,
|
||||
fail/type_double_comma.expr,
|
||||
fail/when_missing_arrow.expr,
|
||||
fail/pattern_binds_keyword.expr,
|
||||
pass/ability_demand_signature_is_multiline.expr,
|
||||
pass/ability_multi_line.expr,
|
||||
pass/ability_single_line.expr,
|
||||
|
|
|
@ -7,19 +7,19 @@ use roc_parse::pattern::PatternType;
|
|||
use roc_region::all::{Loc, Region};
|
||||
use roc_types::types::AliasKind;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct CycleEntry {
|
||||
pub symbol: Symbol,
|
||||
pub symbol_region: Region,
|
||||
pub expr_region: Region,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum BadPattern {
|
||||
Unsupported(PatternType),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum ShadowKind {
|
||||
Variable,
|
||||
Alias(Symbol),
|
||||
|
@ -28,7 +28,7 @@ pub enum ShadowKind {
|
|||
}
|
||||
|
||||
/// Problems that can occur in the course of canonicalization.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Problem {
|
||||
UnusedDef(Symbol, Region),
|
||||
UnusedImport(Symbol, Region),
|
||||
|
@ -190,13 +190,157 @@ pub enum Problem {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
impl Problem {
|
||||
/// Returns a Region value from the Problem, if possible.
|
||||
/// Some problems have more than one region; in those cases,
|
||||
/// this tries to pick the one that's closest to the original
|
||||
/// definition site, since that's what the REPL uses this for:
|
||||
/// filtering out errors and warnings from wrapped defs based
|
||||
/// on their Region being outside the expression currently being evaluated.
|
||||
pub fn region(&self) -> Option<Region> {
|
||||
match self {
|
||||
Problem::UnusedDef(_, region)
|
||||
| Problem::Shadowing {
|
||||
original_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::UnusedImport(_, region)
|
||||
| Problem::UnusedModuleImport(_, region)
|
||||
| Problem::UnknownGeneratesWith(Loc { region, .. })
|
||||
| Problem::UnusedArgument(_, _, _, region)
|
||||
| Problem::UnusedBranchDef(_, region)
|
||||
| Problem::PrecedenceProblem(PrecedenceProblem::BothNonAssociative(region, _, _))
|
||||
| Problem::UnsupportedPattern(_, region)
|
||||
| Problem::CyclicAlias(_, region, _, _)
|
||||
| Problem::PhantomTypeArgument {
|
||||
variable_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::UnboundTypeVariable {
|
||||
one_occurrence: region,
|
||||
..
|
||||
}
|
||||
| Problem::DuplicateRecordFieldValue {
|
||||
record_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::DuplicateRecordFieldType {
|
||||
record_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::InvalidOptionalValue {
|
||||
record_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::DuplicateTag {
|
||||
tag_union_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::RuntimeError(RuntimeError::Shadowing {
|
||||
original_region: region,
|
||||
..
|
||||
})
|
||||
| Problem::RuntimeError(RuntimeError::InvalidOptionalValue {
|
||||
record_region: region,
|
||||
..
|
||||
})
|
||||
| Problem::RuntimeError(RuntimeError::UnsupportedPattern(region))
|
||||
| Problem::RuntimeError(RuntimeError::MalformedPattern(_, region))
|
||||
| Problem::RuntimeError(RuntimeError::LookupNotInScope(Loc { region, .. }, _))
|
||||
| Problem::RuntimeError(RuntimeError::OpaqueNotDefined {
|
||||
usage: Loc { region, .. },
|
||||
..
|
||||
})
|
||||
| Problem::RuntimeError(RuntimeError::OpaqueOutsideScope {
|
||||
referenced_region: region,
|
||||
..
|
||||
})
|
||||
| Problem::RuntimeError(RuntimeError::OpaqueNotApplied(Loc { region, .. }))
|
||||
| Problem::RuntimeError(RuntimeError::OpaqueAppliedToMultipleArgs(region))
|
||||
| Problem::RuntimeError(RuntimeError::ValueNotExposed { region, .. })
|
||||
| Problem::RuntimeError(RuntimeError::ModuleNotImported { region, .. })
|
||||
| Problem::RuntimeError(RuntimeError::InvalidPrecedence(_, region))
|
||||
| Problem::RuntimeError(RuntimeError::MalformedIdentifier(_, _, region))
|
||||
| Problem::RuntimeError(RuntimeError::MalformedTypeName(_, region))
|
||||
| Problem::RuntimeError(RuntimeError::MalformedClosure(region))
|
||||
| Problem::RuntimeError(RuntimeError::InvalidRecordUpdate { region })
|
||||
| Problem::RuntimeError(RuntimeError::InvalidFloat(_, region, _))
|
||||
| Problem::RuntimeError(RuntimeError::InvalidInt(_, _, region, _))
|
||||
| Problem::RuntimeError(RuntimeError::InvalidInterpolation(region))
|
||||
| Problem::RuntimeError(RuntimeError::InvalidHexadecimal(region))
|
||||
| Problem::RuntimeError(RuntimeError::InvalidUnicodeCodePt(region))
|
||||
| Problem::RuntimeError(RuntimeError::EmptySingleQuote(region))
|
||||
| Problem::RuntimeError(RuntimeError::MultipleCharsInSingleQuote(region))
|
||||
| Problem::RuntimeError(RuntimeError::DegenerateBranch(region))
|
||||
| Problem::InvalidAliasRigid { region, .. }
|
||||
| Problem::InvalidInterpolation(region)
|
||||
| Problem::InvalidHexadecimal(region)
|
||||
| Problem::InvalidUnicodeCodePt(region)
|
||||
| Problem::NestedDatatype {
|
||||
def_region: region, ..
|
||||
}
|
||||
| Problem::InvalidExtensionType { region, .. }
|
||||
| Problem::AbilityHasTypeVariables {
|
||||
variables_region: region,
|
||||
..
|
||||
}
|
||||
| Problem::HasClauseIsNotAbility { region }
|
||||
| Problem::IllegalHasClause { region }
|
||||
| Problem::DuplicateHasAbility { region, .. }
|
||||
| Problem::AbilityMemberMissingHasClause { region, .. }
|
||||
| Problem::AbilityMemberMultipleBoundVars {
|
||||
span_has_clauses: region,
|
||||
..
|
||||
}
|
||||
| Problem::AbilityNotOnToplevel { region }
|
||||
| Problem::AbilityUsedAsType(_, _, region)
|
||||
| Problem::NestedSpecialization(_, region)
|
||||
| Problem::IllegalDerivedAbility(region)
|
||||
| Problem::ImplementationNotFound { region, .. }
|
||||
| Problem::NotAnAbilityMember { region, .. }
|
||||
| Problem::OptionalAbilityImpl { region, .. }
|
||||
| Problem::QualifiedAbilityImpl { region }
|
||||
| Problem::AbilityImplNotIdent { region }
|
||||
| Problem::DuplicateImpl {
|
||||
original: region, ..
|
||||
}
|
||||
| Problem::NotAnAbility(region)
|
||||
| Problem::ImplementsNonRequired { region, .. }
|
||||
| Problem::DoesNotImplementAbility { region, .. }
|
||||
| Problem::NoIdentifiersIntroduced(region)
|
||||
| Problem::OverloadedSpecialization {
|
||||
overload: region, ..
|
||||
}
|
||||
| Problem::NotBoundInAllPatterns { region, .. }
|
||||
| Problem::SignatureDefMismatch {
|
||||
def_pattern: region,
|
||||
..
|
||||
}
|
||||
| Problem::MultipleListRestPattern { region }
|
||||
| Problem::UnnecessaryOutputWildcard { region } => Some(*region),
|
||||
Problem::RuntimeError(RuntimeError::CircularDef(cycle_entries))
|
||||
| Problem::BadRecursion(cycle_entries) => {
|
||||
cycle_entries.first().map(|entry| entry.expr_region)
|
||||
}
|
||||
Problem::RuntimeError(RuntimeError::UnresolvedTypeVar)
|
||||
| Problem::RuntimeError(RuntimeError::ErroneousType)
|
||||
| Problem::RuntimeError(RuntimeError::NonExhaustivePattern)
|
||||
| Problem::RuntimeError(RuntimeError::NoImplementation)
|
||||
| Problem::RuntimeError(RuntimeError::VoidValue)
|
||||
| Problem::RuntimeError(RuntimeError::ExposedButNotDefined(_))
|
||||
| Problem::RuntimeError(RuntimeError::NoImplementationNamed { .. })
|
||||
| Problem::ExposedButNotDefined(_) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum ExtensionTypeKind {
|
||||
Record,
|
||||
TagUnion,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum PrecedenceProblem {
|
||||
BothNonAssociative(Region, Loc<BinOp>, Loc<BinOp>),
|
||||
}
|
||||
|
@ -245,7 +389,7 @@ pub enum FloatErrorKind {
|
|||
IntSuffix,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum RuntimeError {
|
||||
Shadowing {
|
||||
original_region: Region,
|
||||
|
@ -368,7 +512,7 @@ impl RuntimeError {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum MalformedPatternProblem {
|
||||
MalformedInt,
|
||||
MalformedFloat,
|
||||
|
|
|
@ -133,7 +133,8 @@ impl Position {
|
|||
|
||||
impl Debug for Position {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "@{}", self.offset)
|
||||
write!(f, "@")?;
|
||||
self.offset.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ pub enum AbilityImplError {
|
|||
}
|
||||
|
||||
/// Indexes a requested deriving of an ability for an opaque type.
|
||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct RequestedDeriveKey {
|
||||
pub opaque: Symbol,
|
||||
pub ability: Symbol,
|
||||
|
|
|
@ -31,7 +31,7 @@ pub enum TypeError {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum Unfulfilled {
|
||||
/// No claimed implementation of an ability for an opaque type.
|
||||
OpaqueDoesNotImplement { typ: Symbol, ability: Symbol },
|
||||
|
@ -51,7 +51,7 @@ pub enum Unfulfilled {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum UnderivableReason {
|
||||
NotABuiltin,
|
||||
/// The surface type is not derivable
|
||||
|
@ -60,7 +60,7 @@ pub enum UnderivableReason {
|
|||
NestedNotDerivable(ErrorType, NotDerivableContext),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum NotDerivableContext {
|
||||
NoContext,
|
||||
Function,
|
||||
|
@ -70,12 +70,12 @@ pub enum NotDerivableContext {
|
|||
Eq(NotDerivableEq),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum NotDerivableDecode {
|
||||
OptionalRecordField(Lowercase),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub enum NotDerivableEq {
|
||||
FloatingPoint,
|
||||
}
|
||||
|
|
|
@ -342,11 +342,11 @@ fn annotate_with_debug_info<'ctx>(
|
|||
let app_bc_file = "/tmp/roc-debugir.bc";
|
||||
|
||||
// write the ll code to a file, so we can modify it
|
||||
module.print_to_file(&app_ll_file).unwrap();
|
||||
module.print_to_file(app_ll_file).unwrap();
|
||||
|
||||
// run the debugir https://github.com/vaivaswatha/debugir tool
|
||||
match Command::new("debugir")
|
||||
.args(&["-instnamer", app_ll_file])
|
||||
.args(["-instnamer", app_ll_file])
|
||||
.output()
|
||||
{
|
||||
Ok(_) => {}
|
||||
|
@ -362,11 +362,11 @@ fn annotate_with_debug_info<'ctx>(
|
|||
}
|
||||
|
||||
Command::new("llvm-as")
|
||||
.args(&[app_dbg_ll_file, "-o", app_bc_file])
|
||||
.args([app_dbg_ll_file, "-o", app_bc_file])
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
inkwell::module::Module::parse_bitcode_from_path(&app_bc_file, context).unwrap()
|
||||
inkwell::module::Module::parse_bitcode_from_path(app_bc_file, context).unwrap()
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
@ -460,7 +460,7 @@ fn llvm_module_to_wasm_file(
|
|||
|
||||
let output = zig()
|
||||
.current_dir(dir_path)
|
||||
.args(&[
|
||||
.args([
|
||||
"wasm-ld",
|
||||
concat!(env!("OUT_DIR"), "/wasm_test_platform.wasm"),
|
||||
test_a_path.to_str().unwrap(),
|
||||
|
|
|
@ -11,7 +11,7 @@ path = "src/tests.rs"
|
|||
|
||||
[dev-dependencies]
|
||||
roc_collections = { path = "../collections" }
|
||||
roc_module = { path = "../module" }
|
||||
roc_module = { path = "../module", features = ["debug-symbols"] }
|
||||
roc_builtins = { path = "../builtins" }
|
||||
roc_load = { path = "../load" }
|
||||
roc_can = { path = "../can" }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
procedure List.5 (#Attr.2, #Attr.3):
|
||||
let List.380 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3;
|
||||
let List.409 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3;
|
||||
decref #Attr.2;
|
||||
ret List.380;
|
||||
ret List.409;
|
||||
|
||||
procedure Test.2 (Test.3):
|
||||
let Test.7 : {} = Struct {};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
procedure List.5 (#Attr.2, #Attr.3):
|
||||
let List.380 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3;
|
||||
let List.409 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3;
|
||||
decref #Attr.2;
|
||||
ret List.380;
|
||||
ret List.409;
|
||||
|
||||
procedure Test.2 (Test.3):
|
||||
let Test.7 : {} = Struct {};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.258 : I128 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
let Num.257 : I128 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.6 : I128 = 18446744073709551616i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : U128 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : U128 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : U128 = 170141183460469231731687303715884105728u128;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : U64 = 9999999999999999999i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure Test.1 (Test.5):
|
||||
let Test.2 : I64 = 41i64;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
procedure Dict.1 ():
|
||||
let Dict.100 : List {[], []} = Array [];
|
||||
ret Dict.100;
|
||||
let Dict.318 : List {[], []} = Array [];
|
||||
ret Dict.318;
|
||||
|
||||
procedure Dict.7 (Dict.94):
|
||||
let Dict.99 : U64 = CallByName List.6 Dict.94;
|
||||
ret Dict.99;
|
||||
procedure Dict.7 (Dict.312):
|
||||
let Dict.317 : U64 = CallByName List.6 Dict.312;
|
||||
ret Dict.317;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : List {[], []} = CallByName Dict.1;
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
procedure Bool.1 ():
|
||||
let Bool.11 : Int1 = false;
|
||||
ret Bool.11;
|
||||
let Bool.23 : Int1 = false;
|
||||
ret Bool.23;
|
||||
|
||||
procedure List.2 (List.90, List.91):
|
||||
let List.386 : U64 = CallByName List.6 List.90;
|
||||
let List.382 : Int1 = CallByName Num.22 List.91 List.386;
|
||||
if List.382 then
|
||||
let List.384 : {} = CallByName List.66 List.90 List.91;
|
||||
let List.383 : [C {}, C {}] = TagId(1) List.384;
|
||||
ret List.383;
|
||||
procedure List.2 (List.94, List.95):
|
||||
let List.415 : U64 = CallByName List.6 List.94;
|
||||
let List.411 : Int1 = CallByName Num.22 List.95 List.415;
|
||||
if List.411 then
|
||||
let List.413 : {} = CallByName List.66 List.94 List.95;
|
||||
let List.412 : [C {}, C {}] = TagId(1) List.413;
|
||||
ret List.412;
|
||||
else
|
||||
let List.381 : {} = Struct {};
|
||||
let List.380 : [C {}, C {}] = TagId(0) List.381;
|
||||
ret List.380;
|
||||
let List.410 : {} = Struct {};
|
||||
let List.409 : [C {}, C {}] = TagId(0) List.410;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.387 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.387;
|
||||
let List.416 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.416;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.385 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.385;
|
||||
let List.414 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.414;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.2 (Test.5):
|
||||
let Test.17 : Str = "bar";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
procedure List.4 (List.101, List.102):
|
||||
let List.383 : U64 = 1i64;
|
||||
let List.381 : List U8 = CallByName List.70 List.101 List.383;
|
||||
let List.380 : List U8 = CallByName List.71 List.381 List.102;
|
||||
ret List.380;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.412 : U64 = 1i64;
|
||||
let List.410 : List U8 = CallByName List.70 List.105 List.412;
|
||||
let List.409 : List U8 = CallByName List.71 List.410 List.106;
|
||||
ret List.409;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.384 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
let List.413 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.382 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.382;
|
||||
let List.411 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.411;
|
||||
|
||||
procedure Test.23 (Test.24, Test.35, Test.22):
|
||||
let Test.37 : List U8 = CallByName List.4 Test.24 Test.22;
|
||||
|
|
|
@ -44,7 +44,7 @@ procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
|||
ret Encode.106;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.113 : List U8 = CallByName Json.113 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.113 : List U8 = CallByName Json.112 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.113;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
|
@ -52,11 +52,11 @@ procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
|||
ret Encode.115;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.125 : List U8 = CallByName Json.113 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.125 : List U8 = CallByName Json.112 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.125;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.128 : List U8 = CallByName Json.97 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.128 : List U8 = CallByName Json.96 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.128;
|
||||
|
||||
procedure Encode.25 (Encode.100, Encode.101):
|
||||
|
@ -66,284 +66,284 @@ procedure Encode.25 (Encode.100, Encode.101):
|
|||
ret Encode.103;
|
||||
|
||||
procedure Json.1 ():
|
||||
let Json.396 : {} = Struct {};
|
||||
ret Json.396;
|
||||
let Json.394 : {} = Struct {};
|
||||
ret Json.394;
|
||||
|
||||
procedure Json.113 (Json.114, Json.399, Json.112):
|
||||
let Json.432 : I32 = 123i64;
|
||||
let Json.431 : U8 = CallByName Num.123 Json.432;
|
||||
let Json.116 : List U8 = CallByName List.4 Json.114 Json.431;
|
||||
let Json.430 : U64 = CallByName List.6 Json.112;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.116, Json.430};
|
||||
let Json.408 : {} = Struct {};
|
||||
let Json.406 : {List U8, U64} = CallByName List.18 Json.112 Json.407 Json.408;
|
||||
dec Json.112;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.406;
|
||||
inc Json.118;
|
||||
dec Json.406;
|
||||
let Json.405 : I32 = 125i64;
|
||||
let Json.404 : U8 = CallByName Num.123 Json.405;
|
||||
let Json.403 : List U8 = CallByName List.4 Json.118 Json.404;
|
||||
ret Json.403;
|
||||
procedure Json.112 (Json.113, Json.397, Json.111):
|
||||
let Json.430 : I64 = 123i64;
|
||||
let Json.429 : U8 = CallByName Num.125 Json.430;
|
||||
let Json.115 : List U8 = CallByName List.4 Json.113 Json.429;
|
||||
let Json.428 : U64 = CallByName List.6 Json.111;
|
||||
let Json.405 : {List U8, U64} = Struct {Json.115, Json.428};
|
||||
let Json.406 : {} = Struct {};
|
||||
let Json.404 : {List U8, U64} = CallByName List.18 Json.111 Json.405 Json.406;
|
||||
dec Json.111;
|
||||
let Json.117 : List U8 = StructAtIndex 0 Json.404;
|
||||
inc Json.117;
|
||||
dec Json.404;
|
||||
let Json.403 : I64 = 125i64;
|
||||
let Json.402 : U8 = CallByName Num.125 Json.403;
|
||||
let Json.401 : List U8 = CallByName List.4 Json.117 Json.402;
|
||||
ret Json.401;
|
||||
|
||||
procedure Json.113 (Json.114, Json.399, Json.112):
|
||||
let Json.472 : I32 = 123i64;
|
||||
let Json.471 : U8 = CallByName Num.123 Json.472;
|
||||
let Json.116 : List U8 = CallByName List.4 Json.114 Json.471;
|
||||
let Json.470 : U64 = CallByName List.6 Json.112;
|
||||
let Json.447 : {List U8, U64} = Struct {Json.116, Json.470};
|
||||
let Json.448 : {} = Struct {};
|
||||
let Json.446 : {List U8, U64} = CallByName List.18 Json.112 Json.447 Json.448;
|
||||
dec Json.112;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.446;
|
||||
inc Json.118;
|
||||
dec Json.446;
|
||||
let Json.445 : I32 = 125i64;
|
||||
let Json.444 : U8 = CallByName Num.123 Json.445;
|
||||
let Json.443 : List U8 = CallByName List.4 Json.118 Json.444;
|
||||
ret Json.443;
|
||||
procedure Json.112 (Json.113, Json.397, Json.111):
|
||||
let Json.470 : I64 = 123i64;
|
||||
let Json.469 : U8 = CallByName Num.125 Json.470;
|
||||
let Json.115 : List U8 = CallByName List.4 Json.113 Json.469;
|
||||
let Json.468 : U64 = CallByName List.6 Json.111;
|
||||
let Json.445 : {List U8, U64} = Struct {Json.115, Json.468};
|
||||
let Json.446 : {} = Struct {};
|
||||
let Json.444 : {List U8, U64} = CallByName List.18 Json.111 Json.445 Json.446;
|
||||
dec Json.111;
|
||||
let Json.117 : List U8 = StructAtIndex 0 Json.444;
|
||||
inc Json.117;
|
||||
dec Json.444;
|
||||
let Json.443 : I64 = 125i64;
|
||||
let Json.442 : U8 = CallByName Num.125 Json.443;
|
||||
let Json.441 : List U8 = CallByName List.4 Json.117 Json.442;
|
||||
ret Json.441;
|
||||
|
||||
procedure Json.115 (Json.401, Json.402):
|
||||
let Json.121 : Str = StructAtIndex 0 Json.402;
|
||||
procedure Json.114 (Json.399, Json.400):
|
||||
let Json.120 : Str = StructAtIndex 0 Json.400;
|
||||
inc Json.120;
|
||||
let Json.121 : Str = StructAtIndex 1 Json.400;
|
||||
inc Json.121;
|
||||
let Json.122 : Str = StructAtIndex 1 Json.402;
|
||||
inc Json.122;
|
||||
dec Json.402;
|
||||
let Json.119 : List U8 = StructAtIndex 0 Json.401;
|
||||
inc Json.119;
|
||||
let Json.120 : U64 = StructAtIndex 1 Json.401;
|
||||
dec Json.401;
|
||||
let Json.429 : I32 = 34i64;
|
||||
let Json.428 : U8 = CallByName Num.123 Json.429;
|
||||
let Json.426 : List U8 = CallByName List.4 Json.119 Json.428;
|
||||
let Json.427 : List U8 = CallByName Str.12 Json.121;
|
||||
let Json.423 : List U8 = CallByName List.8 Json.426 Json.427;
|
||||
let Json.425 : I32 = 34i64;
|
||||
let Json.424 : U8 = CallByName Num.123 Json.425;
|
||||
let Json.420 : List U8 = CallByName List.4 Json.423 Json.424;
|
||||
let Json.422 : I32 = 58i64;
|
||||
let Json.421 : U8 = CallByName Num.123 Json.422;
|
||||
let Json.418 : List U8 = CallByName List.4 Json.420 Json.421;
|
||||
let Json.419 : {} = Struct {};
|
||||
let Json.123 : List U8 = CallByName Encode.23 Json.418 Json.122 Json.419;
|
||||
joinpoint Json.413 Json.124:
|
||||
let Json.411 : U64 = 1i64;
|
||||
let Json.410 : U64 = CallByName Num.20 Json.120 Json.411;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.124, Json.410};
|
||||
ret Json.409;
|
||||
dec Json.400;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.399;
|
||||
inc Json.118;
|
||||
let Json.119 : U64 = StructAtIndex 1 Json.399;
|
||||
dec Json.399;
|
||||
let Json.427 : I64 = 34i64;
|
||||
let Json.426 : U8 = CallByName Num.125 Json.427;
|
||||
let Json.424 : List U8 = CallByName List.4 Json.118 Json.426;
|
||||
let Json.425 : List U8 = CallByName Str.12 Json.120;
|
||||
let Json.421 : List U8 = CallByName List.8 Json.424 Json.425;
|
||||
let Json.423 : I64 = 34i64;
|
||||
let Json.422 : U8 = CallByName Num.125 Json.423;
|
||||
let Json.418 : List U8 = CallByName List.4 Json.421 Json.422;
|
||||
let Json.420 : I64 = 58i64;
|
||||
let Json.419 : U8 = CallByName Num.125 Json.420;
|
||||
let Json.416 : List U8 = CallByName List.4 Json.418 Json.419;
|
||||
let Json.417 : {} = Struct {};
|
||||
let Json.122 : List U8 = CallByName Encode.23 Json.416 Json.121 Json.417;
|
||||
joinpoint Json.411 Json.123:
|
||||
let Json.409 : U64 = 1i64;
|
||||
let Json.408 : U64 = CallByName Num.20 Json.119 Json.409;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.123, Json.408};
|
||||
ret Json.407;
|
||||
in
|
||||
let Json.417 : U64 = 1i64;
|
||||
let Json.414 : Int1 = CallByName Num.24 Json.120 Json.417;
|
||||
if Json.414 then
|
||||
let Json.416 : I32 = 44i64;
|
||||
let Json.415 : U8 = CallByName Num.123 Json.416;
|
||||
let Json.412 : List U8 = CallByName List.4 Json.123 Json.415;
|
||||
jump Json.413 Json.412;
|
||||
let Json.415 : U64 = 1i64;
|
||||
let Json.412 : Int1 = CallByName Num.24 Json.119 Json.415;
|
||||
if Json.412 then
|
||||
let Json.414 : I64 = 44i64;
|
||||
let Json.413 : U8 = CallByName Num.125 Json.414;
|
||||
let Json.410 : List U8 = CallByName List.4 Json.122 Json.413;
|
||||
jump Json.411 Json.410;
|
||||
else
|
||||
jump Json.413 Json.123;
|
||||
jump Json.411 Json.122;
|
||||
|
||||
procedure Json.115 (Json.401, Json.402):
|
||||
let Json.121 : Str = StructAtIndex 0 Json.402;
|
||||
procedure Json.114 (Json.399, Json.400):
|
||||
let Json.120 : Str = StructAtIndex 0 Json.400;
|
||||
inc Json.120;
|
||||
let Json.121 : Str = StructAtIndex 1 Json.400;
|
||||
inc Json.121;
|
||||
let Json.122 : Str = StructAtIndex 1 Json.402;
|
||||
inc Json.122;
|
||||
dec Json.402;
|
||||
let Json.119 : List U8 = StructAtIndex 0 Json.401;
|
||||
inc Json.119;
|
||||
let Json.120 : U64 = StructAtIndex 1 Json.401;
|
||||
dec Json.401;
|
||||
let Json.469 : I32 = 34i64;
|
||||
let Json.468 : U8 = CallByName Num.123 Json.469;
|
||||
let Json.466 : List U8 = CallByName List.4 Json.119 Json.468;
|
||||
let Json.467 : List U8 = CallByName Str.12 Json.121;
|
||||
let Json.463 : List U8 = CallByName List.8 Json.466 Json.467;
|
||||
let Json.465 : I32 = 34i64;
|
||||
let Json.464 : U8 = CallByName Num.123 Json.465;
|
||||
let Json.460 : List U8 = CallByName List.4 Json.463 Json.464;
|
||||
let Json.462 : I32 = 58i64;
|
||||
let Json.461 : U8 = CallByName Num.123 Json.462;
|
||||
let Json.458 : List U8 = CallByName List.4 Json.460 Json.461;
|
||||
let Json.459 : {} = Struct {};
|
||||
let Json.123 : List U8 = CallByName Encode.23 Json.458 Json.122 Json.459;
|
||||
joinpoint Json.453 Json.124:
|
||||
let Json.451 : U64 = 1i64;
|
||||
let Json.450 : U64 = CallByName Num.20 Json.120 Json.451;
|
||||
let Json.449 : {List U8, U64} = Struct {Json.124, Json.450};
|
||||
ret Json.449;
|
||||
dec Json.400;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.399;
|
||||
inc Json.118;
|
||||
let Json.119 : U64 = StructAtIndex 1 Json.399;
|
||||
dec Json.399;
|
||||
let Json.467 : I64 = 34i64;
|
||||
let Json.466 : U8 = CallByName Num.125 Json.467;
|
||||
let Json.464 : List U8 = CallByName List.4 Json.118 Json.466;
|
||||
let Json.465 : List U8 = CallByName Str.12 Json.120;
|
||||
let Json.461 : List U8 = CallByName List.8 Json.464 Json.465;
|
||||
let Json.463 : I64 = 34i64;
|
||||
let Json.462 : U8 = CallByName Num.125 Json.463;
|
||||
let Json.458 : List U8 = CallByName List.4 Json.461 Json.462;
|
||||
let Json.460 : I64 = 58i64;
|
||||
let Json.459 : U8 = CallByName Num.125 Json.460;
|
||||
let Json.456 : List U8 = CallByName List.4 Json.458 Json.459;
|
||||
let Json.457 : {} = Struct {};
|
||||
let Json.122 : List U8 = CallByName Encode.23 Json.456 Json.121 Json.457;
|
||||
joinpoint Json.451 Json.123:
|
||||
let Json.449 : U64 = 1i64;
|
||||
let Json.448 : U64 = CallByName Num.20 Json.119 Json.449;
|
||||
let Json.447 : {List U8, U64} = Struct {Json.123, Json.448};
|
||||
ret Json.447;
|
||||
in
|
||||
let Json.457 : U64 = 1i64;
|
||||
let Json.454 : Int1 = CallByName Num.24 Json.120 Json.457;
|
||||
if Json.454 then
|
||||
let Json.456 : I32 = 44i64;
|
||||
let Json.455 : U8 = CallByName Num.123 Json.456;
|
||||
let Json.452 : List U8 = CallByName List.4 Json.123 Json.455;
|
||||
jump Json.453 Json.452;
|
||||
let Json.455 : U64 = 1i64;
|
||||
let Json.452 : Int1 = CallByName Num.24 Json.119 Json.455;
|
||||
if Json.452 then
|
||||
let Json.454 : I64 = 44i64;
|
||||
let Json.453 : U8 = CallByName Num.125 Json.454;
|
||||
let Json.450 : List U8 = CallByName List.4 Json.122 Json.453;
|
||||
jump Json.451 Json.450;
|
||||
else
|
||||
jump Json.453 Json.123;
|
||||
jump Json.451 Json.122;
|
||||
|
||||
procedure Json.18 (Json.96):
|
||||
let Json.473 : Str = CallByName Encode.22 Json.96;
|
||||
ret Json.473;
|
||||
procedure Json.18 (Json.95):
|
||||
let Json.471 : Str = CallByName Encode.22 Json.95;
|
||||
ret Json.471;
|
||||
|
||||
procedure Json.20 (Json.112):
|
||||
let Json.397 : List {Str, Str} = CallByName Encode.22 Json.112;
|
||||
ret Json.397;
|
||||
procedure Json.20 (Json.111):
|
||||
let Json.395 : List {Str, Str} = CallByName Encode.22 Json.111;
|
||||
ret Json.395;
|
||||
|
||||
procedure Json.20 (Json.112):
|
||||
let Json.439 : List {Str, Str} = CallByName Encode.22 Json.112;
|
||||
ret Json.439;
|
||||
procedure Json.20 (Json.111):
|
||||
let Json.437 : List {Str, Str} = CallByName Encode.22 Json.111;
|
||||
ret Json.437;
|
||||
|
||||
procedure Json.97 (Json.98, Json.475, Json.96):
|
||||
let Json.484 : I32 = 34i64;
|
||||
let Json.483 : U8 = CallByName Num.123 Json.484;
|
||||
let Json.481 : List U8 = CallByName List.4 Json.98 Json.483;
|
||||
let Json.482 : List U8 = CallByName Str.12 Json.96;
|
||||
let Json.478 : List U8 = CallByName List.8 Json.481 Json.482;
|
||||
let Json.480 : I32 = 34i64;
|
||||
let Json.479 : U8 = CallByName Num.123 Json.480;
|
||||
let Json.477 : List U8 = CallByName List.4 Json.478 Json.479;
|
||||
ret Json.477;
|
||||
procedure Json.96 (Json.97, Json.473, Json.95):
|
||||
let Json.482 : I64 = 34i64;
|
||||
let Json.481 : U8 = CallByName Num.125 Json.482;
|
||||
let Json.479 : List U8 = CallByName List.4 Json.97 Json.481;
|
||||
let Json.480 : List U8 = CallByName Str.12 Json.95;
|
||||
let Json.476 : List U8 = CallByName List.8 Json.479 Json.480;
|
||||
let Json.478 : I64 = 34i64;
|
||||
let Json.477 : U8 = CallByName Num.125 Json.478;
|
||||
let Json.475 : List U8 = CallByName List.4 Json.476 Json.477;
|
||||
ret Json.475;
|
||||
|
||||
procedure List.133 (List.134, List.135, List.132):
|
||||
let List.420 : {List U8, U64} = CallByName Json.115 List.134 List.135;
|
||||
ret List.420;
|
||||
procedure List.137 (List.138, List.139, List.136):
|
||||
let List.449 : {List U8, U64} = CallByName Json.114 List.138 List.139;
|
||||
ret List.449;
|
||||
|
||||
procedure List.133 (List.134, List.135, List.132):
|
||||
let List.492 : {List U8, U64} = CallByName Json.115 List.134 List.135;
|
||||
ret List.492;
|
||||
procedure List.137 (List.138, List.139, List.136):
|
||||
let List.521 : {List U8, U64} = CallByName Json.114 List.138 List.139;
|
||||
ret List.521;
|
||||
|
||||
procedure List.18 (List.130, List.131, List.132):
|
||||
let List.402 : {List U8, U64} = CallByName List.75 List.130 List.131 List.132;
|
||||
ret List.402;
|
||||
procedure List.18 (List.134, List.135, List.136):
|
||||
let List.431 : {List U8, U64} = CallByName List.89 List.134 List.135 List.136;
|
||||
ret List.431;
|
||||
|
||||
procedure List.18 (List.130, List.131, List.132):
|
||||
let List.474 : {List U8, U64} = CallByName List.75 List.130 List.131 List.132;
|
||||
ret List.474;
|
||||
procedure List.18 (List.134, List.135, List.136):
|
||||
let List.503 : {List U8, U64} = CallByName List.89 List.134 List.135 List.136;
|
||||
ret List.503;
|
||||
|
||||
procedure List.4 (List.101, List.102):
|
||||
let List.473 : U64 = 1i64;
|
||||
let List.472 : List U8 = CallByName List.70 List.101 List.473;
|
||||
let List.471 : List U8 = CallByName List.71 List.472 List.102;
|
||||
ret List.471;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.502 : U64 = 1i64;
|
||||
let List.501 : List U8 = CallByName List.70 List.105 List.502;
|
||||
let List.500 : List U8 = CallByName List.71 List.501 List.106;
|
||||
ret List.500;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.422 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.422;
|
||||
let List.451 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.451;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.495 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.495;
|
||||
let List.524 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.524;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.417 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.417;
|
||||
let List.446 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.446;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.489 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.489;
|
||||
let List.518 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.518;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.452 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.452;
|
||||
let List.481 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.481;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.450 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.450;
|
||||
|
||||
procedure List.75 (List.356, List.357, List.358):
|
||||
let List.406 : U64 = 0i64;
|
||||
let List.407 : U64 = CallByName List.6 List.356;
|
||||
let List.405 : {List U8, U64} = CallByName List.86 List.356 List.357 List.358 List.406 List.407;
|
||||
ret List.405;
|
||||
|
||||
procedure List.75 (List.356, List.357, List.358):
|
||||
let List.478 : U64 = 0i64;
|
||||
let List.479 : U64 = CallByName List.6 List.356;
|
||||
let List.477 : {List U8, U64} = CallByName List.86 List.356 List.357 List.358 List.478 List.479;
|
||||
ret List.477;
|
||||
let List.479 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.479;
|
||||
|
||||
procedure List.8 (#Attr.2, #Attr.3):
|
||||
let List.494 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.494;
|
||||
let List.523 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.523;
|
||||
|
||||
procedure List.86 (List.432, List.433, List.434, List.435, List.436):
|
||||
joinpoint List.408 List.359 List.360 List.361 List.362 List.363:
|
||||
let List.410 : Int1 = CallByName Num.22 List.362 List.363;
|
||||
if List.410 then
|
||||
let List.416 : {Str, Str} = CallByName List.66 List.359 List.362;
|
||||
let List.411 : {List U8, U64} = CallByName List.133 List.360 List.416 List.361;
|
||||
let List.414 : U64 = 1i64;
|
||||
let List.413 : U64 = CallByName Num.19 List.362 List.414;
|
||||
jump List.408 List.359 List.411 List.361 List.413 List.363;
|
||||
procedure List.89 (List.385, List.386, List.387):
|
||||
let List.435 : U64 = 0i64;
|
||||
let List.436 : U64 = CallByName List.6 List.385;
|
||||
let List.434 : {List U8, U64} = CallByName List.90 List.385 List.386 List.387 List.435 List.436;
|
||||
ret List.434;
|
||||
|
||||
procedure List.89 (List.385, List.386, List.387):
|
||||
let List.507 : U64 = 0i64;
|
||||
let List.508 : U64 = CallByName List.6 List.385;
|
||||
let List.506 : {List U8, U64} = CallByName List.90 List.385 List.386 List.387 List.507 List.508;
|
||||
ret List.506;
|
||||
|
||||
procedure List.90 (List.461, List.462, List.463, List.464, List.465):
|
||||
joinpoint List.437 List.388 List.389 List.390 List.391 List.392:
|
||||
let List.439 : Int1 = CallByName Num.22 List.391 List.392;
|
||||
if List.439 then
|
||||
let List.445 : {Str, Str} = CallByName List.66 List.388 List.391;
|
||||
let List.440 : {List U8, U64} = CallByName List.137 List.389 List.445 List.390;
|
||||
let List.443 : U64 = 1i64;
|
||||
let List.442 : U64 = CallByName Num.19 List.391 List.443;
|
||||
jump List.437 List.388 List.440 List.390 List.442 List.392;
|
||||
else
|
||||
ret List.360;
|
||||
ret List.389;
|
||||
in
|
||||
jump List.408 List.432 List.433 List.434 List.435 List.436;
|
||||
jump List.437 List.461 List.462 List.463 List.464 List.465;
|
||||
|
||||
procedure List.86 (List.505, List.506, List.507, List.508, List.509):
|
||||
joinpoint List.480 List.359 List.360 List.361 List.362 List.363:
|
||||
let List.482 : Int1 = CallByName Num.22 List.362 List.363;
|
||||
if List.482 then
|
||||
let List.488 : {Str, Str} = CallByName List.66 List.359 List.362;
|
||||
let List.483 : {List U8, U64} = CallByName List.133 List.360 List.488 List.361;
|
||||
let List.486 : U64 = 1i64;
|
||||
let List.485 : U64 = CallByName Num.19 List.362 List.486;
|
||||
jump List.480 List.359 List.483 List.361 List.485 List.363;
|
||||
procedure List.90 (List.534, List.535, List.536, List.537, List.538):
|
||||
joinpoint List.509 List.388 List.389 List.390 List.391 List.392:
|
||||
let List.511 : Int1 = CallByName Num.22 List.391 List.392;
|
||||
if List.511 then
|
||||
let List.517 : {Str, Str} = CallByName List.66 List.388 List.391;
|
||||
let List.512 : {List U8, U64} = CallByName List.137 List.389 List.517 List.390;
|
||||
let List.515 : U64 = 1i64;
|
||||
let List.514 : U64 = CallByName Num.19 List.391 List.515;
|
||||
jump List.509 List.388 List.512 List.390 List.514 List.392;
|
||||
else
|
||||
ret List.360;
|
||||
ret List.389;
|
||||
in
|
||||
jump List.480 List.505 List.506 List.507 List.508 List.509;
|
||||
jump List.509 List.534 List.535 List.536 List.537 List.538;
|
||||
|
||||
procedure Num.123 (#Attr.2):
|
||||
let Num.283 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.283;
|
||||
procedure Num.125 (#Attr.2):
|
||||
let Num.282 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.282;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.286 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.286;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.284 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.284;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.287 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.287;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.285 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
let Num.285 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.285;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.283 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.283;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.286 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.286;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.284 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
ret Num.284;
|
||||
|
||||
procedure Str.12 (#Attr.2):
|
||||
let Str.268 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.268;
|
||||
let Str.282 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.282;
|
||||
|
||||
procedure Str.48 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.260;
|
||||
let Str.274 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.274;
|
||||
|
||||
procedure Str.9 (Str.73):
|
||||
let Str.258 : U64 = 0i64;
|
||||
let Str.259 : U64 = CallByName List.6 Str.73;
|
||||
let Str.74 : {U64, Str, Int1, U8} = CallByName Str.48 Str.73 Str.258 Str.259;
|
||||
let Str.255 : Int1 = StructAtIndex 2 Str.74;
|
||||
if Str.255 then
|
||||
let Str.257 : Str = StructAtIndex 1 Str.74;
|
||||
inc Str.257;
|
||||
dec Str.74;
|
||||
let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257;
|
||||
ret Str.256;
|
||||
procedure Str.9 (Str.76):
|
||||
let Str.272 : U64 = 0i64;
|
||||
let Str.273 : U64 = CallByName List.6 Str.76;
|
||||
let Str.77 : {U64, Str, Int1, U8} = CallByName Str.48 Str.76 Str.272 Str.273;
|
||||
let Str.269 : Int1 = StructAtIndex 2 Str.77;
|
||||
if Str.269 then
|
||||
let Str.271 : Str = StructAtIndex 1 Str.77;
|
||||
inc Str.271;
|
||||
dec Str.77;
|
||||
let Str.270 : [C {U64, U8}, C Str] = TagId(1) Str.271;
|
||||
ret Str.270;
|
||||
else
|
||||
let Str.253 : U8 = StructAtIndex 3 Str.74;
|
||||
let Str.254 : U64 = StructAtIndex 0 Str.74;
|
||||
dec Str.74;
|
||||
let Str.252 : {U64, U8} = Struct {Str.254, Str.253};
|
||||
let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252;
|
||||
ret Str.251;
|
||||
let Str.267 : U8 = StructAtIndex 3 Str.77;
|
||||
let Str.268 : U64 = StructAtIndex 0 Str.77;
|
||||
dec Str.77;
|
||||
let Str.266 : {U64, U8} = Struct {Str.268, Str.267};
|
||||
let Str.265 : [C {U64, U8}, C Str] = TagId(0) Str.266;
|
||||
ret Str.265;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.12 : Str = "bar";
|
||||
|
|
|
@ -25,11 +25,11 @@ procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
|||
ret Encode.106;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.113 : List U8 = CallByName Json.113 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.113 : List U8 = CallByName Json.112 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.113;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.116 : List U8 = CallByName Json.97 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.116 : List U8 = CallByName Json.96 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.116;
|
||||
|
||||
procedure Encode.25 (Encode.100, Encode.101):
|
||||
|
@ -39,188 +39,188 @@ procedure Encode.25 (Encode.100, Encode.101):
|
|||
ret Encode.103;
|
||||
|
||||
procedure Json.1 ():
|
||||
let Json.396 : {} = Struct {};
|
||||
ret Json.396;
|
||||
let Json.394 : {} = Struct {};
|
||||
ret Json.394;
|
||||
|
||||
procedure Json.113 (Json.114, Json.399, Json.112):
|
||||
let Json.432 : I32 = 123i64;
|
||||
let Json.431 : U8 = CallByName Num.123 Json.432;
|
||||
let Json.116 : List U8 = CallByName List.4 Json.114 Json.431;
|
||||
let Json.430 : U64 = CallByName List.6 Json.112;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.116, Json.430};
|
||||
let Json.408 : {} = Struct {};
|
||||
let Json.406 : {List U8, U64} = CallByName List.18 Json.112 Json.407 Json.408;
|
||||
dec Json.112;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.406;
|
||||
inc Json.118;
|
||||
dec Json.406;
|
||||
let Json.405 : I32 = 125i64;
|
||||
let Json.404 : U8 = CallByName Num.123 Json.405;
|
||||
let Json.403 : List U8 = CallByName List.4 Json.118 Json.404;
|
||||
ret Json.403;
|
||||
procedure Json.112 (Json.113, Json.397, Json.111):
|
||||
let Json.430 : I64 = 123i64;
|
||||
let Json.429 : U8 = CallByName Num.125 Json.430;
|
||||
let Json.115 : List U8 = CallByName List.4 Json.113 Json.429;
|
||||
let Json.428 : U64 = CallByName List.6 Json.111;
|
||||
let Json.405 : {List U8, U64} = Struct {Json.115, Json.428};
|
||||
let Json.406 : {} = Struct {};
|
||||
let Json.404 : {List U8, U64} = CallByName List.18 Json.111 Json.405 Json.406;
|
||||
dec Json.111;
|
||||
let Json.117 : List U8 = StructAtIndex 0 Json.404;
|
||||
inc Json.117;
|
||||
dec Json.404;
|
||||
let Json.403 : I64 = 125i64;
|
||||
let Json.402 : U8 = CallByName Num.125 Json.403;
|
||||
let Json.401 : List U8 = CallByName List.4 Json.117 Json.402;
|
||||
ret Json.401;
|
||||
|
||||
procedure Json.115 (Json.401, Json.402):
|
||||
let Json.121 : Str = StructAtIndex 0 Json.402;
|
||||
procedure Json.114 (Json.399, Json.400):
|
||||
let Json.120 : Str = StructAtIndex 0 Json.400;
|
||||
inc Json.120;
|
||||
let Json.121 : Str = StructAtIndex 1 Json.400;
|
||||
inc Json.121;
|
||||
let Json.122 : Str = StructAtIndex 1 Json.402;
|
||||
inc Json.122;
|
||||
dec Json.402;
|
||||
let Json.119 : List U8 = StructAtIndex 0 Json.401;
|
||||
inc Json.119;
|
||||
let Json.120 : U64 = StructAtIndex 1 Json.401;
|
||||
dec Json.401;
|
||||
let Json.429 : I32 = 34i64;
|
||||
let Json.428 : U8 = CallByName Num.123 Json.429;
|
||||
let Json.426 : List U8 = CallByName List.4 Json.119 Json.428;
|
||||
let Json.427 : List U8 = CallByName Str.12 Json.121;
|
||||
let Json.423 : List U8 = CallByName List.8 Json.426 Json.427;
|
||||
let Json.425 : I32 = 34i64;
|
||||
let Json.424 : U8 = CallByName Num.123 Json.425;
|
||||
let Json.420 : List U8 = CallByName List.4 Json.423 Json.424;
|
||||
let Json.422 : I32 = 58i64;
|
||||
let Json.421 : U8 = CallByName Num.123 Json.422;
|
||||
let Json.418 : List U8 = CallByName List.4 Json.420 Json.421;
|
||||
let Json.419 : {} = Struct {};
|
||||
let Json.123 : List U8 = CallByName Encode.23 Json.418 Json.122 Json.419;
|
||||
joinpoint Json.413 Json.124:
|
||||
let Json.411 : U64 = 1i64;
|
||||
let Json.410 : U64 = CallByName Num.20 Json.120 Json.411;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.124, Json.410};
|
||||
ret Json.409;
|
||||
dec Json.400;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.399;
|
||||
inc Json.118;
|
||||
let Json.119 : U64 = StructAtIndex 1 Json.399;
|
||||
dec Json.399;
|
||||
let Json.427 : I64 = 34i64;
|
||||
let Json.426 : U8 = CallByName Num.125 Json.427;
|
||||
let Json.424 : List U8 = CallByName List.4 Json.118 Json.426;
|
||||
let Json.425 : List U8 = CallByName Str.12 Json.120;
|
||||
let Json.421 : List U8 = CallByName List.8 Json.424 Json.425;
|
||||
let Json.423 : I64 = 34i64;
|
||||
let Json.422 : U8 = CallByName Num.125 Json.423;
|
||||
let Json.418 : List U8 = CallByName List.4 Json.421 Json.422;
|
||||
let Json.420 : I64 = 58i64;
|
||||
let Json.419 : U8 = CallByName Num.125 Json.420;
|
||||
let Json.416 : List U8 = CallByName List.4 Json.418 Json.419;
|
||||
let Json.417 : {} = Struct {};
|
||||
let Json.122 : List U8 = CallByName Encode.23 Json.416 Json.121 Json.417;
|
||||
joinpoint Json.411 Json.123:
|
||||
let Json.409 : U64 = 1i64;
|
||||
let Json.408 : U64 = CallByName Num.20 Json.119 Json.409;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.123, Json.408};
|
||||
ret Json.407;
|
||||
in
|
||||
let Json.417 : U64 = 1i64;
|
||||
let Json.414 : Int1 = CallByName Num.24 Json.120 Json.417;
|
||||
if Json.414 then
|
||||
let Json.416 : I32 = 44i64;
|
||||
let Json.415 : U8 = CallByName Num.123 Json.416;
|
||||
let Json.412 : List U8 = CallByName List.4 Json.123 Json.415;
|
||||
jump Json.413 Json.412;
|
||||
let Json.415 : U64 = 1i64;
|
||||
let Json.412 : Int1 = CallByName Num.24 Json.119 Json.415;
|
||||
if Json.412 then
|
||||
let Json.414 : I64 = 44i64;
|
||||
let Json.413 : U8 = CallByName Num.125 Json.414;
|
||||
let Json.410 : List U8 = CallByName List.4 Json.122 Json.413;
|
||||
jump Json.411 Json.410;
|
||||
else
|
||||
jump Json.413 Json.123;
|
||||
jump Json.411 Json.122;
|
||||
|
||||
procedure Json.18 (Json.96):
|
||||
let Json.433 : Str = CallByName Encode.22 Json.96;
|
||||
ret Json.433;
|
||||
procedure Json.18 (Json.95):
|
||||
let Json.431 : Str = CallByName Encode.22 Json.95;
|
||||
ret Json.431;
|
||||
|
||||
procedure Json.20 (Json.112):
|
||||
let Json.397 : List {Str, Str} = CallByName Encode.22 Json.112;
|
||||
ret Json.397;
|
||||
procedure Json.20 (Json.111):
|
||||
let Json.395 : List {Str, Str} = CallByName Encode.22 Json.111;
|
||||
ret Json.395;
|
||||
|
||||
procedure Json.97 (Json.98, Json.435, Json.96):
|
||||
let Json.444 : I32 = 34i64;
|
||||
let Json.443 : U8 = CallByName Num.123 Json.444;
|
||||
let Json.441 : List U8 = CallByName List.4 Json.98 Json.443;
|
||||
let Json.442 : List U8 = CallByName Str.12 Json.96;
|
||||
let Json.438 : List U8 = CallByName List.8 Json.441 Json.442;
|
||||
let Json.440 : I32 = 34i64;
|
||||
let Json.439 : U8 = CallByName Num.123 Json.440;
|
||||
let Json.437 : List U8 = CallByName List.4 Json.438 Json.439;
|
||||
ret Json.437;
|
||||
procedure Json.96 (Json.97, Json.433, Json.95):
|
||||
let Json.442 : I64 = 34i64;
|
||||
let Json.441 : U8 = CallByName Num.125 Json.442;
|
||||
let Json.439 : List U8 = CallByName List.4 Json.97 Json.441;
|
||||
let Json.440 : List U8 = CallByName Str.12 Json.95;
|
||||
let Json.436 : List U8 = CallByName List.8 Json.439 Json.440;
|
||||
let Json.438 : I64 = 34i64;
|
||||
let Json.437 : U8 = CallByName Num.125 Json.438;
|
||||
let Json.435 : List U8 = CallByName List.4 Json.436 Json.437;
|
||||
ret Json.435;
|
||||
|
||||
procedure List.133 (List.134, List.135, List.132):
|
||||
let List.426 : {List U8, U64} = CallByName Json.115 List.134 List.135;
|
||||
ret List.426;
|
||||
procedure List.137 (List.138, List.139, List.136):
|
||||
let List.455 : {List U8, U64} = CallByName Json.114 List.138 List.139;
|
||||
ret List.455;
|
||||
|
||||
procedure List.18 (List.130, List.131, List.132):
|
||||
let List.408 : {List U8, U64} = CallByName List.75 List.130 List.131 List.132;
|
||||
ret List.408;
|
||||
procedure List.18 (List.134, List.135, List.136):
|
||||
let List.437 : {List U8, U64} = CallByName List.89 List.134 List.135 List.136;
|
||||
ret List.437;
|
||||
|
||||
procedure List.4 (List.101, List.102):
|
||||
let List.407 : U64 = 1i64;
|
||||
let List.406 : List U8 = CallByName List.70 List.101 List.407;
|
||||
let List.405 : List U8 = CallByName List.71 List.406 List.102;
|
||||
ret List.405;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.436 : U64 = 1i64;
|
||||
let List.435 : List U8 = CallByName List.70 List.105 List.436;
|
||||
let List.434 : List U8 = CallByName List.71 List.435 List.106;
|
||||
ret List.434;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.429 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.429;
|
||||
let List.458 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.458;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.423 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.423;
|
||||
let List.452 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.452;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.386 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.386;
|
||||
let List.415 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.415;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.384 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
|
||||
procedure List.75 (List.356, List.357, List.358):
|
||||
let List.412 : U64 = 0i64;
|
||||
let List.413 : U64 = CallByName List.6 List.356;
|
||||
let List.411 : {List U8, U64} = CallByName List.86 List.356 List.357 List.358 List.412 List.413;
|
||||
ret List.411;
|
||||
let List.413 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.8 (#Attr.2, #Attr.3):
|
||||
let List.428 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.428;
|
||||
let List.457 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.457;
|
||||
|
||||
procedure List.86 (List.439, List.440, List.441, List.442, List.443):
|
||||
joinpoint List.414 List.359 List.360 List.361 List.362 List.363:
|
||||
let List.416 : Int1 = CallByName Num.22 List.362 List.363;
|
||||
if List.416 then
|
||||
let List.422 : {Str, Str} = CallByName List.66 List.359 List.362;
|
||||
let List.417 : {List U8, U64} = CallByName List.133 List.360 List.422 List.361;
|
||||
let List.420 : U64 = 1i64;
|
||||
let List.419 : U64 = CallByName Num.19 List.362 List.420;
|
||||
jump List.414 List.359 List.417 List.361 List.419 List.363;
|
||||
procedure List.89 (List.385, List.386, List.387):
|
||||
let List.441 : U64 = 0i64;
|
||||
let List.442 : U64 = CallByName List.6 List.385;
|
||||
let List.440 : {List U8, U64} = CallByName List.90 List.385 List.386 List.387 List.441 List.442;
|
||||
ret List.440;
|
||||
|
||||
procedure List.90 (List.468, List.469, List.470, List.471, List.472):
|
||||
joinpoint List.443 List.388 List.389 List.390 List.391 List.392:
|
||||
let List.445 : Int1 = CallByName Num.22 List.391 List.392;
|
||||
if List.445 then
|
||||
let List.451 : {Str, Str} = CallByName List.66 List.388 List.391;
|
||||
let List.446 : {List U8, U64} = CallByName List.137 List.389 List.451 List.390;
|
||||
let List.449 : U64 = 1i64;
|
||||
let List.448 : U64 = CallByName Num.19 List.391 List.449;
|
||||
jump List.443 List.388 List.446 List.390 List.448 List.392;
|
||||
else
|
||||
ret List.360;
|
||||
ret List.389;
|
||||
in
|
||||
jump List.414 List.439 List.440 List.441 List.442 List.443;
|
||||
jump List.443 List.468 List.469 List.470 List.471 List.472;
|
||||
|
||||
procedure Num.123 (#Attr.2):
|
||||
let Num.264 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.264;
|
||||
procedure Num.125 (#Attr.2):
|
||||
let Num.263 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.263;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.267 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.265 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.265;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.268 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.268;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.266 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
let Num.266 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.266;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.264 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.264;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.267 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.265 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
ret Num.265;
|
||||
|
||||
procedure Str.12 (#Attr.2):
|
||||
let Str.266 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.266;
|
||||
let Str.280 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.280;
|
||||
|
||||
procedure Str.48 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.260;
|
||||
let Str.274 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.274;
|
||||
|
||||
procedure Str.9 (Str.73):
|
||||
let Str.258 : U64 = 0i64;
|
||||
let Str.259 : U64 = CallByName List.6 Str.73;
|
||||
let Str.74 : {U64, Str, Int1, U8} = CallByName Str.48 Str.73 Str.258 Str.259;
|
||||
let Str.255 : Int1 = StructAtIndex 2 Str.74;
|
||||
if Str.255 then
|
||||
let Str.257 : Str = StructAtIndex 1 Str.74;
|
||||
inc Str.257;
|
||||
dec Str.74;
|
||||
let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257;
|
||||
ret Str.256;
|
||||
procedure Str.9 (Str.76):
|
||||
let Str.272 : U64 = 0i64;
|
||||
let Str.273 : U64 = CallByName List.6 Str.76;
|
||||
let Str.77 : {U64, Str, Int1, U8} = CallByName Str.48 Str.76 Str.272 Str.273;
|
||||
let Str.269 : Int1 = StructAtIndex 2 Str.77;
|
||||
if Str.269 then
|
||||
let Str.271 : Str = StructAtIndex 1 Str.77;
|
||||
inc Str.271;
|
||||
dec Str.77;
|
||||
let Str.270 : [C {U64, U8}, C Str] = TagId(1) Str.271;
|
||||
ret Str.270;
|
||||
else
|
||||
let Str.253 : U8 = StructAtIndex 3 Str.74;
|
||||
let Str.254 : U64 = StructAtIndex 0 Str.74;
|
||||
dec Str.74;
|
||||
let Str.252 : {U64, U8} = Struct {Str.254, Str.253};
|
||||
let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252;
|
||||
ret Str.251;
|
||||
let Str.267 : U8 = StructAtIndex 3 Str.77;
|
||||
let Str.268 : U64 = StructAtIndex 0 Str.77;
|
||||
dec Str.77;
|
||||
let Str.266 : {U64, U8} = Struct {Str.268, Str.267};
|
||||
let Str.265 : [C {U64, U8}, C Str] = TagId(0) Str.266;
|
||||
ret Str.265;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.11 : Str = "foo";
|
||||
|
|
|
@ -33,11 +33,11 @@ procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
|||
ret Encode.106;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.113 : List U8 = CallByName Json.113 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.113 : List U8 = CallByName Json.112 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.113;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.117 : List U8 = CallByName Json.97 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.117 : List U8 = CallByName Json.96 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.117;
|
||||
|
||||
procedure Encode.25 (Encode.100, Encode.101):
|
||||
|
@ -47,188 +47,188 @@ procedure Encode.25 (Encode.100, Encode.101):
|
|||
ret Encode.103;
|
||||
|
||||
procedure Json.1 ():
|
||||
let Json.396 : {} = Struct {};
|
||||
ret Json.396;
|
||||
let Json.394 : {} = Struct {};
|
||||
ret Json.394;
|
||||
|
||||
procedure Json.113 (Json.114, Json.399, Json.112):
|
||||
let Json.432 : I32 = 123i64;
|
||||
let Json.431 : U8 = CallByName Num.123 Json.432;
|
||||
let Json.116 : List U8 = CallByName List.4 Json.114 Json.431;
|
||||
let Json.430 : U64 = CallByName List.6 Json.112;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.116, Json.430};
|
||||
let Json.408 : {} = Struct {};
|
||||
let Json.406 : {List U8, U64} = CallByName List.18 Json.112 Json.407 Json.408;
|
||||
dec Json.112;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.406;
|
||||
inc Json.118;
|
||||
dec Json.406;
|
||||
let Json.405 : I32 = 125i64;
|
||||
let Json.404 : U8 = CallByName Num.123 Json.405;
|
||||
let Json.403 : List U8 = CallByName List.4 Json.118 Json.404;
|
||||
ret Json.403;
|
||||
procedure Json.112 (Json.113, Json.397, Json.111):
|
||||
let Json.430 : I64 = 123i64;
|
||||
let Json.429 : U8 = CallByName Num.125 Json.430;
|
||||
let Json.115 : List U8 = CallByName List.4 Json.113 Json.429;
|
||||
let Json.428 : U64 = CallByName List.6 Json.111;
|
||||
let Json.405 : {List U8, U64} = Struct {Json.115, Json.428};
|
||||
let Json.406 : {} = Struct {};
|
||||
let Json.404 : {List U8, U64} = CallByName List.18 Json.111 Json.405 Json.406;
|
||||
dec Json.111;
|
||||
let Json.117 : List U8 = StructAtIndex 0 Json.404;
|
||||
inc Json.117;
|
||||
dec Json.404;
|
||||
let Json.403 : I64 = 125i64;
|
||||
let Json.402 : U8 = CallByName Num.125 Json.403;
|
||||
let Json.401 : List U8 = CallByName List.4 Json.117 Json.402;
|
||||
ret Json.401;
|
||||
|
||||
procedure Json.115 (Json.401, Json.402):
|
||||
let Json.121 : Str = StructAtIndex 0 Json.402;
|
||||
procedure Json.114 (Json.399, Json.400):
|
||||
let Json.120 : Str = StructAtIndex 0 Json.400;
|
||||
inc Json.120;
|
||||
let Json.121 : Str = StructAtIndex 1 Json.400;
|
||||
inc Json.121;
|
||||
let Json.122 : Str = StructAtIndex 1 Json.402;
|
||||
inc Json.122;
|
||||
dec Json.402;
|
||||
let Json.119 : List U8 = StructAtIndex 0 Json.401;
|
||||
inc Json.119;
|
||||
let Json.120 : U64 = StructAtIndex 1 Json.401;
|
||||
dec Json.401;
|
||||
let Json.429 : I32 = 34i64;
|
||||
let Json.428 : U8 = CallByName Num.123 Json.429;
|
||||
let Json.426 : List U8 = CallByName List.4 Json.119 Json.428;
|
||||
let Json.427 : List U8 = CallByName Str.12 Json.121;
|
||||
let Json.423 : List U8 = CallByName List.8 Json.426 Json.427;
|
||||
let Json.425 : I32 = 34i64;
|
||||
let Json.424 : U8 = CallByName Num.123 Json.425;
|
||||
let Json.420 : List U8 = CallByName List.4 Json.423 Json.424;
|
||||
let Json.422 : I32 = 58i64;
|
||||
let Json.421 : U8 = CallByName Num.123 Json.422;
|
||||
let Json.418 : List U8 = CallByName List.4 Json.420 Json.421;
|
||||
let Json.419 : {} = Struct {};
|
||||
let Json.123 : List U8 = CallByName Encode.23 Json.418 Json.122 Json.419;
|
||||
joinpoint Json.413 Json.124:
|
||||
let Json.411 : U64 = 1i64;
|
||||
let Json.410 : U64 = CallByName Num.20 Json.120 Json.411;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.124, Json.410};
|
||||
ret Json.409;
|
||||
dec Json.400;
|
||||
let Json.118 : List U8 = StructAtIndex 0 Json.399;
|
||||
inc Json.118;
|
||||
let Json.119 : U64 = StructAtIndex 1 Json.399;
|
||||
dec Json.399;
|
||||
let Json.427 : I64 = 34i64;
|
||||
let Json.426 : U8 = CallByName Num.125 Json.427;
|
||||
let Json.424 : List U8 = CallByName List.4 Json.118 Json.426;
|
||||
let Json.425 : List U8 = CallByName Str.12 Json.120;
|
||||
let Json.421 : List U8 = CallByName List.8 Json.424 Json.425;
|
||||
let Json.423 : I64 = 34i64;
|
||||
let Json.422 : U8 = CallByName Num.125 Json.423;
|
||||
let Json.418 : List U8 = CallByName List.4 Json.421 Json.422;
|
||||
let Json.420 : I64 = 58i64;
|
||||
let Json.419 : U8 = CallByName Num.125 Json.420;
|
||||
let Json.416 : List U8 = CallByName List.4 Json.418 Json.419;
|
||||
let Json.417 : {} = Struct {};
|
||||
let Json.122 : List U8 = CallByName Encode.23 Json.416 Json.121 Json.417;
|
||||
joinpoint Json.411 Json.123:
|
||||
let Json.409 : U64 = 1i64;
|
||||
let Json.408 : U64 = CallByName Num.20 Json.119 Json.409;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.123, Json.408};
|
||||
ret Json.407;
|
||||
in
|
||||
let Json.417 : U64 = 1i64;
|
||||
let Json.414 : Int1 = CallByName Num.24 Json.120 Json.417;
|
||||
if Json.414 then
|
||||
let Json.416 : I32 = 44i64;
|
||||
let Json.415 : U8 = CallByName Num.123 Json.416;
|
||||
let Json.412 : List U8 = CallByName List.4 Json.123 Json.415;
|
||||
jump Json.413 Json.412;
|
||||
let Json.415 : U64 = 1i64;
|
||||
let Json.412 : Int1 = CallByName Num.24 Json.119 Json.415;
|
||||
if Json.412 then
|
||||
let Json.414 : I64 = 44i64;
|
||||
let Json.413 : U8 = CallByName Num.125 Json.414;
|
||||
let Json.410 : List U8 = CallByName List.4 Json.122 Json.413;
|
||||
jump Json.411 Json.410;
|
||||
else
|
||||
jump Json.413 Json.123;
|
||||
jump Json.411 Json.122;
|
||||
|
||||
procedure Json.18 (Json.96):
|
||||
let Json.445 : Str = CallByName Encode.22 Json.96;
|
||||
ret Json.445;
|
||||
procedure Json.18 (Json.95):
|
||||
let Json.443 : Str = CallByName Encode.22 Json.95;
|
||||
ret Json.443;
|
||||
|
||||
procedure Json.20 (Json.112):
|
||||
let Json.397 : List {Str, Str} = CallByName Encode.22 Json.112;
|
||||
ret Json.397;
|
||||
procedure Json.20 (Json.111):
|
||||
let Json.395 : List {Str, Str} = CallByName Encode.22 Json.111;
|
||||
ret Json.395;
|
||||
|
||||
procedure Json.97 (Json.98, Json.435, Json.96):
|
||||
let Json.444 : I32 = 34i64;
|
||||
let Json.443 : U8 = CallByName Num.123 Json.444;
|
||||
let Json.441 : List U8 = CallByName List.4 Json.98 Json.443;
|
||||
let Json.442 : List U8 = CallByName Str.12 Json.96;
|
||||
let Json.438 : List U8 = CallByName List.8 Json.441 Json.442;
|
||||
let Json.440 : I32 = 34i64;
|
||||
let Json.439 : U8 = CallByName Num.123 Json.440;
|
||||
let Json.437 : List U8 = CallByName List.4 Json.438 Json.439;
|
||||
ret Json.437;
|
||||
procedure Json.96 (Json.97, Json.433, Json.95):
|
||||
let Json.442 : I64 = 34i64;
|
||||
let Json.441 : U8 = CallByName Num.125 Json.442;
|
||||
let Json.439 : List U8 = CallByName List.4 Json.97 Json.441;
|
||||
let Json.440 : List U8 = CallByName Str.12 Json.95;
|
||||
let Json.436 : List U8 = CallByName List.8 Json.439 Json.440;
|
||||
let Json.438 : I64 = 34i64;
|
||||
let Json.437 : U8 = CallByName Num.125 Json.438;
|
||||
let Json.435 : List U8 = CallByName List.4 Json.436 Json.437;
|
||||
ret Json.435;
|
||||
|
||||
procedure List.133 (List.134, List.135, List.132):
|
||||
let List.426 : {List U8, U64} = CallByName Json.115 List.134 List.135;
|
||||
ret List.426;
|
||||
procedure List.137 (List.138, List.139, List.136):
|
||||
let List.455 : {List U8, U64} = CallByName Json.114 List.138 List.139;
|
||||
ret List.455;
|
||||
|
||||
procedure List.18 (List.130, List.131, List.132):
|
||||
let List.408 : {List U8, U64} = CallByName List.75 List.130 List.131 List.132;
|
||||
ret List.408;
|
||||
procedure List.18 (List.134, List.135, List.136):
|
||||
let List.437 : {List U8, U64} = CallByName List.89 List.134 List.135 List.136;
|
||||
ret List.437;
|
||||
|
||||
procedure List.4 (List.101, List.102):
|
||||
let List.407 : U64 = 1i64;
|
||||
let List.406 : List U8 = CallByName List.70 List.101 List.407;
|
||||
let List.405 : List U8 = CallByName List.71 List.406 List.102;
|
||||
ret List.405;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.436 : U64 = 1i64;
|
||||
let List.435 : List U8 = CallByName List.70 List.105 List.436;
|
||||
let List.434 : List U8 = CallByName List.71 List.435 List.106;
|
||||
ret List.434;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.429 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.429;
|
||||
let List.458 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.458;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.423 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.423;
|
||||
let List.452 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.452;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.386 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.386;
|
||||
let List.415 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.415;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.384 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
|
||||
procedure List.75 (List.356, List.357, List.358):
|
||||
let List.412 : U64 = 0i64;
|
||||
let List.413 : U64 = CallByName List.6 List.356;
|
||||
let List.411 : {List U8, U64} = CallByName List.86 List.356 List.357 List.358 List.412 List.413;
|
||||
ret List.411;
|
||||
let List.413 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.8 (#Attr.2, #Attr.3):
|
||||
let List.428 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.428;
|
||||
let List.457 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.457;
|
||||
|
||||
procedure List.86 (List.439, List.440, List.441, List.442, List.443):
|
||||
joinpoint List.414 List.359 List.360 List.361 List.362 List.363:
|
||||
let List.416 : Int1 = CallByName Num.22 List.362 List.363;
|
||||
if List.416 then
|
||||
let List.422 : {Str, Str} = CallByName List.66 List.359 List.362;
|
||||
let List.417 : {List U8, U64} = CallByName List.133 List.360 List.422 List.361;
|
||||
let List.420 : U64 = 1i64;
|
||||
let List.419 : U64 = CallByName Num.19 List.362 List.420;
|
||||
jump List.414 List.359 List.417 List.361 List.419 List.363;
|
||||
procedure List.89 (List.385, List.386, List.387):
|
||||
let List.441 : U64 = 0i64;
|
||||
let List.442 : U64 = CallByName List.6 List.385;
|
||||
let List.440 : {List U8, U64} = CallByName List.90 List.385 List.386 List.387 List.441 List.442;
|
||||
ret List.440;
|
||||
|
||||
procedure List.90 (List.468, List.469, List.470, List.471, List.472):
|
||||
joinpoint List.443 List.388 List.389 List.390 List.391 List.392:
|
||||
let List.445 : Int1 = CallByName Num.22 List.391 List.392;
|
||||
if List.445 then
|
||||
let List.451 : {Str, Str} = CallByName List.66 List.388 List.391;
|
||||
let List.446 : {List U8, U64} = CallByName List.137 List.389 List.451 List.390;
|
||||
let List.449 : U64 = 1i64;
|
||||
let List.448 : U64 = CallByName Num.19 List.391 List.449;
|
||||
jump List.443 List.388 List.446 List.390 List.448 List.392;
|
||||
else
|
||||
ret List.360;
|
||||
ret List.389;
|
||||
in
|
||||
jump List.414 List.439 List.440 List.441 List.442 List.443;
|
||||
jump List.443 List.468 List.469 List.470 List.471 List.472;
|
||||
|
||||
procedure Num.123 (#Attr.2):
|
||||
let Num.264 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.264;
|
||||
procedure Num.125 (#Attr.2):
|
||||
let Num.263 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.263;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.267 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.265 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.265;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.268 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.268;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.266 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
let Num.266 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.266;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.264 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.264;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.267 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.265 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
ret Num.265;
|
||||
|
||||
procedure Str.12 (#Attr.2):
|
||||
let Str.266 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.266;
|
||||
let Str.280 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.280;
|
||||
|
||||
procedure Str.48 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.260;
|
||||
let Str.274 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.274;
|
||||
|
||||
procedure Str.9 (Str.73):
|
||||
let Str.258 : U64 = 0i64;
|
||||
let Str.259 : U64 = CallByName List.6 Str.73;
|
||||
let Str.74 : {U64, Str, Int1, U8} = CallByName Str.48 Str.73 Str.258 Str.259;
|
||||
let Str.255 : Int1 = StructAtIndex 2 Str.74;
|
||||
if Str.255 then
|
||||
let Str.257 : Str = StructAtIndex 1 Str.74;
|
||||
inc Str.257;
|
||||
dec Str.74;
|
||||
let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257;
|
||||
ret Str.256;
|
||||
procedure Str.9 (Str.76):
|
||||
let Str.272 : U64 = 0i64;
|
||||
let Str.273 : U64 = CallByName List.6 Str.76;
|
||||
let Str.77 : {U64, Str, Int1, U8} = CallByName Str.48 Str.76 Str.272 Str.273;
|
||||
let Str.269 : Int1 = StructAtIndex 2 Str.77;
|
||||
if Str.269 then
|
||||
let Str.271 : Str = StructAtIndex 1 Str.77;
|
||||
inc Str.271;
|
||||
dec Str.77;
|
||||
let Str.270 : [C {U64, U8}, C Str] = TagId(1) Str.271;
|
||||
ret Str.270;
|
||||
else
|
||||
let Str.253 : U8 = StructAtIndex 3 Str.74;
|
||||
let Str.254 : U64 = StructAtIndex 0 Str.74;
|
||||
dec Str.74;
|
||||
let Str.252 : {U64, U8} = Struct {Str.254, Str.253};
|
||||
let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252;
|
||||
ret Str.251;
|
||||
let Str.267 : U8 = StructAtIndex 3 Str.77;
|
||||
let Str.268 : U64 = StructAtIndex 0 Str.77;
|
||||
dec Str.77;
|
||||
let Str.266 : {U64, U8} = Struct {Str.268, Str.267};
|
||||
let Str.265 : [C {U64, U8}, C Str] = TagId(0) Str.266;
|
||||
ret Str.265;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.11 : Str = "foo";
|
||||
|
|
|
@ -2,7 +2,7 @@ procedure Encode.22 (Encode.93):
|
|||
ret Encode.93;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.106 : List U8 = CallByName Json.97 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.106 : List U8 = CallByName Json.96 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.106;
|
||||
|
||||
procedure Encode.25 (Encode.100, Encode.101):
|
||||
|
@ -12,76 +12,76 @@ procedure Encode.25 (Encode.100, Encode.101):
|
|||
ret Encode.103;
|
||||
|
||||
procedure Json.1 ():
|
||||
let Json.396 : {} = Struct {};
|
||||
ret Json.396;
|
||||
let Json.394 : {} = Struct {};
|
||||
ret Json.394;
|
||||
|
||||
procedure Json.18 (Json.96):
|
||||
let Json.397 : Str = CallByName Encode.22 Json.96;
|
||||
ret Json.397;
|
||||
procedure Json.18 (Json.95):
|
||||
let Json.395 : Str = CallByName Encode.22 Json.95;
|
||||
ret Json.395;
|
||||
|
||||
procedure Json.97 (Json.98, Json.399, Json.96):
|
||||
let Json.408 : I32 = 34i64;
|
||||
let Json.407 : U8 = CallByName Num.123 Json.408;
|
||||
let Json.405 : List U8 = CallByName List.4 Json.98 Json.407;
|
||||
let Json.406 : List U8 = CallByName Str.12 Json.96;
|
||||
let Json.402 : List U8 = CallByName List.8 Json.405 Json.406;
|
||||
let Json.404 : I32 = 34i64;
|
||||
let Json.403 : U8 = CallByName Num.123 Json.404;
|
||||
let Json.401 : List U8 = CallByName List.4 Json.402 Json.403;
|
||||
ret Json.401;
|
||||
procedure Json.96 (Json.97, Json.397, Json.95):
|
||||
let Json.406 : I64 = 34i64;
|
||||
let Json.405 : U8 = CallByName Num.125 Json.406;
|
||||
let Json.403 : List U8 = CallByName List.4 Json.97 Json.405;
|
||||
let Json.404 : List U8 = CallByName Str.12 Json.95;
|
||||
let Json.400 : List U8 = CallByName List.8 Json.403 Json.404;
|
||||
let Json.402 : I64 = 34i64;
|
||||
let Json.401 : U8 = CallByName Num.125 Json.402;
|
||||
let Json.399 : List U8 = CallByName List.4 Json.400 Json.401;
|
||||
ret Json.399;
|
||||
|
||||
procedure List.4 (List.101, List.102):
|
||||
let List.389 : U64 = 1i64;
|
||||
let List.388 : List U8 = CallByName List.70 List.101 List.389;
|
||||
let List.387 : List U8 = CallByName List.71 List.388 List.102;
|
||||
ret List.387;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.418 : U64 = 1i64;
|
||||
let List.417 : List U8 = CallByName List.70 List.105 List.418;
|
||||
let List.416 : List U8 = CallByName List.71 List.417 List.106;
|
||||
ret List.416;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.386 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.386;
|
||||
let List.415 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.415;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.384 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
let List.413 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.8 (#Attr.2, #Attr.3):
|
||||
let List.390 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.390;
|
||||
let List.419 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.419;
|
||||
|
||||
procedure Num.123 (#Attr.2):
|
||||
let Num.258 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.258;
|
||||
procedure Num.125 (#Attr.2):
|
||||
let Num.257 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.257;
|
||||
|
||||
procedure Str.12 (#Attr.2):
|
||||
let Str.265 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.265;
|
||||
let Str.279 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.279;
|
||||
|
||||
procedure Str.48 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.260;
|
||||
let Str.274 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.274;
|
||||
|
||||
procedure Str.9 (Str.73):
|
||||
let Str.258 : U64 = 0i64;
|
||||
let Str.259 : U64 = CallByName List.6 Str.73;
|
||||
let Str.74 : {U64, Str, Int1, U8} = CallByName Str.48 Str.73 Str.258 Str.259;
|
||||
let Str.255 : Int1 = StructAtIndex 2 Str.74;
|
||||
if Str.255 then
|
||||
let Str.257 : Str = StructAtIndex 1 Str.74;
|
||||
inc Str.257;
|
||||
dec Str.74;
|
||||
let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257;
|
||||
ret Str.256;
|
||||
procedure Str.9 (Str.76):
|
||||
let Str.272 : U64 = 0i64;
|
||||
let Str.273 : U64 = CallByName List.6 Str.76;
|
||||
let Str.77 : {U64, Str, Int1, U8} = CallByName Str.48 Str.76 Str.272 Str.273;
|
||||
let Str.269 : Int1 = StructAtIndex 2 Str.77;
|
||||
if Str.269 then
|
||||
let Str.271 : Str = StructAtIndex 1 Str.77;
|
||||
inc Str.271;
|
||||
dec Str.77;
|
||||
let Str.270 : [C {U64, U8}, C Str] = TagId(1) Str.271;
|
||||
ret Str.270;
|
||||
else
|
||||
let Str.253 : U8 = StructAtIndex 3 Str.74;
|
||||
let Str.254 : U64 = StructAtIndex 0 Str.74;
|
||||
dec Str.74;
|
||||
let Str.252 : {U64, U8} = Struct {Str.254, Str.253};
|
||||
let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252;
|
||||
ret Str.251;
|
||||
let Str.267 : U8 = StructAtIndex 3 Str.77;
|
||||
let Str.268 : U64 = StructAtIndex 0 Str.77;
|
||||
dec Str.77;
|
||||
let Str.266 : {U64, U8} = Struct {Str.268, Str.267};
|
||||
let Str.265 : [C {U64, U8}, C Str] = TagId(0) Str.266;
|
||||
ret Str.265;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.9 : Str = "abc";
|
||||
|
|
|
@ -27,11 +27,11 @@ procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
|||
ret Encode.106;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.113 : List U8 = CallByName Json.127 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.113 : List U8 = CallByName Json.126 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.113;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.116 : List U8 = CallByName Json.97 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.116 : List U8 = CallByName Json.96 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.116;
|
||||
|
||||
procedure Encode.25 (Encode.100, Encode.101):
|
||||
|
@ -41,195 +41,195 @@ procedure Encode.25 (Encode.100, Encode.101):
|
|||
ret Encode.103;
|
||||
|
||||
procedure Json.1 ():
|
||||
let Json.396 : {} = Struct {};
|
||||
ret Json.396;
|
||||
let Json.394 : {} = Struct {};
|
||||
ret Json.394;
|
||||
|
||||
procedure Json.127 (Json.128, Json.399, #Attr.12):
|
||||
let Json.126 : List Str = StructAtIndex 1 #Attr.12;
|
||||
inc Json.126;
|
||||
let Json.125 : Str = StructAtIndex 0 #Attr.12;
|
||||
procedure Json.126 (Json.127, Json.397, #Attr.12):
|
||||
let Json.125 : List Str = StructAtIndex 1 #Attr.12;
|
||||
inc Json.125;
|
||||
let Json.124 : Str = StructAtIndex 0 #Attr.12;
|
||||
inc Json.124;
|
||||
dec #Attr.12;
|
||||
let Json.437 : I32 = 123i64;
|
||||
let Json.436 : U8 = CallByName Num.123 Json.437;
|
||||
let Json.433 : List U8 = CallByName List.4 Json.128 Json.436;
|
||||
let Json.435 : I32 = 34i64;
|
||||
let Json.434 : U8 = CallByName Num.123 Json.435;
|
||||
let Json.431 : List U8 = CallByName List.4 Json.433 Json.434;
|
||||
let Json.432 : List U8 = CallByName Str.12 Json.125;
|
||||
let Json.428 : List U8 = CallByName List.8 Json.431 Json.432;
|
||||
let Json.430 : I32 = 34i64;
|
||||
let Json.429 : U8 = CallByName Num.123 Json.430;
|
||||
let Json.425 : List U8 = CallByName List.4 Json.428 Json.429;
|
||||
let Json.427 : I32 = 58i64;
|
||||
let Json.426 : U8 = CallByName Num.123 Json.427;
|
||||
let Json.422 : List U8 = CallByName List.4 Json.425 Json.426;
|
||||
let Json.424 : I32 = 91i64;
|
||||
let Json.423 : U8 = CallByName Num.123 Json.424;
|
||||
let Json.130 : List U8 = CallByName List.4 Json.422 Json.423;
|
||||
let Json.421 : U64 = CallByName List.6 Json.126;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.130, Json.421};
|
||||
let Json.410 : {} = Struct {};
|
||||
let Json.408 : {List U8, U64} = CallByName List.18 Json.126 Json.409 Json.410;
|
||||
dec Json.126;
|
||||
let Json.132 : List U8 = StructAtIndex 0 Json.408;
|
||||
let Json.435 : I64 = 123i64;
|
||||
let Json.434 : U8 = CallByName Num.125 Json.435;
|
||||
let Json.431 : List U8 = CallByName List.4 Json.127 Json.434;
|
||||
let Json.433 : I64 = 34i64;
|
||||
let Json.432 : U8 = CallByName Num.125 Json.433;
|
||||
let Json.429 : List U8 = CallByName List.4 Json.431 Json.432;
|
||||
let Json.430 : List U8 = CallByName Str.12 Json.124;
|
||||
let Json.426 : List U8 = CallByName List.8 Json.429 Json.430;
|
||||
let Json.428 : I64 = 34i64;
|
||||
let Json.427 : U8 = CallByName Num.125 Json.428;
|
||||
let Json.423 : List U8 = CallByName List.4 Json.426 Json.427;
|
||||
let Json.425 : I64 = 58i64;
|
||||
let Json.424 : U8 = CallByName Num.125 Json.425;
|
||||
let Json.420 : List U8 = CallByName List.4 Json.423 Json.424;
|
||||
let Json.422 : I64 = 91i64;
|
||||
let Json.421 : U8 = CallByName Num.125 Json.422;
|
||||
let Json.129 : List U8 = CallByName List.4 Json.420 Json.421;
|
||||
let Json.419 : U64 = CallByName List.6 Json.125;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.129, Json.419};
|
||||
let Json.408 : {} = Struct {};
|
||||
let Json.406 : {List U8, U64} = CallByName List.18 Json.125 Json.407 Json.408;
|
||||
dec Json.125;
|
||||
let Json.131 : List U8 = StructAtIndex 0 Json.406;
|
||||
inc Json.131;
|
||||
dec Json.406;
|
||||
let Json.405 : I64 = 93i64;
|
||||
let Json.404 : U8 = CallByName Num.125 Json.405;
|
||||
let Json.401 : List U8 = CallByName List.4 Json.131 Json.404;
|
||||
let Json.403 : I64 = 125i64;
|
||||
let Json.402 : U8 = CallByName Num.125 Json.403;
|
||||
let Json.400 : List U8 = CallByName List.4 Json.401 Json.402;
|
||||
ret Json.400;
|
||||
|
||||
procedure Json.128 (Json.399, Json.134):
|
||||
let Json.132 : List U8 = StructAtIndex 0 Json.399;
|
||||
inc Json.132;
|
||||
dec Json.408;
|
||||
let Json.407 : I32 = 93i64;
|
||||
let Json.406 : U8 = CallByName Num.123 Json.407;
|
||||
let Json.403 : List U8 = CallByName List.4 Json.132 Json.406;
|
||||
let Json.405 : I32 = 125i64;
|
||||
let Json.404 : U8 = CallByName Num.123 Json.405;
|
||||
let Json.402 : List U8 = CallByName List.4 Json.403 Json.404;
|
||||
ret Json.402;
|
||||
|
||||
procedure Json.129 (Json.401, Json.135):
|
||||
let Json.133 : List U8 = StructAtIndex 0 Json.401;
|
||||
inc Json.133;
|
||||
let Json.134 : U64 = StructAtIndex 1 Json.401;
|
||||
dec Json.401;
|
||||
let Json.420 : {} = Struct {};
|
||||
let Json.136 : List U8 = CallByName Encode.23 Json.133 Json.135 Json.420;
|
||||
joinpoint Json.415 Json.137:
|
||||
let Json.413 : U64 = 1i64;
|
||||
let Json.412 : U64 = CallByName Num.20 Json.134 Json.413;
|
||||
let Json.411 : {List U8, U64} = Struct {Json.137, Json.412};
|
||||
ret Json.411;
|
||||
let Json.133 : U64 = StructAtIndex 1 Json.399;
|
||||
dec Json.399;
|
||||
let Json.418 : {} = Struct {};
|
||||
let Json.135 : List U8 = CallByName Encode.23 Json.132 Json.134 Json.418;
|
||||
joinpoint Json.413 Json.136:
|
||||
let Json.411 : U64 = 1i64;
|
||||
let Json.410 : U64 = CallByName Num.20 Json.133 Json.411;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.136, Json.410};
|
||||
ret Json.409;
|
||||
in
|
||||
let Json.419 : U64 = 1i64;
|
||||
let Json.416 : Int1 = CallByName Num.24 Json.134 Json.419;
|
||||
if Json.416 then
|
||||
let Json.418 : I32 = 44i64;
|
||||
let Json.417 : U8 = CallByName Num.123 Json.418;
|
||||
let Json.414 : List U8 = CallByName List.4 Json.136 Json.417;
|
||||
jump Json.415 Json.414;
|
||||
let Json.417 : U64 = 1i64;
|
||||
let Json.414 : Int1 = CallByName Num.24 Json.133 Json.417;
|
||||
if Json.414 then
|
||||
let Json.416 : I64 = 44i64;
|
||||
let Json.415 : U8 = CallByName Num.125 Json.416;
|
||||
let Json.412 : List U8 = CallByName List.4 Json.135 Json.415;
|
||||
jump Json.413 Json.412;
|
||||
else
|
||||
jump Json.415 Json.136;
|
||||
jump Json.413 Json.135;
|
||||
|
||||
procedure Json.18 (Json.96):
|
||||
let Json.438 : Str = CallByName Encode.22 Json.96;
|
||||
ret Json.438;
|
||||
procedure Json.18 (Json.95):
|
||||
let Json.436 : Str = CallByName Encode.22 Json.95;
|
||||
ret Json.436;
|
||||
|
||||
procedure Json.21 (Json.125, Json.126):
|
||||
let Json.398 : {Str, List Str} = Struct {Json.125, Json.126};
|
||||
let Json.397 : {Str, List Str} = CallByName Encode.22 Json.398;
|
||||
ret Json.397;
|
||||
procedure Json.21 (Json.124, Json.125):
|
||||
let Json.396 : {Str, List Str} = Struct {Json.124, Json.125};
|
||||
let Json.395 : {Str, List Str} = CallByName Encode.22 Json.396;
|
||||
ret Json.395;
|
||||
|
||||
procedure Json.97 (Json.98, Json.440, Json.96):
|
||||
let Json.449 : I32 = 34i64;
|
||||
let Json.448 : U8 = CallByName Num.123 Json.449;
|
||||
let Json.446 : List U8 = CallByName List.4 Json.98 Json.448;
|
||||
let Json.447 : List U8 = CallByName Str.12 Json.96;
|
||||
let Json.443 : List U8 = CallByName List.8 Json.446 Json.447;
|
||||
let Json.445 : I32 = 34i64;
|
||||
let Json.444 : U8 = CallByName Num.123 Json.445;
|
||||
let Json.442 : List U8 = CallByName List.4 Json.443 Json.444;
|
||||
ret Json.442;
|
||||
procedure Json.96 (Json.97, Json.438, Json.95):
|
||||
let Json.447 : I64 = 34i64;
|
||||
let Json.446 : U8 = CallByName Num.125 Json.447;
|
||||
let Json.444 : List U8 = CallByName List.4 Json.97 Json.446;
|
||||
let Json.445 : List U8 = CallByName Str.12 Json.95;
|
||||
let Json.441 : List U8 = CallByName List.8 Json.444 Json.445;
|
||||
let Json.443 : I64 = 34i64;
|
||||
let Json.442 : U8 = CallByName Num.125 Json.443;
|
||||
let Json.440 : List U8 = CallByName List.4 Json.441 Json.442;
|
||||
ret Json.440;
|
||||
|
||||
procedure List.133 (List.134, List.135, List.132):
|
||||
let List.432 : {List U8, U64} = CallByName Json.129 List.134 List.135;
|
||||
ret List.432;
|
||||
procedure List.137 (List.138, List.139, List.136):
|
||||
let List.461 : {List U8, U64} = CallByName Json.128 List.138 List.139;
|
||||
ret List.461;
|
||||
|
||||
procedure List.18 (List.130, List.131, List.132):
|
||||
let List.414 : {List U8, U64} = CallByName List.75 List.130 List.131 List.132;
|
||||
ret List.414;
|
||||
procedure List.18 (List.134, List.135, List.136):
|
||||
let List.443 : {List U8, U64} = CallByName List.89 List.134 List.135 List.136;
|
||||
ret List.443;
|
||||
|
||||
procedure List.4 (List.101, List.102):
|
||||
let List.413 : U64 = 1i64;
|
||||
let List.412 : List U8 = CallByName List.70 List.101 List.413;
|
||||
let List.411 : List U8 = CallByName List.71 List.412 List.102;
|
||||
ret List.411;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.442 : U64 = 1i64;
|
||||
let List.441 : List U8 = CallByName List.70 List.105 List.442;
|
||||
let List.440 : List U8 = CallByName List.71 List.441 List.106;
|
||||
ret List.440;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.433 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.433;
|
||||
let List.462 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.462;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.429 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.429;
|
||||
let List.458 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.458;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.386 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.386;
|
||||
let List.415 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.415;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.384 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
|
||||
procedure List.75 (List.356, List.357, List.358):
|
||||
let List.418 : U64 = 0i64;
|
||||
let List.419 : U64 = CallByName List.6 List.356;
|
||||
let List.417 : {List U8, U64} = CallByName List.86 List.356 List.357 List.358 List.418 List.419;
|
||||
ret List.417;
|
||||
let List.413 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.8 (#Attr.2, #Attr.3):
|
||||
let List.435 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.435;
|
||||
let List.464 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.464;
|
||||
|
||||
procedure List.86 (List.445, List.446, List.447, List.448, List.449):
|
||||
joinpoint List.420 List.359 List.360 List.361 List.362 List.363:
|
||||
let List.422 : Int1 = CallByName Num.22 List.362 List.363;
|
||||
if List.422 then
|
||||
let List.428 : Str = CallByName List.66 List.359 List.362;
|
||||
let List.423 : {List U8, U64} = CallByName List.133 List.360 List.428 List.361;
|
||||
let List.426 : U64 = 1i64;
|
||||
let List.425 : U64 = CallByName Num.19 List.362 List.426;
|
||||
jump List.420 List.359 List.423 List.361 List.425 List.363;
|
||||
procedure List.89 (List.385, List.386, List.387):
|
||||
let List.447 : U64 = 0i64;
|
||||
let List.448 : U64 = CallByName List.6 List.385;
|
||||
let List.446 : {List U8, U64} = CallByName List.90 List.385 List.386 List.387 List.447 List.448;
|
||||
ret List.446;
|
||||
|
||||
procedure List.90 (List.474, List.475, List.476, List.477, List.478):
|
||||
joinpoint List.449 List.388 List.389 List.390 List.391 List.392:
|
||||
let List.451 : Int1 = CallByName Num.22 List.391 List.392;
|
||||
if List.451 then
|
||||
let List.457 : Str = CallByName List.66 List.388 List.391;
|
||||
let List.452 : {List U8, U64} = CallByName List.137 List.389 List.457 List.390;
|
||||
let List.455 : U64 = 1i64;
|
||||
let List.454 : U64 = CallByName Num.19 List.391 List.455;
|
||||
jump List.449 List.388 List.452 List.390 List.454 List.392;
|
||||
else
|
||||
ret List.360;
|
||||
ret List.389;
|
||||
in
|
||||
jump List.420 List.445 List.446 List.447 List.448 List.449;
|
||||
jump List.449 List.474 List.475 List.476 List.477 List.478;
|
||||
|
||||
procedure Num.123 (#Attr.2):
|
||||
let Num.266 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.266;
|
||||
procedure Num.125 (#Attr.2):
|
||||
let Num.265 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.265;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.269 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.269;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.267 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.270 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.270;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.268 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
let Num.268 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.268;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.266 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.266;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.269 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.269;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.267 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Str.12 (#Attr.2):
|
||||
let Str.266 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.266;
|
||||
let Str.280 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.280;
|
||||
|
||||
procedure Str.48 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.260;
|
||||
let Str.274 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.274;
|
||||
|
||||
procedure Str.9 (Str.73):
|
||||
let Str.258 : U64 = 0i64;
|
||||
let Str.259 : U64 = CallByName List.6 Str.73;
|
||||
let Str.74 : {U64, Str, Int1, U8} = CallByName Str.48 Str.73 Str.258 Str.259;
|
||||
let Str.255 : Int1 = StructAtIndex 2 Str.74;
|
||||
if Str.255 then
|
||||
let Str.257 : Str = StructAtIndex 1 Str.74;
|
||||
inc Str.257;
|
||||
dec Str.74;
|
||||
let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257;
|
||||
ret Str.256;
|
||||
procedure Str.9 (Str.76):
|
||||
let Str.272 : U64 = 0i64;
|
||||
let Str.273 : U64 = CallByName List.6 Str.76;
|
||||
let Str.77 : {U64, Str, Int1, U8} = CallByName Str.48 Str.76 Str.272 Str.273;
|
||||
let Str.269 : Int1 = StructAtIndex 2 Str.77;
|
||||
if Str.269 then
|
||||
let Str.271 : Str = StructAtIndex 1 Str.77;
|
||||
inc Str.271;
|
||||
dec Str.77;
|
||||
let Str.270 : [C {U64, U8}, C Str] = TagId(1) Str.271;
|
||||
ret Str.270;
|
||||
else
|
||||
let Str.253 : U8 = StructAtIndex 3 Str.74;
|
||||
let Str.254 : U64 = StructAtIndex 0 Str.74;
|
||||
dec Str.74;
|
||||
let Str.252 : {U64, U8} = Struct {Str.254, Str.253};
|
||||
let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252;
|
||||
ret Str.251;
|
||||
let Str.267 : U8 = StructAtIndex 3 Str.77;
|
||||
let Str.268 : U64 = StructAtIndex 0 Str.77;
|
||||
dec Str.77;
|
||||
let Str.266 : {U64, U8} = Struct {Str.268, Str.267};
|
||||
let Str.265 : [C {U64, U8}, C Str] = TagId(0) Str.266;
|
||||
ret Str.265;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.12 : Str = "foo";
|
||||
|
|
|
@ -33,11 +33,11 @@ procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
|||
ret Encode.106;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.113 : List U8 = CallByName Json.127 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.113 : List U8 = CallByName Json.126 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.113;
|
||||
|
||||
procedure Encode.23 (Encode.94, Encode.102, Encode.96):
|
||||
let Encode.117 : List U8 = CallByName Json.97 Encode.94 Encode.96 Encode.102;
|
||||
let Encode.117 : List U8 = CallByName Json.96 Encode.94 Encode.96 Encode.102;
|
||||
ret Encode.117;
|
||||
|
||||
procedure Encode.25 (Encode.100, Encode.101):
|
||||
|
@ -47,195 +47,195 @@ procedure Encode.25 (Encode.100, Encode.101):
|
|||
ret Encode.103;
|
||||
|
||||
procedure Json.1 ():
|
||||
let Json.396 : {} = Struct {};
|
||||
ret Json.396;
|
||||
let Json.394 : {} = Struct {};
|
||||
ret Json.394;
|
||||
|
||||
procedure Json.127 (Json.128, Json.399, #Attr.12):
|
||||
let Json.126 : List Str = StructAtIndex 1 #Attr.12;
|
||||
inc Json.126;
|
||||
let Json.125 : Str = StructAtIndex 0 #Attr.12;
|
||||
procedure Json.126 (Json.127, Json.397, #Attr.12):
|
||||
let Json.125 : List Str = StructAtIndex 1 #Attr.12;
|
||||
inc Json.125;
|
||||
let Json.124 : Str = StructAtIndex 0 #Attr.12;
|
||||
inc Json.124;
|
||||
dec #Attr.12;
|
||||
let Json.437 : I32 = 123i64;
|
||||
let Json.436 : U8 = CallByName Num.123 Json.437;
|
||||
let Json.433 : List U8 = CallByName List.4 Json.128 Json.436;
|
||||
let Json.435 : I32 = 34i64;
|
||||
let Json.434 : U8 = CallByName Num.123 Json.435;
|
||||
let Json.431 : List U8 = CallByName List.4 Json.433 Json.434;
|
||||
let Json.432 : List U8 = CallByName Str.12 Json.125;
|
||||
let Json.428 : List U8 = CallByName List.8 Json.431 Json.432;
|
||||
let Json.430 : I32 = 34i64;
|
||||
let Json.429 : U8 = CallByName Num.123 Json.430;
|
||||
let Json.425 : List U8 = CallByName List.4 Json.428 Json.429;
|
||||
let Json.427 : I32 = 58i64;
|
||||
let Json.426 : U8 = CallByName Num.123 Json.427;
|
||||
let Json.422 : List U8 = CallByName List.4 Json.425 Json.426;
|
||||
let Json.424 : I32 = 91i64;
|
||||
let Json.423 : U8 = CallByName Num.123 Json.424;
|
||||
let Json.130 : List U8 = CallByName List.4 Json.422 Json.423;
|
||||
let Json.421 : U64 = CallByName List.6 Json.126;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.130, Json.421};
|
||||
let Json.410 : {} = Struct {};
|
||||
let Json.408 : {List U8, U64} = CallByName List.18 Json.126 Json.409 Json.410;
|
||||
dec Json.126;
|
||||
let Json.132 : List U8 = StructAtIndex 0 Json.408;
|
||||
let Json.435 : I64 = 123i64;
|
||||
let Json.434 : U8 = CallByName Num.125 Json.435;
|
||||
let Json.431 : List U8 = CallByName List.4 Json.127 Json.434;
|
||||
let Json.433 : I64 = 34i64;
|
||||
let Json.432 : U8 = CallByName Num.125 Json.433;
|
||||
let Json.429 : List U8 = CallByName List.4 Json.431 Json.432;
|
||||
let Json.430 : List U8 = CallByName Str.12 Json.124;
|
||||
let Json.426 : List U8 = CallByName List.8 Json.429 Json.430;
|
||||
let Json.428 : I64 = 34i64;
|
||||
let Json.427 : U8 = CallByName Num.125 Json.428;
|
||||
let Json.423 : List U8 = CallByName List.4 Json.426 Json.427;
|
||||
let Json.425 : I64 = 58i64;
|
||||
let Json.424 : U8 = CallByName Num.125 Json.425;
|
||||
let Json.420 : List U8 = CallByName List.4 Json.423 Json.424;
|
||||
let Json.422 : I64 = 91i64;
|
||||
let Json.421 : U8 = CallByName Num.125 Json.422;
|
||||
let Json.129 : List U8 = CallByName List.4 Json.420 Json.421;
|
||||
let Json.419 : U64 = CallByName List.6 Json.125;
|
||||
let Json.407 : {List U8, U64} = Struct {Json.129, Json.419};
|
||||
let Json.408 : {} = Struct {};
|
||||
let Json.406 : {List U8, U64} = CallByName List.18 Json.125 Json.407 Json.408;
|
||||
dec Json.125;
|
||||
let Json.131 : List U8 = StructAtIndex 0 Json.406;
|
||||
inc Json.131;
|
||||
dec Json.406;
|
||||
let Json.405 : I64 = 93i64;
|
||||
let Json.404 : U8 = CallByName Num.125 Json.405;
|
||||
let Json.401 : List U8 = CallByName List.4 Json.131 Json.404;
|
||||
let Json.403 : I64 = 125i64;
|
||||
let Json.402 : U8 = CallByName Num.125 Json.403;
|
||||
let Json.400 : List U8 = CallByName List.4 Json.401 Json.402;
|
||||
ret Json.400;
|
||||
|
||||
procedure Json.128 (Json.399, Json.134):
|
||||
let Json.132 : List U8 = StructAtIndex 0 Json.399;
|
||||
inc Json.132;
|
||||
dec Json.408;
|
||||
let Json.407 : I32 = 93i64;
|
||||
let Json.406 : U8 = CallByName Num.123 Json.407;
|
||||
let Json.403 : List U8 = CallByName List.4 Json.132 Json.406;
|
||||
let Json.405 : I32 = 125i64;
|
||||
let Json.404 : U8 = CallByName Num.123 Json.405;
|
||||
let Json.402 : List U8 = CallByName List.4 Json.403 Json.404;
|
||||
ret Json.402;
|
||||
|
||||
procedure Json.129 (Json.401, Json.135):
|
||||
let Json.133 : List U8 = StructAtIndex 0 Json.401;
|
||||
inc Json.133;
|
||||
let Json.134 : U64 = StructAtIndex 1 Json.401;
|
||||
dec Json.401;
|
||||
let Json.420 : {} = Struct {};
|
||||
let Json.136 : List U8 = CallByName Encode.23 Json.133 Json.135 Json.420;
|
||||
joinpoint Json.415 Json.137:
|
||||
let Json.413 : U64 = 1i64;
|
||||
let Json.412 : U64 = CallByName Num.20 Json.134 Json.413;
|
||||
let Json.411 : {List U8, U64} = Struct {Json.137, Json.412};
|
||||
ret Json.411;
|
||||
let Json.133 : U64 = StructAtIndex 1 Json.399;
|
||||
dec Json.399;
|
||||
let Json.418 : {} = Struct {};
|
||||
let Json.135 : List U8 = CallByName Encode.23 Json.132 Json.134 Json.418;
|
||||
joinpoint Json.413 Json.136:
|
||||
let Json.411 : U64 = 1i64;
|
||||
let Json.410 : U64 = CallByName Num.20 Json.133 Json.411;
|
||||
let Json.409 : {List U8, U64} = Struct {Json.136, Json.410};
|
||||
ret Json.409;
|
||||
in
|
||||
let Json.419 : U64 = 1i64;
|
||||
let Json.416 : Int1 = CallByName Num.24 Json.134 Json.419;
|
||||
if Json.416 then
|
||||
let Json.418 : I32 = 44i64;
|
||||
let Json.417 : U8 = CallByName Num.123 Json.418;
|
||||
let Json.414 : List U8 = CallByName List.4 Json.136 Json.417;
|
||||
jump Json.415 Json.414;
|
||||
let Json.417 : U64 = 1i64;
|
||||
let Json.414 : Int1 = CallByName Num.24 Json.133 Json.417;
|
||||
if Json.414 then
|
||||
let Json.416 : I64 = 44i64;
|
||||
let Json.415 : U8 = CallByName Num.125 Json.416;
|
||||
let Json.412 : List U8 = CallByName List.4 Json.135 Json.415;
|
||||
jump Json.413 Json.412;
|
||||
else
|
||||
jump Json.415 Json.136;
|
||||
jump Json.413 Json.135;
|
||||
|
||||
procedure Json.18 (Json.96):
|
||||
let Json.450 : Str = CallByName Encode.22 Json.96;
|
||||
ret Json.450;
|
||||
procedure Json.18 (Json.95):
|
||||
let Json.448 : Str = CallByName Encode.22 Json.95;
|
||||
ret Json.448;
|
||||
|
||||
procedure Json.21 (Json.125, Json.126):
|
||||
let Json.398 : {Str, List Str} = Struct {Json.125, Json.126};
|
||||
let Json.397 : {Str, List Str} = CallByName Encode.22 Json.398;
|
||||
ret Json.397;
|
||||
procedure Json.21 (Json.124, Json.125):
|
||||
let Json.396 : {Str, List Str} = Struct {Json.124, Json.125};
|
||||
let Json.395 : {Str, List Str} = CallByName Encode.22 Json.396;
|
||||
ret Json.395;
|
||||
|
||||
procedure Json.97 (Json.98, Json.440, Json.96):
|
||||
let Json.449 : I32 = 34i64;
|
||||
let Json.448 : U8 = CallByName Num.123 Json.449;
|
||||
let Json.446 : List U8 = CallByName List.4 Json.98 Json.448;
|
||||
let Json.447 : List U8 = CallByName Str.12 Json.96;
|
||||
let Json.443 : List U8 = CallByName List.8 Json.446 Json.447;
|
||||
let Json.445 : I32 = 34i64;
|
||||
let Json.444 : U8 = CallByName Num.123 Json.445;
|
||||
let Json.442 : List U8 = CallByName List.4 Json.443 Json.444;
|
||||
ret Json.442;
|
||||
procedure Json.96 (Json.97, Json.438, Json.95):
|
||||
let Json.447 : I64 = 34i64;
|
||||
let Json.446 : U8 = CallByName Num.125 Json.447;
|
||||
let Json.444 : List U8 = CallByName List.4 Json.97 Json.446;
|
||||
let Json.445 : List U8 = CallByName Str.12 Json.95;
|
||||
let Json.441 : List U8 = CallByName List.8 Json.444 Json.445;
|
||||
let Json.443 : I64 = 34i64;
|
||||
let Json.442 : U8 = CallByName Num.125 Json.443;
|
||||
let Json.440 : List U8 = CallByName List.4 Json.441 Json.442;
|
||||
ret Json.440;
|
||||
|
||||
procedure List.133 (List.134, List.135, List.132):
|
||||
let List.432 : {List U8, U64} = CallByName Json.129 List.134 List.135;
|
||||
ret List.432;
|
||||
procedure List.137 (List.138, List.139, List.136):
|
||||
let List.461 : {List U8, U64} = CallByName Json.128 List.138 List.139;
|
||||
ret List.461;
|
||||
|
||||
procedure List.18 (List.130, List.131, List.132):
|
||||
let List.414 : {List U8, U64} = CallByName List.75 List.130 List.131 List.132;
|
||||
ret List.414;
|
||||
procedure List.18 (List.134, List.135, List.136):
|
||||
let List.443 : {List U8, U64} = CallByName List.89 List.134 List.135 List.136;
|
||||
ret List.443;
|
||||
|
||||
procedure List.4 (List.101, List.102):
|
||||
let List.413 : U64 = 1i64;
|
||||
let List.412 : List U8 = CallByName List.70 List.101 List.413;
|
||||
let List.411 : List U8 = CallByName List.71 List.412 List.102;
|
||||
ret List.411;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.442 : U64 = 1i64;
|
||||
let List.441 : List U8 = CallByName List.70 List.105 List.442;
|
||||
let List.440 : List U8 = CallByName List.71 List.441 List.106;
|
||||
ret List.440;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.433 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.433;
|
||||
let List.462 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.462;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.429 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.429;
|
||||
let List.458 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.458;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.386 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.386;
|
||||
let List.415 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.415;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.384 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
|
||||
procedure List.75 (List.356, List.357, List.358):
|
||||
let List.418 : U64 = 0i64;
|
||||
let List.419 : U64 = CallByName List.6 List.356;
|
||||
let List.417 : {List U8, U64} = CallByName List.86 List.356 List.357 List.358 List.418 List.419;
|
||||
ret List.417;
|
||||
let List.413 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.8 (#Attr.2, #Attr.3):
|
||||
let List.435 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.435;
|
||||
let List.464 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3;
|
||||
ret List.464;
|
||||
|
||||
procedure List.86 (List.445, List.446, List.447, List.448, List.449):
|
||||
joinpoint List.420 List.359 List.360 List.361 List.362 List.363:
|
||||
let List.422 : Int1 = CallByName Num.22 List.362 List.363;
|
||||
if List.422 then
|
||||
let List.428 : Str = CallByName List.66 List.359 List.362;
|
||||
let List.423 : {List U8, U64} = CallByName List.133 List.360 List.428 List.361;
|
||||
let List.426 : U64 = 1i64;
|
||||
let List.425 : U64 = CallByName Num.19 List.362 List.426;
|
||||
jump List.420 List.359 List.423 List.361 List.425 List.363;
|
||||
procedure List.89 (List.385, List.386, List.387):
|
||||
let List.447 : U64 = 0i64;
|
||||
let List.448 : U64 = CallByName List.6 List.385;
|
||||
let List.446 : {List U8, U64} = CallByName List.90 List.385 List.386 List.387 List.447 List.448;
|
||||
ret List.446;
|
||||
|
||||
procedure List.90 (List.474, List.475, List.476, List.477, List.478):
|
||||
joinpoint List.449 List.388 List.389 List.390 List.391 List.392:
|
||||
let List.451 : Int1 = CallByName Num.22 List.391 List.392;
|
||||
if List.451 then
|
||||
let List.457 : Str = CallByName List.66 List.388 List.391;
|
||||
let List.452 : {List U8, U64} = CallByName List.137 List.389 List.457 List.390;
|
||||
let List.455 : U64 = 1i64;
|
||||
let List.454 : U64 = CallByName Num.19 List.391 List.455;
|
||||
jump List.449 List.388 List.452 List.390 List.454 List.392;
|
||||
else
|
||||
ret List.360;
|
||||
ret List.389;
|
||||
in
|
||||
jump List.420 List.445 List.446 List.447 List.448 List.449;
|
||||
jump List.449 List.474 List.475 List.476 List.477 List.478;
|
||||
|
||||
procedure Num.123 (#Attr.2):
|
||||
let Num.266 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.266;
|
||||
procedure Num.125 (#Attr.2):
|
||||
let Num.265 : U8 = lowlevel NumIntCast #Attr.2;
|
||||
ret Num.265;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.269 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.269;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.267 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.270 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.270;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.268 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
let Num.268 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.268;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.266 : U64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.266;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.269 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.269;
|
||||
|
||||
procedure Num.24 (#Attr.2, #Attr.3):
|
||||
let Num.267 : Int1 = lowlevel NumGt #Attr.2 #Attr.3;
|
||||
ret Num.267;
|
||||
|
||||
procedure Str.12 (#Attr.2):
|
||||
let Str.266 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.266;
|
||||
let Str.280 : List U8 = lowlevel StrToUtf8 #Attr.2;
|
||||
ret Str.280;
|
||||
|
||||
procedure Str.48 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let Str.260 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.260;
|
||||
let Str.274 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8Range #Attr.2 #Attr.3 #Attr.4;
|
||||
ret Str.274;
|
||||
|
||||
procedure Str.9 (Str.73):
|
||||
let Str.258 : U64 = 0i64;
|
||||
let Str.259 : U64 = CallByName List.6 Str.73;
|
||||
let Str.74 : {U64, Str, Int1, U8} = CallByName Str.48 Str.73 Str.258 Str.259;
|
||||
let Str.255 : Int1 = StructAtIndex 2 Str.74;
|
||||
if Str.255 then
|
||||
let Str.257 : Str = StructAtIndex 1 Str.74;
|
||||
inc Str.257;
|
||||
dec Str.74;
|
||||
let Str.256 : [C {U64, U8}, C Str] = TagId(1) Str.257;
|
||||
ret Str.256;
|
||||
procedure Str.9 (Str.76):
|
||||
let Str.272 : U64 = 0i64;
|
||||
let Str.273 : U64 = CallByName List.6 Str.76;
|
||||
let Str.77 : {U64, Str, Int1, U8} = CallByName Str.48 Str.76 Str.272 Str.273;
|
||||
let Str.269 : Int1 = StructAtIndex 2 Str.77;
|
||||
if Str.269 then
|
||||
let Str.271 : Str = StructAtIndex 1 Str.77;
|
||||
inc Str.271;
|
||||
dec Str.77;
|
||||
let Str.270 : [C {U64, U8}, C Str] = TagId(1) Str.271;
|
||||
ret Str.270;
|
||||
else
|
||||
let Str.253 : U8 = StructAtIndex 3 Str.74;
|
||||
let Str.254 : U64 = StructAtIndex 0 Str.74;
|
||||
dec Str.74;
|
||||
let Str.252 : {U64, U8} = Struct {Str.254, Str.253};
|
||||
let Str.251 : [C {U64, U8}, C Str] = TagId(0) Str.252;
|
||||
ret Str.251;
|
||||
let Str.267 : U8 = StructAtIndex 3 Str.77;
|
||||
let Str.268 : U64 = StructAtIndex 0 Str.77;
|
||||
dec Str.77;
|
||||
let Str.266 : {U64, U8} = Struct {Str.268, Str.267};
|
||||
let Str.265 : [C {U64, U8}, C Str] = TagId(0) Str.266;
|
||||
ret Str.265;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.13 : Str = "foo";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.258 : I64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
let Num.257 : I64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
|
||||
procedure Num.21 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumMul #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumMul #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.1 (Test.15, Test.16):
|
||||
joinpoint Test.7 Test.2 Test.3:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Bool.1 ():
|
||||
let Bool.11 : Int1 = false;
|
||||
ret Bool.11;
|
||||
let Bool.23 : Int1 = false;
|
||||
ret Bool.23;
|
||||
|
||||
procedure Test.1 (Test.2):
|
||||
let Test.5 : I64 = 2i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Bool.7 (#Attr.2, #Attr.3):
|
||||
let Bool.11 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.11;
|
||||
procedure Bool.11 (#Attr.2, #Attr.3):
|
||||
let Bool.23 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.23;
|
||||
|
||||
procedure Test.1 (Test.3):
|
||||
let Test.6 : I64 = 10i64;
|
||||
|
@ -13,7 +13,7 @@ procedure Test.1 (Test.3):
|
|||
ret Test.11;
|
||||
in
|
||||
let Test.10 : I64 = 5i64;
|
||||
let Test.9 : Int1 = CallByName Bool.7 Test.6 Test.10;
|
||||
let Test.9 : Int1 = CallByName Bool.11 Test.6 Test.10;
|
||||
jump Test.8 Test.9;
|
||||
|
||||
procedure Test.0 ():
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
procedure Bool.1 ():
|
||||
let Bool.11 : Int1 = false;
|
||||
ret Bool.11;
|
||||
let Bool.23 : Int1 = false;
|
||||
ret Bool.23;
|
||||
|
||||
procedure Bool.2 ():
|
||||
let Bool.12 : Int1 = true;
|
||||
ret Bool.12;
|
||||
let Bool.24 : Int1 = true;
|
||||
ret Bool.24;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.4 : Int1 = CallByName Bool.2;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.259 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.259;
|
||||
let Num.258 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.1 : List I64 = Array [1i64, 2i64];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : I64 = 1i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.45 (#Attr.2):
|
||||
let Num.257 : I64 = lowlevel NumRound #Attr.2;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumRound #Attr.2;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : Float64 = 3.6f64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.1 : I64 = 3i64;
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
procedure Bool.7 (#Attr.2, #Attr.3):
|
||||
let Bool.11 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.11;
|
||||
procedure Num.30 (#Attr.2):
|
||||
let Num.263 : I64 = 0i64;
|
||||
let Num.262 : Int1 = lowlevel Eq #Attr.2 Num.263;
|
||||
ret Num.262;
|
||||
|
||||
procedure Num.39 (#Attr.2, #Attr.3):
|
||||
let Num.259 : I64 = lowlevel NumDivTruncUnchecked #Attr.2 #Attr.3;
|
||||
ret Num.259;
|
||||
let Num.258 : I64 = lowlevel NumDivTruncUnchecked #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
|
||||
procedure Num.40 (Num.229, Num.230):
|
||||
let Num.263 : I64 = 0i64;
|
||||
let Num.260 : Int1 = CallByName Bool.7 Num.230 Num.263;
|
||||
if Num.260 then
|
||||
let Num.262 : {} = Struct {};
|
||||
let Num.261 : [C {}, C I64] = TagId(0) Num.262;
|
||||
ret Num.261;
|
||||
procedure Num.40 (Num.228, Num.229):
|
||||
let Num.259 : Int1 = CallByName Num.30 Num.229;
|
||||
if Num.259 then
|
||||
let Num.261 : {} = Struct {};
|
||||
let Num.260 : [C {}, C I64] = TagId(0) Num.261;
|
||||
ret Num.260;
|
||||
else
|
||||
let Num.258 : I64 = CallByName Num.39 Num.229 Num.230;
|
||||
let Num.257 : [C {}, C I64] = TagId(1) Num.258;
|
||||
ret Num.257;
|
||||
let Num.257 : I64 = CallByName Num.39 Num.228 Num.229;
|
||||
let Num.256 : [C {}, C I64] = TagId(1) Num.257;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.8 : I64 = 1000i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.10 : I64 = 41i64;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
procedure Bool.1 ():
|
||||
let Bool.12 : Int1 = false;
|
||||
ret Bool.12;
|
||||
let Bool.24 : Int1 = false;
|
||||
ret Bool.24;
|
||||
|
||||
procedure Bool.2 ():
|
||||
let Bool.11 : Int1 = true;
|
||||
ret Bool.11;
|
||||
let Bool.23 : Int1 = true;
|
||||
ret Bool.23;
|
||||
|
||||
procedure Test.2 (Test.4):
|
||||
let Test.11 : U8 = 1i64;
|
||||
|
|
|
@ -1,71 +1,71 @@
|
|||
procedure Bool.11 (#Attr.2, #Attr.3):
|
||||
let Bool.24 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.24;
|
||||
|
||||
procedure Bool.2 ():
|
||||
let Bool.11 : Int1 = true;
|
||||
ret Bool.11;
|
||||
let Bool.23 : Int1 = true;
|
||||
ret Bool.23;
|
||||
|
||||
procedure Bool.7 (#Attr.2, #Attr.3):
|
||||
let Bool.12 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.12;
|
||||
|
||||
procedure List.2 (List.90, List.91):
|
||||
let List.394 : U64 = CallByName List.6 List.90;
|
||||
let List.390 : Int1 = CallByName Num.22 List.91 List.394;
|
||||
if List.390 then
|
||||
let List.392 : I64 = CallByName List.66 List.90 List.91;
|
||||
let List.391 : [C {}, C I64] = TagId(1) List.392;
|
||||
ret List.391;
|
||||
procedure List.2 (List.94, List.95):
|
||||
let List.423 : U64 = CallByName List.6 List.94;
|
||||
let List.419 : Int1 = CallByName Num.22 List.95 List.423;
|
||||
if List.419 then
|
||||
let List.421 : I64 = CallByName List.66 List.94 List.95;
|
||||
let List.420 : [C {}, C I64] = TagId(1) List.421;
|
||||
ret List.420;
|
||||
else
|
||||
let List.389 : {} = Struct {};
|
||||
let List.388 : [C {}, C I64] = TagId(0) List.389;
|
||||
ret List.388;
|
||||
let List.418 : {} = Struct {};
|
||||
let List.417 : [C {}, C I64] = TagId(0) List.418;
|
||||
ret List.417;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.395 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.395;
|
||||
let List.424 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.424;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.393 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.393;
|
||||
let List.422 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.422;
|
||||
|
||||
procedure List.9 (List.213):
|
||||
let List.387 : U64 = 0i64;
|
||||
let List.380 : [C {}, C I64] = CallByName List.2 List.213 List.387;
|
||||
let List.384 : U8 = 1i64;
|
||||
let List.385 : U8 = GetTagId List.380;
|
||||
let List.386 : Int1 = lowlevel Eq List.384 List.385;
|
||||
if List.386 then
|
||||
let List.214 : I64 = UnionAtIndex (Id 1) (Index 0) List.380;
|
||||
let List.381 : [C Int1, C I64] = TagId(1) List.214;
|
||||
ret List.381;
|
||||
procedure List.9 (List.242):
|
||||
let List.416 : U64 = 0i64;
|
||||
let List.409 : [C {}, C I64] = CallByName List.2 List.242 List.416;
|
||||
let List.413 : U8 = 1i64;
|
||||
let List.414 : U8 = GetTagId List.409;
|
||||
let List.415 : Int1 = lowlevel Eq List.413 List.414;
|
||||
if List.415 then
|
||||
let List.243 : I64 = UnionAtIndex (Id 1) (Index 0) List.409;
|
||||
let List.410 : [C Int1, C I64] = TagId(1) List.243;
|
||||
ret List.410;
|
||||
else
|
||||
let List.383 : Int1 = true;
|
||||
let List.382 : [C Int1, C I64] = TagId(0) List.383;
|
||||
ret List.382;
|
||||
let List.412 : Int1 = true;
|
||||
let List.411 : [C Int1, C I64] = TagId(0) List.412;
|
||||
ret List.411;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Str.27 (Str.93):
|
||||
let Str.251 : [C Int1, C I64] = CallByName Str.66 Str.93;
|
||||
ret Str.251;
|
||||
procedure Str.27 (Str.96):
|
||||
let Str.265 : [C Int1, C I64] = CallByName Str.69 Str.96;
|
||||
ret Str.265;
|
||||
|
||||
procedure Str.47 (#Attr.2):
|
||||
let Str.259 : {I64, U8} = lowlevel StrToNum #Attr.2;
|
||||
ret Str.259;
|
||||
let Str.273 : {I64, U8} = lowlevel StrToNum #Attr.2;
|
||||
ret Str.273;
|
||||
|
||||
procedure Str.66 (Str.222):
|
||||
let Str.223 : {I64, U8} = CallByName Str.47 Str.222;
|
||||
let Str.257 : U8 = StructAtIndex 1 Str.223;
|
||||
let Str.258 : U8 = 0i64;
|
||||
let Str.254 : Int1 = CallByName Bool.7 Str.257 Str.258;
|
||||
if Str.254 then
|
||||
let Str.256 : I64 = StructAtIndex 0 Str.223;
|
||||
let Str.255 : [C Int1, C I64] = TagId(1) Str.256;
|
||||
ret Str.255;
|
||||
procedure Str.69 (Str.231):
|
||||
let Str.232 : {I64, U8} = CallByName Str.47 Str.231;
|
||||
let Str.271 : U8 = StructAtIndex 1 Str.232;
|
||||
let Str.272 : U8 = 0i64;
|
||||
let Str.268 : Int1 = CallByName Bool.11 Str.271 Str.272;
|
||||
if Str.268 then
|
||||
let Str.270 : I64 = StructAtIndex 0 Str.232;
|
||||
let Str.269 : [C Int1, C I64] = TagId(1) Str.270;
|
||||
ret Str.269;
|
||||
else
|
||||
let Str.253 : Int1 = false;
|
||||
let Str.252 : [C Int1, C I64] = TagId(0) Str.253;
|
||||
ret Str.252;
|
||||
let Str.267 : Int1 = false;
|
||||
let Str.266 : [C Int1, C I64] = TagId(0) Str.267;
|
||||
ret Str.266;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.3 : Int1 = CallByName Bool.2;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Bool.7 (#Attr.2, #Attr.3):
|
||||
let Bool.11 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.11;
|
||||
procedure Bool.11 (#Attr.2, #Attr.3):
|
||||
let Bool.23 : Int1 = lowlevel Eq #Attr.2 #Attr.3;
|
||||
ret Bool.23;
|
||||
|
||||
procedure Test.2 (Test.19):
|
||||
joinpoint Test.13 Test.7:
|
||||
|
@ -21,6 +21,6 @@ procedure Test.0 ():
|
|||
let Test.10 : {} = CallByName Test.2 Test.12;
|
||||
dec Test.12;
|
||||
let Test.11 : {} = Struct {};
|
||||
let Test.8 : Int1 = CallByName Bool.7 Test.10 Test.11;
|
||||
let Test.8 : Int1 = CallByName Bool.11 Test.10 Test.11;
|
||||
let Test.9 : Str = "";
|
||||
ret Test.9;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
procedure Num.94 (#Attr.2):
|
||||
let Num.256 : Str = lowlevel NumToStr #Attr.2;
|
||||
ret Num.256;
|
||||
|
||||
procedure Num.94 (#Attr.2):
|
||||
let Num.257 : Str = lowlevel NumToStr #Attr.2;
|
||||
ret Num.257;
|
||||
|
||||
procedure Num.94 (#Attr.2):
|
||||
let Num.258 : Str = lowlevel NumToStr #Attr.2;
|
||||
ret Num.258;
|
||||
|
||||
procedure Test.1 (Test.4):
|
||||
let Test.16 : [C U8, C U64] = TagId(1) Test.4;
|
||||
ret Test.16;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
procedure List.4 (List.101, List.102):
|
||||
let List.383 : U64 = 1i64;
|
||||
let List.381 : List I64 = CallByName List.70 List.101 List.383;
|
||||
let List.380 : List I64 = CallByName List.71 List.381 List.102;
|
||||
ret List.380;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.412 : U64 = 1i64;
|
||||
let List.410 : List I64 = CallByName List.70 List.105 List.412;
|
||||
let List.409 : List I64 = CallByName List.71 List.410 List.106;
|
||||
ret List.409;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.384 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
let List.413 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.382 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.382;
|
||||
let List.411 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.411;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : List I64 = Array [1i64];
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
procedure List.4 (List.101, List.102):
|
||||
let List.383 : U64 = 1i64;
|
||||
let List.381 : List I64 = CallByName List.70 List.101 List.383;
|
||||
let List.380 : List I64 = CallByName List.71 List.381 List.102;
|
||||
ret List.380;
|
||||
procedure List.4 (List.105, List.106):
|
||||
let List.412 : U64 = 1i64;
|
||||
let List.410 : List I64 = CallByName List.70 List.105 List.412;
|
||||
let List.409 : List I64 = CallByName List.71 List.410 List.106;
|
||||
ret List.409;
|
||||
|
||||
procedure List.70 (#Attr.2, #Attr.3):
|
||||
let List.384 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.384;
|
||||
let List.413 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3;
|
||||
ret List.413;
|
||||
|
||||
procedure List.71 (#Attr.2, #Attr.3):
|
||||
let List.382 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.382;
|
||||
let List.411 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3;
|
||||
ret List.411;
|
||||
|
||||
procedure Test.1 (Test.2):
|
||||
let Test.6 : I64 = 42i64;
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
procedure List.3 (List.98, List.99, List.100):
|
||||
let List.383 : {List I64, I64} = CallByName List.64 List.98 List.99 List.100;
|
||||
let List.382 : List I64 = StructAtIndex 0 List.383;
|
||||
inc List.382;
|
||||
dec List.383;
|
||||
ret List.382;
|
||||
procedure List.3 (List.102, List.103, List.104):
|
||||
let List.412 : {List I64, I64} = CallByName List.64 List.102 List.103 List.104;
|
||||
let List.411 : List I64 = StructAtIndex 0 List.412;
|
||||
inc List.411;
|
||||
dec List.412;
|
||||
ret List.411;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.381 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.381;
|
||||
let List.410 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.410;
|
||||
|
||||
procedure List.64 (List.95, List.96, List.97):
|
||||
let List.388 : U64 = CallByName List.6 List.95;
|
||||
let List.385 : Int1 = CallByName Num.22 List.96 List.388;
|
||||
if List.385 then
|
||||
let List.386 : {List I64, I64} = CallByName List.67 List.95 List.96 List.97;
|
||||
ret List.386;
|
||||
procedure List.64 (List.99, List.100, List.101):
|
||||
let List.417 : U64 = CallByName List.6 List.99;
|
||||
let List.414 : Int1 = CallByName Num.22 List.100 List.417;
|
||||
if List.414 then
|
||||
let List.415 : {List I64, I64} = CallByName List.67 List.99 List.100 List.101;
|
||||
ret List.415;
|
||||
else
|
||||
let List.384 : {List I64, I64} = Struct {List.95, List.97};
|
||||
ret List.384;
|
||||
let List.413 : {List I64, I64} = Struct {List.99, List.101};
|
||||
ret List.413;
|
||||
|
||||
procedure List.67 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let List.387 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4;
|
||||
ret List.387;
|
||||
let List.416 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4;
|
||||
ret List.416;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.258 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
|
||||
procedure Test.1 ():
|
||||
let Test.8 : List I64 = Array [1i64, 2i64, 3i64];
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
procedure List.2 (List.90, List.91):
|
||||
let List.386 : U64 = CallByName List.6 List.90;
|
||||
let List.382 : Int1 = CallByName Num.22 List.91 List.386;
|
||||
if List.382 then
|
||||
let List.384 : I64 = CallByName List.66 List.90 List.91;
|
||||
let List.383 : [C {}, C I64] = TagId(1) List.384;
|
||||
ret List.383;
|
||||
procedure List.2 (List.94, List.95):
|
||||
let List.415 : U64 = CallByName List.6 List.94;
|
||||
let List.411 : Int1 = CallByName Num.22 List.95 List.415;
|
||||
if List.411 then
|
||||
let List.413 : I64 = CallByName List.66 List.94 List.95;
|
||||
let List.412 : [C {}, C I64] = TagId(1) List.413;
|
||||
ret List.412;
|
||||
else
|
||||
let List.381 : {} = Struct {};
|
||||
let List.380 : [C {}, C I64] = TagId(0) List.381;
|
||||
ret List.380;
|
||||
let List.410 : {} = Struct {};
|
||||
let List.409 : [C {}, C I64] = TagId(0) List.410;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.387 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.387;
|
||||
let List.416 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.416;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.385 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.385;
|
||||
let List.414 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.414;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.1 (Test.2):
|
||||
let Test.6 : List I64 = Array [1i64, 2i64, 3i64];
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
procedure List.6 (#Attr.2):
|
||||
let List.380 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.380;
|
||||
let List.409 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.381 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.381;
|
||||
let List.410 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.410;
|
||||
|
||||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.1 : List I64 = Array [1i64, 2i64, 3i64];
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
procedure List.2 (List.90, List.91):
|
||||
let List.386 : U64 = CallByName List.6 List.90;
|
||||
let List.382 : Int1 = CallByName Num.22 List.91 List.386;
|
||||
if List.382 then
|
||||
let List.384 : Str = CallByName List.66 List.90 List.91;
|
||||
let List.383 : [C {}, C Str] = TagId(1) List.384;
|
||||
ret List.383;
|
||||
procedure List.2 (List.94, List.95):
|
||||
let List.415 : U64 = CallByName List.6 List.94;
|
||||
let List.411 : Int1 = CallByName Num.22 List.95 List.415;
|
||||
if List.411 then
|
||||
let List.413 : Str = CallByName List.66 List.94 List.95;
|
||||
let List.412 : [C {}, C Str] = TagId(1) List.413;
|
||||
ret List.412;
|
||||
else
|
||||
let List.381 : {} = Struct {};
|
||||
let List.380 : [C {}, C Str] = TagId(0) List.381;
|
||||
ret List.380;
|
||||
let List.410 : {} = Struct {};
|
||||
let List.409 : [C {}, C Str] = TagId(0) List.410;
|
||||
ret List.409;
|
||||
|
||||
procedure List.5 (#Attr.2, #Attr.3):
|
||||
let List.388 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3;
|
||||
ret List.388;
|
||||
let List.417 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3;
|
||||
ret List.417;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.387 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.387;
|
||||
let List.416 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.416;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.385 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.385;
|
||||
let List.414 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.414;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Str.16 (#Attr.2, #Attr.3):
|
||||
let Str.251 : Str = lowlevel StrRepeat #Attr.2 #Attr.3;
|
||||
ret Str.251;
|
||||
let Str.265 : Str = lowlevel StrRepeat #Attr.2 #Attr.3;
|
||||
ret Str.265;
|
||||
|
||||
procedure Str.3 (#Attr.2, #Attr.3):
|
||||
let Str.252 : Str = lowlevel StrConcat #Attr.2 #Attr.3;
|
||||
ret Str.252;
|
||||
let Str.266 : Str = lowlevel StrConcat #Attr.2 #Attr.3;
|
||||
ret Str.266;
|
||||
|
||||
procedure Test.1 ():
|
||||
let Test.21 : Str = "lllllllllllllllllllllooooooooooong";
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
procedure List.2 (List.90, List.91):
|
||||
let List.386 : U64 = CallByName List.6 List.90;
|
||||
let List.382 : Int1 = CallByName Num.22 List.91 List.386;
|
||||
if List.382 then
|
||||
let List.384 : Str = CallByName List.66 List.90 List.91;
|
||||
let List.383 : [C {}, C Str] = TagId(1) List.384;
|
||||
ret List.383;
|
||||
procedure List.2 (List.94, List.95):
|
||||
let List.415 : U64 = CallByName List.6 List.94;
|
||||
let List.411 : Int1 = CallByName Num.22 List.95 List.415;
|
||||
if List.411 then
|
||||
let List.413 : Str = CallByName List.66 List.94 List.95;
|
||||
let List.412 : [C {}, C Str] = TagId(1) List.413;
|
||||
ret List.412;
|
||||
else
|
||||
let List.381 : {} = Struct {};
|
||||
let List.380 : [C {}, C Str] = TagId(0) List.381;
|
||||
ret List.380;
|
||||
let List.410 : {} = Struct {};
|
||||
let List.409 : [C {}, C Str] = TagId(0) List.410;
|
||||
ret List.409;
|
||||
|
||||
procedure List.5 (#Attr.2, #Attr.3):
|
||||
inc #Attr.2;
|
||||
let List.388 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3;
|
||||
let List.417 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3;
|
||||
decref #Attr.2;
|
||||
ret List.388;
|
||||
ret List.417;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.387 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.387;
|
||||
let List.416 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.416;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.385 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.385;
|
||||
let List.414 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.414;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Str.3 (#Attr.2, #Attr.3):
|
||||
let Str.252 : Str = lowlevel StrConcat #Attr.2 #Attr.3;
|
||||
ret Str.252;
|
||||
let Str.266 : Str = lowlevel StrConcat #Attr.2 #Attr.3;
|
||||
ret Str.266;
|
||||
|
||||
procedure Test.1 ():
|
||||
let Test.21 : Str = "lllllllllllllllllllllooooooooooong";
|
||||
|
@ -44,7 +43,6 @@ procedure Test.2 ():
|
|||
let Test.15 : List Str = CallByName Test.1;
|
||||
let Test.16 : {} = Struct {};
|
||||
let Test.14 : List Str = CallByName List.5 Test.15 Test.16;
|
||||
dec Test.15;
|
||||
ret Test.14;
|
||||
|
||||
procedure Test.3 (Test.4):
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
procedure List.3 (List.98, List.99, List.100):
|
||||
let List.381 : {List I64, I64} = CallByName List.64 List.98 List.99 List.100;
|
||||
let List.380 : List I64 = StructAtIndex 0 List.381;
|
||||
inc List.380;
|
||||
dec List.381;
|
||||
ret List.380;
|
||||
procedure List.3 (List.102, List.103, List.104):
|
||||
let List.410 : {List I64, I64} = CallByName List.64 List.102 List.103 List.104;
|
||||
let List.409 : List I64 = StructAtIndex 0 List.410;
|
||||
inc List.409;
|
||||
dec List.410;
|
||||
ret List.409;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.387 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.387;
|
||||
let List.416 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.416;
|
||||
|
||||
procedure List.64 (List.95, List.96, List.97):
|
||||
let List.386 : U64 = CallByName List.6 List.95;
|
||||
let List.383 : Int1 = CallByName Num.22 List.96 List.386;
|
||||
if List.383 then
|
||||
let List.384 : {List I64, I64} = CallByName List.67 List.95 List.96 List.97;
|
||||
ret List.384;
|
||||
procedure List.64 (List.99, List.100, List.101):
|
||||
let List.415 : U64 = CallByName List.6 List.99;
|
||||
let List.412 : Int1 = CallByName Num.22 List.100 List.415;
|
||||
if List.412 then
|
||||
let List.413 : {List I64, I64} = CallByName List.67 List.99 List.100 List.101;
|
||||
ret List.413;
|
||||
else
|
||||
let List.382 : {List I64, I64} = Struct {List.95, List.97};
|
||||
ret List.382;
|
||||
let List.411 : {List I64, I64} = Struct {List.99, List.101};
|
||||
ret List.411;
|
||||
|
||||
procedure List.67 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let List.385 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4;
|
||||
ret List.385;
|
||||
let List.414 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4;
|
||||
ret List.414;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.2 (Test.3):
|
||||
let Test.6 : U64 = 0i64;
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
procedure List.28 (#Attr.2, #Attr.3):
|
||||
let List.382 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3;
|
||||
let List.411 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3;
|
||||
let #Derived_gen.0 : Int1 = lowlevel ListIsUnique #Attr.2;
|
||||
if #Derived_gen.0 then
|
||||
ret List.382;
|
||||
ret List.411;
|
||||
else
|
||||
decref #Attr.2;
|
||||
ret List.382;
|
||||
ret List.411;
|
||||
|
||||
procedure List.59 (List.208):
|
||||
let List.381 : {} = Struct {};
|
||||
let List.380 : List I64 = CallByName List.28 List.208 List.381;
|
||||
ret List.380;
|
||||
procedure List.59 (List.237):
|
||||
let List.410 : {} = Struct {};
|
||||
let List.409 : List I64 = CallByName List.28 List.237 List.410;
|
||||
ret List.409;
|
||||
|
||||
procedure Num.46 (#Attr.2, #Attr.3):
|
||||
let Num.257 : U8 = lowlevel NumCompare #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : U8 = lowlevel NumCompare #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : List I64 = Array [4i64, 3i64, 2i64, 1i64];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Bool.1 ():
|
||||
let Bool.12 : Int1 = false;
|
||||
ret Bool.12;
|
||||
let Bool.24 : Int1 = false;
|
||||
ret Bool.24;
|
||||
|
||||
procedure Test.4 (Test.6):
|
||||
let Test.8 : U64 = 1i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.19 : I64 = 41i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.37 (#Attr.2, #Attr.3):
|
||||
let Num.257 : Float64 = lowlevel NumDivFrac #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : Float64 = lowlevel NumDivFrac #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.0 ():
|
||||
let Test.2 : Float64 = 1f64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.21 (#Attr.2, #Attr.3):
|
||||
let Num.259 : I64 = lowlevel NumMul #Attr.2 #Attr.3;
|
||||
ret Num.259;
|
||||
let Num.258 : I64 = lowlevel NumMul #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
|
||||
procedure Test.1 (Test.6):
|
||||
let Test.21 : Int1 = false;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Num.20 (#Attr.2, #Attr.3):
|
||||
let Num.258 : I64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
let Num.257 : I64 = lowlevel NumSub #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.259 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.259;
|
||||
let Num.258 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
|
||||
procedure Test.1 (Test.24, Test.25, Test.26):
|
||||
joinpoint Test.12 Test.2 Test.3 Test.4:
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
procedure List.2 (List.90, List.91):
|
||||
let List.402 : U64 = CallByName List.6 List.90;
|
||||
let List.399 : Int1 = CallByName Num.22 List.91 List.402;
|
||||
if List.399 then
|
||||
let List.401 : I64 = CallByName List.66 List.90 List.91;
|
||||
let List.400 : [C {}, C I64] = TagId(1) List.401;
|
||||
ret List.400;
|
||||
procedure List.2 (List.94, List.95):
|
||||
let List.431 : U64 = CallByName List.6 List.94;
|
||||
let List.428 : Int1 = CallByName Num.22 List.95 List.431;
|
||||
if List.428 then
|
||||
let List.430 : I64 = CallByName List.66 List.94 List.95;
|
||||
let List.429 : [C {}, C I64] = TagId(1) List.430;
|
||||
ret List.429;
|
||||
else
|
||||
let List.398 : {} = Struct {};
|
||||
let List.397 : [C {}, C I64] = TagId(0) List.398;
|
||||
ret List.397;
|
||||
let List.427 : {} = Struct {};
|
||||
let List.426 : [C {}, C I64] = TagId(0) List.427;
|
||||
ret List.426;
|
||||
|
||||
procedure List.3 (List.98, List.99, List.100):
|
||||
let List.389 : {List I64, I64} = CallByName List.64 List.98 List.99 List.100;
|
||||
let List.388 : List I64 = StructAtIndex 0 List.389;
|
||||
inc List.388;
|
||||
dec List.389;
|
||||
ret List.388;
|
||||
procedure List.3 (List.102, List.103, List.104):
|
||||
let List.418 : {List I64, I64} = CallByName List.64 List.102 List.103 List.104;
|
||||
let List.417 : List I64 = StructAtIndex 0 List.418;
|
||||
inc List.417;
|
||||
dec List.418;
|
||||
ret List.417;
|
||||
|
||||
procedure List.6 (#Attr.2):
|
||||
let List.387 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.387;
|
||||
let List.416 : U64 = lowlevel ListLen #Attr.2;
|
||||
ret List.416;
|
||||
|
||||
procedure List.64 (List.95, List.96, List.97):
|
||||
let List.386 : U64 = CallByName List.6 List.95;
|
||||
let List.383 : Int1 = CallByName Num.22 List.96 List.386;
|
||||
if List.383 then
|
||||
let List.384 : {List I64, I64} = CallByName List.67 List.95 List.96 List.97;
|
||||
ret List.384;
|
||||
procedure List.64 (List.99, List.100, List.101):
|
||||
let List.415 : U64 = CallByName List.6 List.99;
|
||||
let List.412 : Int1 = CallByName Num.22 List.100 List.415;
|
||||
if List.412 then
|
||||
let List.413 : {List I64, I64} = CallByName List.67 List.99 List.100 List.101;
|
||||
ret List.413;
|
||||
else
|
||||
let List.382 : {List I64, I64} = Struct {List.95, List.97};
|
||||
ret List.382;
|
||||
let List.411 : {List I64, I64} = Struct {List.99, List.101};
|
||||
ret List.411;
|
||||
|
||||
procedure List.66 (#Attr.2, #Attr.3):
|
||||
let List.395 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.395;
|
||||
let List.424 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3;
|
||||
ret List.424;
|
||||
|
||||
procedure List.67 (#Attr.2, #Attr.3, #Attr.4):
|
||||
let List.385 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4;
|
||||
ret List.385;
|
||||
let List.414 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4;
|
||||
ret List.414;
|
||||
|
||||
procedure Num.22 (#Attr.2, #Attr.3):
|
||||
let Num.259 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.259;
|
||||
let Num.258 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;
|
||||
ret Num.258;
|
||||
|
||||
procedure Test.1 (Test.2):
|
||||
let Test.28 : U64 = 0i64;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
procedure Num.19 (#Attr.2, #Attr.3):
|
||||
let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.257;
|
||||
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
|
||||
ret Num.256;
|
||||
|
||||
procedure Test.1 (Test.4):
|
||||
let Test.2 : I64 = StructAtIndex 0 Test.4;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue