src/compiler/emitter.panack
Green: covered; red: known zero; amber: unavailable. Blank lines are outside the executable-start-line denominator.
1 import project/src/compiler/purity::{check_program_frontend} 2 pub import project/src/compiler/parser::{Expr, Program} 3 pub import project/src/compiler/types::{SourceSpan} 4 import project/src/compiler/parser::{ 5 Expr.ArrayExpr, Expr.BinaryExpr, Expr.BlockExpr, Expr.BoolExpr, 6 Expr.CallExpr, Expr.DecimalExpr, Expr.DotCallExpr, Expr.OwnedCallExpr, Expr.FieldExpr, Expr.FunctionExpr, Expr.AnonymousExpr, 7 Expr.IfExpr, Expr.IndexExpr, Expr.LocatedExpr, Expr.MatchExpr, Expr.NameExpr, 8 Expr.NatExpr, Expr.StringExpr, Expr.UnaryExpr, 9 Statement, Statement.AssignmentStatement, Statement.BindingStatement, 10 Statement.ExpressionStatement, Statement.ForStatement, Statement.WhileStatement, 11 Block, BlockValue, BlockValue.NoBlockValue, BlockValue.TailBlockValue, 12 Diagnostic, EnumVariant, FunctionParameter, MatchArm, MatchPattern, 13 RecordField, TopLevel, TopLevel.EnumDeclaration, 14 TopLevel.FunctionDeclaration, TopLevel.ImportDeclaration, TopLevel.RecordDeclaration, 15 TopLevel.TypeDeclaration, 16 expression_span, lex, parse_program_complete 17 } 18 import project/src/compiler/expression_contracts::{decode_string_literal, split_interpolated_string, InterpolatedString} 19 import project/src/compiler/resolver::{render_resolver_diagnostics} 20 import project/src/compiler/lexer::{prior_index} 21 import project/src/compiler/checker::{RecordLookup, VariantLookup, record_type, variant_type} 22 23 // Lower checked syntax to deterministic instructions. Temporary names and jump 24 // offsets are local to each function; source attribution is explicitly optional. 25 26 pub enum ConstantValue { 27 NatConstant(Nat), 28 IntConstant(Bool, Nat), 29 DecimalConstant(Str), 30 DecimalPartsConstant(Bool, [Nat], Bool, Nat), 31 StringConstant(Str), 32 BoolConstant(Bool), 33 VoidConstant 34 } 35 36 pub enum Instruction { 37 ConstInstruction(ConstantValue), 38 LoadInstruction(Str), 39 StoreInstruction(Str), 40 PopInstruction, 41 UnaryInstruction(Str), 42 BinaryInstruction(Str), 43 MakeRangeInstruction, 44 MakeArrayInstruction(Nat), 45 IndexGetInstruction, 46 InterpolateInstruction([Str]), 47 IterInitInstruction(Str), 48 IterNextInstruction(Str, Str, Nat), 49 MakeRecordInstruction(Str, [Str]), 50 FieldGetInstruction(Str), 51 MakeVariantInstruction(Str, Str, Nat), 52 MatchVariantInstruction(Str, Nat), 53 MatchFailInstruction, 54 CallInstruction(Str, Nat), 55 CallValueInstruction(Nat), 56 AwaitCallInstruction(Str, Nat), 57 AwaitValueInstruction(Nat), 58 JumpFalseInstruction(Nat), 59 JumpInstruction(Nat), 60 PendingEndJumpInstruction, 61 ReturnInstruction 62 } 63 64 pub record FunctionCode { 65 name: Str, 66 parameters: [Str], 67 is_pure: Bool, 68 is_async: Bool, 69 instructions: [Instruction] 70 } 71 72 pub record BytecodeProgram { 73 functions: [FunctionCode] 74 } 75 76 pub record EmittedCode { 77 instructions: [Instruction], 78 next_temporary: Nat, 79 sources: [InstructionSource], 80 probes: [EmissionProbe] 81 } 82 83 // Sparse, function-local instruction indices; an absent entry means unavailable. 84 // Lowered entries associate compiler-generated machinery with its source construct, 85 // rather than claiming a one-to-one source operation. This is an internal contract. 86 pub record EmissionProbe { 87 kind: Str, 88 span: SourceSpan, 89 start: Nat, 90 end: Nat 91 } 92 93 pub record FunctionProbes { 94 name: Str, 95 entries: [EmissionProbe] 96 } 97 98 pure add_emission_probe( 99 probes: [EmissionProbe], 100 kind: Str, 101 expression: Expr, 102 start: Nat, 103 end: Nat, 104 enabled: Bool 105 ): [EmissionProbe] { 106 if enabled { 107 match expression_span(expression) { 108 Some(span) => probes.append(EmissionProbe(kind, span, start, end)), 109 None() => probes 110 } 111 } else { 112 probes 113 } 114 } 115 116 pub record InstructionSource { 117 index: Nat, 118 span: SourceSpan, 119 lowered: Bool, 120 reason: Str 121 } 122 123 pub record FunctionSources { 124 name: Str, 125 entries: [InstructionSource] 126 } 127 128 pub record SourceMappedProgram { 129 bytecode: BytecodeProgram, 130 sources: [FunctionSources], 131 probes: [FunctionProbes] 132 } 133 134 pure add_instruction_source( 135 sources: [InstructionSource], 136 origin: Option[SourceSpan], 137 index: Nat, 138 lowered: Bool 139 ): [InstructionSource] { 140 add_origin(sources, origin, index, lowered, "") 141 } 142 143 pure add_origin(sources: [InstructionSource], origin: Option[SourceSpan], index: Nat, 144 lowered: Bool, reason: Str): [InstructionSource] { 145 match origin { 146 None() => sources, 147 Some(span) => sources.append(InstructionSource(index, span, lowered, reason)) 148 } 149 } 150 151 pure parameter_name(parameter: FunctionParameter): Str { 152 parameter.name 153 } 154 155 pure parameter_names(parameters: [FunctionParameter]): [Str] { 156 parameters.map(@parameter_name) 157 } 158 159 pure record_field_name(field: RecordField): Str { 160 field.name 161 } 162 163 pure record_field_names(fields: [RecordField]): [Str] { 164 fields.map(@record_field_name) 165 } 166 167 pure resolve_pending_jumps(instructions: [Instruction], target: Nat): [Instruction] { 168 mut result: [Instruction] = [] 169 170 for instruction in instructions { 171 match instruction { 172 PendingEndJumpInstruction() => { 173 result = result.append(JumpInstruction(target)) 174 }, 175 ConstInstruction(value) => { 176 result = result.append(instruction) 177 }, 178 LoadInstruction(name) => { 179 result = result.append(instruction) 180 }, 181 StoreInstruction(name) => { 182 result = result.append(instruction) 183 }, 184 PopInstruction() => { 185 result = result.append(instruction) 186 }, 187 UnaryInstruction(operator) => { 188 result = result.append(instruction) 189 }, 190 BinaryInstruction(operator) => { 191 result = result.append(instruction) 192 }, 193 MakeRangeInstruction() => { 194 result = result.append(instruction) 195 }, 196 MakeArrayInstruction(count) => { 197 result = result.append(instruction) 198 }, 199 IndexGetInstruction() => { 200 result = result.append(instruction) 201 }, 202 InterpolateInstruction(parts) => { 203 result = result.append(instruction) 204 }, 205 IterInitInstruction(name) => { 206 result = result.append(instruction) 207 }, 208 IterNextInstruction(iterator, name, end) => { 209 result = result.append(instruction) 210 }, 211 MakeRecordInstruction(name, fields) => { 212 result = result.append(instruction) 213 }, 214 FieldGetInstruction(name) => { 215 result = result.append(instruction) 216 }, 217 MakeVariantInstruction(enum_name, variant, count) => { 218 result = result.append(instruction) 219 }, 220 MatchVariantInstruction(variant, failure) => { 221 result = result.append(instruction) 222 }, 223 MatchFailInstruction() => { 224 result = result.append(instruction) 225 }, 226 CallInstruction(name, arity) => { 227 result = result.append(instruction) 228 }, 229 CallValueInstruction(arity) => { 230 result = result.append(instruction) 231 }, 232 AwaitCallInstruction(name, arity) => { 233 result = result.append(instruction) 234 }, 235 AwaitValueInstruction(arity) => { 236 result = result.append(instruction) 237 }, 238 JumpFalseInstruction(jump_target) => { 239 result = result.append(instruction) 240 }, 241 JumpInstruction(jump_target) => { 242 result = result.append(instruction) 243 }, 244 ReturnInstruction() => { 245 result = result.append(instruction) 246 } 247 } 248 } 249 250 result 251 } 252 253 pure render_string_items(items: [Str]): Str { 254 mut output: Str = "" 255 mut first: Bool = true 256 257 for item in items { 258 if first { 259 first = false 260 } else { 261 output = output + "," 262 } 263 output = output + item 264 } 265 266 output 267 } 268 269 pure render_constant(value: ConstantValue): Str { 270 match value { 271 NatConstant(number) => "Nat:${number}", 272 IntConstant(negative, magnitude) => { 273 if negative { 274 "Int:-${magnitude}" 275 } else { 276 "Int:${magnitude}" 277 } 278 }, 279 DecimalConstant(text) => "Dec:${text}", 280 DecimalPartsConstant(negative, digits, exponent_negative, exponent_magnitude) => { 281 sign: Str = if negative { 282 "-" 283 } else { 284 "" 285 } 286 exponent_sign: Str = if exponent_negative { 287 "-" 288 } else { 289 "+" 290 } 291 digits_text: Str = "" 292 mut rendered_digits: Str = digits_text 293 for digit in digits { 294 rendered_digits = rendered_digits + "${digit}" 295 } 296 "DecParts:${sign}${rendered_digits}e${exponent_sign}${exponent_magnitude}" 297 }, 298 StringConstant(text) => "Str:${text}", 299 BoolConstant(flag) => if flag { 300 "Bool:true" 301 } else { 302 "Bool:false" 303 }, 304 VoidConstant() => "Void" 305 } 306 } 307 308 // Source-led explanations identify the operation first. Its exact operands 309 // and function-local index remain available for detailed bytecode inspection. 310 pub pure instruction_purpose(instruction: Instruction): Str { 311 match instruction { 312 ConstInstruction(value) => "Produce a constant", 313 LoadInstruction(name) => "Read " + name, 314 StoreInstruction(name) => "Store the value in " + name, 315 PopInstruction() => "Discard the unused statement result", 316 UnaryInstruction(operator) => "Apply " + operator, 317 BinaryInstruction(operator) => "Combine the operands with " + operator, 318 MakeRangeInstruction() => "Build the iteration range", 319 MakeArrayInstruction(count) => "Build the array", 320 IndexGetInstruction() => "Read the indexed element", 321 InterpolateInstruction(parts) => "Combine the text and interpolated values", 322 IterInitInstruction(name) => "Start iteration", 323 IterNextInstruction(iterator, name, end) => "Advance the iterator and bind " + name, 324 MakeRecordInstruction(name, fields) => "Construct " + name, 325 FieldGetInstruction(name) => "Read field " + name, 326 MakeVariantInstruction(owner, name, count) => "Construct variant " + name, 327 MatchVariantInstruction(name, failure) => "Test for variant " + name, 328 MatchFailInstruction() => "Report an unmatched value", 329 CallInstruction(name, arity) => if name == "$intrinsic_closure" { "Create the closure and retain its captured values" } else if name == "$intrinsic_function" { "Create a reference to the named function" } else { "Call " + name }, 330 CallValueInstruction(arity) => "Call the supplied function", 331 AwaitCallInstruction(name,arity) => "Await the call to " + name, 332 AwaitValueInstruction(arity) => "Await the supplied function", 333 JumpFalseInstruction(target) => "Branch when the condition is false", 334 JumpInstruction(target) => "Continue at the next control-flow target", 335 PendingEndJumpInstruction() => "Resolve the end target", 336 ReturnInstruction() => "Return from the function" 337 } 338 } 339 340 pub pure render_instruction(instruction: Instruction): Str { 341 match instruction { 342 ConstInstruction(value) => { 343 value_text: Str = render_constant(value) 344 "CONST|${value_text}" 345 }, 346 LoadInstruction(name) => "LOAD|${name}", 347 StoreInstruction(name) => "STORE|${name}", 348 PopInstruction() => "POP", 349 UnaryInstruction(operator) => "UNARY|${operator}", 350 BinaryInstruction(operator) => "BINARY|${operator}", 351 MakeRangeInstruction() => "MAKE_RANGE", 352 MakeArrayInstruction(count) => "MAKE_ARRAY|${count}", 353 IndexGetInstruction() => "INDEX_GET", 354 InterpolateInstruction(parts) => { 355 parts_text: Str = render_string_items(parts) 356 "INTERPOLATE|${parts_text}" 357 }, 358 IterInitInstruction(name) => "ITER_INIT|${name}", 359 IterNextInstruction(iterator, name, end) => "ITER_NEXT|${iterator}|${name}|${end}", 360 MakeRecordInstruction(name, fields) => { 361 fields_text: Str = render_string_items(fields) 362 "MAKE_RECORD|${name}|${fields_text}" 363 }, 364 FieldGetInstruction(name) => "FIELD_GET|${name}", 365 MakeVariantInstruction(enum_name, variant, count) => "MAKE_VARIANT|${enum_name}|${variant}|${count}", 366 MatchVariantInstruction(variant, failure) => "MATCH_VARIANT|${variant}|${failure}", 367 MatchFailInstruction() => "MATCH_FAIL", 368 CallInstruction(name, arity) => "CALL|${name}|${arity}", 369 CallValueInstruction(arity) => "CALL_VALUE|${arity}", 370 AwaitCallInstruction(name, arity) => "AWAIT_CALL|${name}|${arity}", 371 AwaitValueInstruction(arity) => "AWAIT_VALUE|${arity}", 372 JumpFalseInstruction(target) => "JUMP_FALSE|${target}", 373 JumpInstruction(target) => "JUMP|${target}", 374 PendingEndJumpInstruction() => "PENDING_END_JUMP", 375 ReturnInstruction() => "RETURN" 376 } 377 } 378 379 pub pure render_bytecode(program: BytecodeProgram): Str { 380 mut output: Str = "" 381 382 for function in program.functions { 383 purity: Str = if function.is_async { 384 "async" 385 } else { 386 if function.is_pure { 387 "pure" 388 } else { 389 "impure" 390 } 391 } 392 function_name: Str = function.name 393 parameters_text: Str = render_string_items(function.parameters) 394 output = output + "FUNCTION|${function_name}|${purity}|${parameters_text}\n" 395 mut index: Nat = 0 396 for instruction in function.instructions { 397 instruction_text: Str = render_instruction(instruction) 398 output = output + "${index}|${instruction_text}\n" 399 index = index + 1 400 } 401 } 402 403 output 404 } 405 406 pure emit_expression_list( 407 expressions: [Expr], 408 program: Program, 409 next_temporary: Nat, 410 offset: Nat, 411 retain_sources: Bool 412 ): EmittedCode { 413 mut sources: [InstructionSource] = [] 414 mut probes: [EmissionProbe] = [] 415 mut instructions: [Instruction] = [] 416 mut temporary: Nat = next_temporary 417 418 for expression in expressions { 419 emitted: EmittedCode = emit_expression( 420 expression, 421 program, 422 temporary, 423 offset + instructions.len(), 424 retain_sources 425 ) 426 sources = sources.concat(emitted.sources) 427 probes = probes.concat(emitted.probes) 428 instructions = instructions.concat(emitted.instructions) 429 temporary = emitted.next_temporary 430 } 431 EmittedCode(instructions, temporary, sources, probes) 432 } 433 434 pure emit_block( 435 block: Block, 436 program: Program, 437 next_temporary: Nat, 438 offset: Nat, 439 retain_sources: Bool 440 ): EmittedCode { 441 mut sources: [InstructionSource] = [] 442 mut probes: [EmissionProbe] = [] 443 mut instructions: [Instruction] = [] 444 mut temporary: Nat = next_temporary 445 446 mut statement_index: Nat = 0 447 for statement in block.statements { 448 origin: Option[SourceSpan] = if retain_sources && statement_index < block.statement_spans.len() { 449 Some(block.statement_spans[statement_index]) 450 } else { None() } 451 statement_index = statement_index + 1 452 statement_offset: Nat = offset + instructions.len() 453 match statement { 454 BindingStatement(name, type_name, annotation_span, mutable, value) => { 455 emitted: EmittedCode = emit_expression( 456 value, 457 program, 458 temporary, 459 statement_offset, 460 retain_sources 461 ) 462 sources = sources.concat(emitted.sources) 463 probes = probes.concat(emitted.probes) 464 instructions = instructions.concat(emitted.instructions) 465 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Store the value computed by this statement.") } 466 instructions = instructions.append(StoreInstruction(name)) 467 temporary = emitted.next_temporary 468 }, 469 AssignmentStatement(name, value) => { 470 emitted: EmittedCode = emit_expression( 471 value, 472 program, 473 temporary, 474 statement_offset, 475 retain_sources 476 ) 477 sources = sources.concat(emitted.sources) 478 probes = probes.concat(emitted.probes) 479 instructions = instructions.concat(emitted.instructions) 480 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Store the value computed by this statement.") } 481 instructions = instructions.append(StoreInstruction(name)) 482 temporary = emitted.next_temporary 483 }, 484 ExpressionStatement(value) => { 485 emitted: EmittedCode = emit_expression( 486 value, 487 program, 488 temporary, 489 statement_offset, 490 retain_sources 491 ) 492 sources = sources.concat(emitted.sources) 493 probes = probes.concat(emitted.probes) 494 instructions = instructions.concat(emitted.instructions) 495 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Discard the result after this statement or iteration.") } 496 instructions = instructions.append(PopInstruction()) 497 temporary = emitted.next_temporary 498 }, 499 WhileStatement(condition, body) => { 500 condition_code: EmittedCode = emit_expression( 501 condition, 502 program, 503 temporary, 504 statement_offset, 505 retain_sources 506 ) 507 jump_index: Nat = statement_offset + condition_code.instructions.len() 508 body_code: EmittedCode = emit_block( 509 body, 510 program, 511 condition_code.next_temporary, 512 jump_index + 1, 513 retain_sources 514 ) 515 end: Nat = jump_index + 1 + body_code.instructions.len() + 2 516 sources = sources.concat(condition_code.sources) 517 probes = probes.concat(condition_code.probes) 518 instructions = instructions.concat(condition_code.instructions) 519 probes = add_emission_probe( 520 probes, 521 "while", 522 condition, 523 jump_index, 524 jump_index + 1, 525 retain_sources 526 ) 527 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Leave the loop when its condition is false.") } 528 instructions = instructions.append(JumpFalseInstruction(end)) 529 sources = sources.concat(body_code.sources) 530 probes = probes.concat(body_code.probes) 531 instructions = instructions.concat(body_code.instructions) 532 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Discard the result after this statement or iteration.") } 533 instructions = instructions.append(PopInstruction()) 534 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Return to the loop test for the next iteration.") } 535 instructions = instructions.append(JumpInstruction(statement_offset)) 536 temporary = body_code.next_temporary 537 }, 538 ForStatement(name, iterable, body) => { 539 iterator: Str = "$iter${temporary}" 540 iterable_code: EmittedCode = emit_expression( 541 iterable, 542 program, 543 temporary + 1, 544 statement_offset, 545 retain_sources 546 ) 547 iter_init_index: Nat = statement_offset + iterable_code.instructions.len() 548 loop_start: Nat = iter_init_index + 1 549 body_start: Nat = loop_start + 1 550 body_code: EmittedCode = emit_block( 551 body, 552 program, 553 iterable_code.next_temporary, 554 body_start, 555 retain_sources 556 ) 557 end: Nat = body_start + body_code.instructions.len() + 2 558 sources = sources.concat(iterable_code.sources) 559 probes = probes.concat(iterable_code.probes) 560 instructions = instructions.concat(iterable_code.instructions) 561 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Prepare an iterator for this loop.") } 562 instructions = instructions.append(IterInitInstruction(iterator)) 563 probes = add_emission_probe( 564 probes, 565 "for", 566 iterable, 567 loop_start, 568 loop_start + 1, 569 retain_sources 570 ) 571 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Bind the next item or leave the loop when exhausted.") } 572 instructions = instructions.append(IterNextInstruction(iterator, name, end)) 573 sources = sources.concat(body_code.sources) 574 probes = probes.concat(body_code.probes) 575 instructions = instructions.concat(body_code.instructions) 576 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Discard the result after this statement or iteration.") } 577 instructions = instructions.append(PopInstruction()) 578 if retain_sources { sources = add_origin(sources, origin, offset + instructions.len(), true, "Return to the loop test for the next iteration.") } 579 instructions = instructions.append(JumpInstruction(loop_start)) 580 temporary = body_code.next_temporary 581 } 582 } 583 } 584 match block.value { 585 NoBlockValue() => { 586 if retain_sources { sources = add_origin(sources, block.span, offset + instructions.len(), true, "This block has no tail expression and produces Void.") } 587 instructions = instructions.append(ConstInstruction(VoidConstant())) 588 }, 589 TailBlockValue(value) => { 590 emitted: EmittedCode = emit_expression( 591 value, 592 program, 593 temporary, 594 offset + instructions.len(), 595 retain_sources 596 ) 597 sources = sources.concat(emitted.sources) 598 probes = probes.concat(emitted.probes) 599 instructions = instructions.concat(emitted.instructions) 600 temporary = emitted.next_temporary 601 } 602 } 603 EmittedCode(instructions, temporary, sources, probes) 604 } 605 606 pure emit_short_circuit( 607 operator: Str, 608 left: Expr, 609 right: Expr, 610 program: Program, 611 next_temporary: Nat, 612 offset: Nat, 613 retain_sources: Bool, 614 origin: Option[SourceSpan] 615 ): EmittedCode { 616 mut sources: [InstructionSource] = [] 617 mut probes: [EmissionProbe] = [] 618 left_code: EmittedCode = emit_expression(left, program, next_temporary, offset, retain_sources) 619 branch: Nat = offset + left_code.instructions.len() 620 621 if operator == "&&" { 622 right_code: EmittedCode = emit_expression( 623 right, 624 program, 625 left_code.next_temporary, 626 branch + 1, 627 retain_sources 628 ) 629 false_target: Nat = branch + 1 + right_code.instructions.len() + 1 630 end: Nat = false_target + 1 631 sources = left_code.sources 632 probes = left_code.probes 633 mut instructions: [Instruction] = left_code.instructions 634 if retain_sources { 635 sources = add_origin(sources, origin, offset + instructions.len(), true, "Short-circuit " + operator + ": evaluate the right operand only when needed.") 636 } 637 instructions = instructions.append(JumpFalseInstruction(false_target)) 638 sources = sources.concat(right_code.sources) 639 probes = probes.concat(right_code.probes) 640 instructions = instructions.concat(right_code.instructions) 641 if retain_sources { 642 sources = add_origin(sources, origin, offset + instructions.len(), true, "Short-circuit " + operator + ": evaluate the right operand only when needed.") 643 } 644 instructions = instructions.append(JumpInstruction(end)) 645 if retain_sources { 646 sources = add_origin(sources, origin, offset + instructions.len(), true, "Short-circuit " + operator + ": evaluate the right operand only when needed.") 647 } 648 instructions = instructions.append(ConstInstruction(BoolConstant(false))) 649 probes = add_emission_probe(probes, operator, left, branch, branch + 1, retain_sources) 650 EmittedCode(instructions, right_code.next_temporary, sources, probes) 651 } else { 652 true_index: Nat = branch + 1 653 right_target: Nat = true_index + 2 654 right_code: EmittedCode = emit_expression( 655 right, 656 program, 657 left_code.next_temporary, 658 right_target, 659 retain_sources 660 ) 661 end: Nat = right_target + right_code.instructions.len() 662 sources = left_code.sources 663 probes = left_code.probes 664 mut instructions: [Instruction] = left_code.instructions 665 if retain_sources { 666 sources = add_origin(sources, origin, offset + instructions.len(), true, "Short-circuit " + operator + ": evaluate the right operand only when needed.") 667 } 668 instructions = instructions.append(JumpFalseInstruction(right_target)) 669 if retain_sources { 670 sources = add_origin(sources, origin, offset + instructions.len(), true, "Short-circuit " + operator + ": evaluate the right operand only when needed.") 671 } 672 instructions = instructions.append(ConstInstruction(BoolConstant(true))) 673 if retain_sources { 674 sources = add_origin(sources, origin, offset + instructions.len(), true, "Short-circuit " + operator + ": evaluate the right operand only when needed.") 675 } 676 instructions = instructions.append(JumpInstruction(end)) 677 sources = sources.concat(right_code.sources) 678 probes = probes.concat(right_code.probes) 679 instructions = instructions.concat(right_code.instructions) 680 probes = add_emission_probe(probes, operator, left, branch, branch + 1, retain_sources) 681 EmittedCode(instructions, right_code.next_temporary, sources, probes) 682 } 683 } 684 685 pure emit_string_expression( 686 token_text: Str, 687 next_temporary: Nat, 688 retain_sources: Bool, 689 origin: Option[SourceSpan], 690 offset: Nat 691 ): EmittedCode { 692 mut sources: [InstructionSource] = [] 693 mut probes: [EmissionProbe] = [] 694 text: Str = decode_string_literal(token_text) 695 interpolation: InterpolatedString = split_interpolated_string(text) 696 mut instructions: [Instruction] = [] 697 698 if interpolation.variables.len() == 0 { 699 if retain_sources { 700 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 701 } 702 instructions = instructions.append(ConstInstruction(StringConstant(text))) 703 } else { 704 for variable in interpolation.variables { 705 if retain_sources { 706 sources = add_origin(sources, origin, offset + instructions.len(), true, "Read each interpolated local before assembling the string.") 707 } 708 instructions = instructions.append(LoadInstruction(variable)) 709 } 710 if retain_sources { 711 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 712 } 713 instructions = instructions.append(InterpolateInstruction(interpolation.parts)) 714 } 715 EmittedCode(instructions, next_temporary, sources, probes) 716 } 717 718 pure emit_call( 719 name: Str, 720 arguments: [Expr], 721 program: Program, 722 next_temporary: Nat, 723 offset: Nat, 724 retain_sources: Bool, 725 origin: Option[SourceSpan] 726 ): EmittedCode { 727 mut sources: [InstructionSource] = [] 728 mut probes: [EmissionProbe] = [] 729 730 if name == "$intrinsic_call" { 731 emitted: EmittedCode = emit_expression_list( 732 arguments, 733 program, 734 next_temporary, 735 offset, 736 retain_sources 737 ) 738 EmittedCode( 739 emitted.instructions.append(CallValueInstruction(prior_index(arguments.len()))), 740 emitted.next_temporary, 741 if retain_sources { 742 add_instruction_source(emitted.sources, origin, offset + emitted.instructions.len(), false) 743 } else { 744 [] 745 }, emitted.probes) 746 } else { 747 if name == "$intrinsic_map" || name == "$intrinsic_reduce" { 748 collection_name: Str = "$collection${next_temporary}" 749 callback_name: Str = "$callback${next_temporary}" 750 item_name: Str = "$item${next_temporary}" 751 iterator_name: Str = "$iterator${next_temporary}" 752 accumulator_name: Str = "$accumulator${next_temporary}" 753 collection: EmittedCode = emit_expression( 754 arguments[0], 755 program, 756 next_temporary + 1, 757 offset, 758 retain_sources 759 ) 760 sources = collection.sources 761 probes = collection.probes 762 if retain_sources { 763 sources = add_origin( 764 sources, 765 origin, 766 offset + collection.instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 767 } 768 mut instructions: [Instruction] = collection.instructions.append( 769 StoreInstruction(collection_name) 770 ) 771 mut temporary: Nat = collection.next_temporary 772 if name == "$intrinsic_reduce" { 773 initial: EmittedCode = emit_expression( 774 arguments[1], 775 program, 776 temporary, 777 offset + instructions.len(), 778 retain_sources 779 ) 780 sources = sources.concat(initial.sources) 781 probes = probes.concat(initial.probes) 782 instructions = instructions.concat(initial.instructions) 783 if retain_sources { 784 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 785 } 786 instructions = instructions.append(StoreInstruction(accumulator_name)) 787 temporary = initial.next_temporary 788 } else { 789 if retain_sources { 790 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 791 } 792 instructions = instructions.append(MakeArrayInstruction(0)) 793 if retain_sources { 794 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 795 } 796 instructions = instructions.append(StoreInstruction(accumulator_name)) 797 } 798 callback: EmittedCode = emit_expression( 799 arguments[prior_index(arguments.len())], 800 program, 801 temporary, 802 offset + instructions.len(), 803 retain_sources 804 ) 805 sources = sources.concat(callback.sources) 806 probes = probes.concat(callback.probes) 807 instructions = instructions.concat(callback.instructions) 808 if retain_sources { 809 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 810 } 811 instructions = instructions.append(StoreInstruction(callback_name)) 812 if retain_sources { 813 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 814 } 815 instructions = instructions.append(LoadInstruction(collection_name)) 816 if retain_sources { 817 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 818 } 819 instructions = instructions.append(IterInitInstruction(iterator_name)) 820 loop_start: Nat = offset + instructions.len() 821 next_index: Nat = instructions.len() 822 if retain_sources { 823 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 824 } 825 instructions = instructions.append(IterNextInstruction(iterator_name, item_name, 0)) 826 if name == "$intrinsic_map" { 827 if retain_sources { 828 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 829 } 830 instructions = instructions.append(LoadInstruction(accumulator_name)) 831 if retain_sources { 832 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 833 } 834 instructions = instructions.append(LoadInstruction(callback_name)) 835 if retain_sources { 836 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 837 } 838 instructions = instructions.append(LoadInstruction(item_name)) 839 if retain_sources { 840 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 841 } 842 instructions = instructions.append(CallValueInstruction(1)) 843 if retain_sources { 844 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 845 } 846 instructions = instructions.append(CallInstruction("append", 2)) 847 if retain_sources { 848 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 849 } 850 instructions = instructions.append(StoreInstruction(accumulator_name)) 851 } else { 852 if retain_sources { 853 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 854 } 855 instructions = instructions.append(LoadInstruction(callback_name)) 856 if retain_sources { 857 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 858 } 859 instructions = instructions.append(LoadInstruction(accumulator_name)) 860 if retain_sources { 861 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 862 } 863 instructions = instructions.append(LoadInstruction(item_name)) 864 if retain_sources { 865 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 866 } 867 instructions = instructions.append(CallValueInstruction(2)) 868 if retain_sources { 869 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 870 } 871 instructions = instructions.append(StoreInstruction(accumulator_name)) 872 } 873 if retain_sources { 874 sources = add_origin(sources, origin, offset + instructions.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 875 } 876 instructions = instructions.append(JumpInstruction(loop_start)) 877 end: Nat = offset + instructions.len() 878 mut resolved: [Instruction] = [] 879 mut instruction_index: Nat = 0 880 for instruction in instructions { 881 if instruction_index == next_index { 882 resolved = resolved.append(IterNextInstruction(iterator_name, item_name, end)) 883 } else { 884 resolved = resolved.append(instruction) 885 } 886 instruction_index = instruction_index + 1 887 } 888 if retain_sources { 889 sources = add_origin(sources, origin, offset + resolved.len(), true, "Iterate the collection and invoke the supplied callback for each element.") 890 } 891 resolved = resolved.append(LoadInstruction(accumulator_name)) 892 EmittedCode(resolved, callback.next_temporary, sources, probes) 893 } else { 894 emitted: EmittedCode = emit_expression_list( 895 arguments, 896 program, 897 next_temporary, 898 offset, 899 retain_sources 900 ) 901 sources = emitted.sources 902 probes = emitted.probes 903 mut instructions: [Instruction] = emitted.instructions 904 record: RecordLookup = record_type(program, name) 905 variant: VariantLookup = variant_type(program, name) 906 if record.found { 907 if retain_sources { 908 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 909 } 910 instructions = instructions.append( 911 MakeRecordInstruction(name, record_field_names(record.fields)) 912 ) 913 } else { 914 if variant.found { 915 if retain_sources { 916 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 917 } 918 instructions = instructions.append( 919 MakeVariantInstruction(variant.enum_name, name, arguments.len()) 920 ) 921 } else { 922 if retain_sources { 923 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 924 } 925 instructions = instructions.append(CallInstruction(if name == "http_transport_exchange" { 926 "$http_transport_exchange" 927 } else { 928 if name == "tcp_exchange" { 929 "$tcp_exchange" 930 } else { 931 if name == "tcp_serve" { 932 "$tcp_serve" 933 } else { 934 if name == "tcp_serve_stream" { 935 "$tcp_serve_stream" 936 } else { 937 if name == "tcp_server_read_chunk" { 938 "$tcp_server_read_chunk" 939 } else { 940 name 941 } 942 } 943 } 944 }}, arguments.len())) 945 } 946 } 947 EmittedCode(instructions, emitted.next_temporary, sources, probes) 948 } 949 } 950 } 951 952 pure emit_match( 953 subject: Expr, 954 arms: [MatchArm], 955 program: Program, 956 next_temporary: Nat, 957 offset: Nat, 958 retain_sources: Bool, 959 origin: Option[SourceSpan] 960 ): EmittedCode { 961 mut sources: [InstructionSource] = [] 962 mut probes: [EmissionProbe] = [] 963 temporary_name: Str = "$match${next_temporary}" 964 subject_code: EmittedCode = emit_expression( 965 subject, 966 program, 967 next_temporary + 1, 968 offset, 969 retain_sources 970 ) 971 sources = subject_code.sources 972 probes = subject_code.probes 973 mut instructions: [Instruction] = subject_code.instructions 974 975 if retain_sources { 976 sources = add_origin(sources, origin, offset + instructions.len(), true, "Evaluate the match subject once and select a matching variant.") 977 } 978 instructions = instructions.append(StoreInstruction(temporary_name)) 979 mut temporary: Nat = subject_code.next_temporary 980 for arm in arms { 981 arm_offset: Nat = offset + instructions.len() 982 body_offset: Nat = arm_offset + 2 + arm.pattern.bindings.len() 983 body_code: EmittedCode = emit_expression( 984 arm.body, 985 program, 986 temporary, 987 body_offset, 988 retain_sources 989 ) 990 failure: Nat = body_offset + body_code.instructions.len() + 1 991 if retain_sources { 992 sources = add_origin(sources, origin, offset + instructions.len(), true, "Evaluate the match subject once and select a matching variant.") 993 } 994 instructions = instructions.append(LoadInstruction(temporary_name)) 995 if retain_sources { 996 sources = add_origin(sources, origin, offset + instructions.len(), true, "Evaluate the match subject once and select a matching variant.") 997 } 998 probes = add_emission_probe( 999 probes, 1000 "arm:" + arm.pattern.variant, 1001 arm.body, 1002 arm_offset + 1, 1003 arm_offset + 2, 1004 retain_sources 1005 ) 1006 instructions = instructions.append(MatchVariantInstruction(arm.pattern.variant, failure)) 1007 mut binding_index: Nat = arm.pattern.bindings.len() 1008 while binding_index > 0 { 1009 binding_index = binding_index - 1 1010 if retain_sources { 1011 sources = add_origin(sources, origin, offset + instructions.len(), true, "Evaluate the match subject once and select a matching variant.") 1012 } 1013 instructions = instructions.append(StoreInstruction(arm.pattern.bindings[binding_index])) 1014 } 1015 sources = sources.concat(body_code.sources) 1016 probes = probes.concat(body_code.probes) 1017 instructions = instructions.concat(body_code.instructions) 1018 if retain_sources { 1019 sources = add_origin(sources, origin, offset + instructions.len(), true, "Evaluate the match subject once and select a matching variant.") 1020 } 1021 instructions = instructions.append(PendingEndJumpInstruction()) 1022 temporary = body_code.next_temporary 1023 } 1024 if retain_sources { 1025 sources = add_origin(sources, origin, offset + instructions.len(), true, "Evaluate the match subject once and select a matching variant.") 1026 } 1027 instructions = instructions.append(MatchFailInstruction()) 1028 end: Nat = offset + instructions.len() 1029 EmittedCode(resolve_pending_jumps(instructions, end), temporary, sources, probes) 1030 } 1031 1032 pub pure emit_expression( 1033 expression: Expr, 1034 program: Program, 1035 next_temporary: Nat, 1036 offset: Nat, 1037 retain_sources: Bool 1038 ): EmittedCode { 1039 emit_expression_at(expression, program, next_temporary, offset, retain_sources, None()) 1040 } 1041 1042 pure emit_expression_at( 1043 expression: Expr, 1044 program: Program, 1045 next_temporary: Nat, 1046 offset: Nat, 1047 retain_sources: Bool, 1048 origin: Option[SourceSpan] 1049 ): EmittedCode { 1050 mut sources: [InstructionSource] = [] 1051 mut probes: [EmissionProbe] = [] 1052 1053 match expression { 1054 LocatedExpr(span, value, located_type_argument_spans) => { 1055 emitted: EmittedCode = emit_expression_at( 1056 value, 1057 program, 1058 next_temporary, 1059 offset, 1060 retain_sources, 1061 if retain_sources { 1062 Some(span) 1063 } else { 1064 None() 1065 }) 1066 EmittedCode(emitted.instructions, emitted.next_temporary, emitted.sources, 1067 if retain_sources { 1068 emitted.probes.append( 1069 EmissionProbe("expression", span, offset, offset + emitted.instructions.len()) 1070 ) 1071 } else { 1072 [] 1073 }) 1074 }, 1075 NatExpr(value) => { 1076 if retain_sources { 1077 sources = add_instruction_source(sources, origin, offset, false) 1078 } 1079 instructions: [Instruction] = [ConstInstruction(NatConstant(value))] 1080 EmittedCode(instructions, next_temporary, sources, probes) 1081 }, 1082 DecimalExpr(text) => { 1083 if retain_sources { 1084 sources = add_instruction_source(sources, origin, offset, false) 1085 } 1086 instructions: [Instruction] = [ConstInstruction(DecimalConstant(text))] 1087 EmittedCode(instructions, next_temporary, sources, probes) 1088 }, 1089 StringExpr(text) => emit_string_expression( 1090 text, 1091 next_temporary, 1092 retain_sources, 1093 origin, 1094 offset 1095 ), 1096 BoolExpr(value) => { 1097 if retain_sources { 1098 sources = add_instruction_source(sources, origin, offset, false) 1099 } 1100 instructions: [Instruction] = [ConstInstruction(BoolConstant(value))] 1101 EmittedCode(instructions, next_temporary, sources, probes) 1102 }, 1103 NameExpr(name) => { 1104 if retain_sources { 1105 sources = add_instruction_source(sources, origin, offset, false) 1106 } 1107 instructions: [Instruction] = [LoadInstruction(name)] 1108 EmittedCode(instructions, next_temporary, sources, probes) 1109 }, 1110 // Anonymous bodies must be lowered before reaching instruction emission. 1111 AnonymousExpr(effect, parameters, result_type, body) => EmittedCode([MatchFailInstruction()], next_temporary, [], []), 1112 FunctionExpr(name) => { 1113 if retain_sources { 1114 sources = add_instruction_source(sources, origin, offset, false) 1115 } 1116 if retain_sources { sources = add_instruction_source(sources, origin, offset + 1, false) } 1117 instructions: [Instruction] = [ConstInstruction(StringConstant(name)), 1118 CallInstruction("$intrinsic_function", 1)] 1119 EmittedCode(instructions, next_temporary, sources, probes) 1120 }, 1121 ArrayExpr(items) => { 1122 emitted: EmittedCode = emit_expression_list( 1123 items, 1124 program, 1125 next_temporary, 1126 offset, 1127 retain_sources 1128 ) 1129 sources = emitted.sources 1130 probes = emitted.probes 1131 if retain_sources { 1132 sources = add_instruction_source(sources, origin, offset + emitted.instructions.len(), false) 1133 } 1134 instructions: [Instruction] = emitted.instructions.append(MakeArrayInstruction(items.len())) 1135 EmittedCode(instructions, emitted.next_temporary, sources, probes) 1136 }, 1137 UnaryExpr(operator, operand) => { 1138 emitted: EmittedCode = emit_expression( 1139 operand, 1140 program, 1141 next_temporary, 1142 offset, 1143 retain_sources 1144 ) 1145 sources = emitted.sources 1146 probes = emitted.probes 1147 mut instructions: [Instruction] = [] 1148 if operator == "await" { 1149 // Only the terminal invocation is awaited; argument calls keep their effects. 1150 mut index: Nat = 0 1151 for instruction in emitted.instructions { 1152 if index + 1 == emitted.instructions.len() { 1153 instructions = instructions.append(awaited_instruction(instruction)) 1154 if retain_sources { sources = add_origin(sources, origin, offset + index, true, "Await changes the terminal call into an awaited invocation.") } 1155 } else { 1156 instructions = instructions.append(instruction) 1157 } 1158 index = index + 1 1159 } 1160 } else { 1161 if retain_sources { 1162 sources = add_instruction_source( 1163 sources, 1164 origin, 1165 offset + emitted.instructions.len(), 1166 false 1167 ) 1168 } 1169 instructions = emitted.instructions.append(UnaryInstruction(operator)) 1170 } 1171 EmittedCode(instructions, emitted.next_temporary, sources, probes) 1172 }, 1173 BinaryExpr(operator, left, right) => { 1174 if operator == "&&" || operator == "||" { 1175 emit_short_circuit( 1176 operator, 1177 left, 1178 right, 1179 program, 1180 next_temporary, 1181 offset, 1182 retain_sources, 1183 origin 1184 ) 1185 } else { 1186 left_code: EmittedCode = emit_expression( 1187 left, 1188 program, 1189 next_temporary, 1190 offset, 1191 retain_sources 1192 ) 1193 right_offset: Nat = offset + left_code.instructions.len() 1194 right_code: EmittedCode = emit_expression( 1195 right, 1196 program, 1197 left_code.next_temporary, 1198 right_offset, 1199 retain_sources 1200 ) 1201 sources = left_code.sources.concat(right_code.sources) 1202 probes = left_code.probes.concat(right_code.probes) 1203 mut instructions: [Instruction] = left_code.instructions.concat(right_code.instructions) 1204 if operator == ".." { 1205 if retain_sources { 1206 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 1207 } 1208 instructions = instructions.append(MakeRangeInstruction()) 1209 } else { 1210 if retain_sources { 1211 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 1212 } 1213 instructions = instructions.append(BinaryInstruction(operator)) 1214 } 1215 EmittedCode(instructions, right_code.next_temporary, sources, probes) 1216 } 1217 }, 1218 // Defensive trap for internal callers bypassing the checked frontend. 1219 OwnedCallExpr(target, name, arguments, types) => EmittedCode( 1220 [MatchFailInstruction()], 1221 next_temporary, 1222 [], 1223 [] 1224 ), 1225 DotCallExpr(target, name, arguments, types) => EmittedCode( 1226 [MatchFailInstruction()], 1227 next_temporary, 1228 [], 1229 [] 1230 ), 1231 CallExpr(name, arguments, type_arguments) => emit_call( 1232 name, 1233 arguments, 1234 program, 1235 next_temporary, 1236 offset, 1237 retain_sources, 1238 origin 1239 ), 1240 FieldExpr(target, field) => { 1241 emitted: EmittedCode = emit_expression( 1242 target, 1243 program, 1244 next_temporary, 1245 offset, 1246 retain_sources 1247 ) 1248 sources = emitted.sources 1249 probes = emitted.probes 1250 if retain_sources { 1251 sources = add_instruction_source(sources, origin, offset + emitted.instructions.len(), false) 1252 } 1253 instructions: [Instruction] = emitted.instructions.append(FieldGetInstruction(field)) 1254 EmittedCode(instructions, emitted.next_temporary, sources, probes) 1255 }, 1256 IndexExpr(target, index) => { 1257 target_code: EmittedCode = emit_expression( 1258 target, 1259 program, 1260 next_temporary, 1261 offset, 1262 retain_sources 1263 ) 1264 index_code: EmittedCode = emit_expression( 1265 index, 1266 program, 1267 target_code.next_temporary, 1268 offset + target_code.instructions.len(), 1269 retain_sources 1270 ) 1271 sources = target_code.sources.concat(index_code.sources) 1272 probes = target_code.probes.concat(index_code.probes) 1273 mut instructions: [Instruction] = target_code.instructions.concat(index_code.instructions) 1274 if retain_sources { 1275 sources = add_instruction_source(sources, origin, offset + instructions.len(), false) 1276 } 1277 instructions = instructions.append(IndexGetInstruction()) 1278 EmittedCode(instructions, index_code.next_temporary, sources, probes) 1279 }, 1280 IfExpr(condition, yes, no, has_else) => { 1281 condition_code: EmittedCode = emit_expression( 1282 condition, 1283 program, 1284 next_temporary, 1285 offset, 1286 retain_sources 1287 ) 1288 branch: Nat = offset + condition_code.instructions.len() 1289 yes_code: EmittedCode = emit_block( 1290 yes, 1291 program, 1292 condition_code.next_temporary, 1293 branch + 1, 1294 retain_sources 1295 ) 1296 if has_else { 1297 jump: Nat = branch + 1 + yes_code.instructions.len() 1298 no_start: Nat = jump + 1 1299 no_code: EmittedCode = emit_block( 1300 no, 1301 program, 1302 yes_code.next_temporary, 1303 no_start, 1304 retain_sources 1305 ) 1306 end: Nat = no_start + no_code.instructions.len() 1307 sources = condition_code.sources 1308 probes = condition_code.probes 1309 mut instructions: [Instruction] = condition_code.instructions 1310 if retain_sources { 1311 sources = add_origin(sources, origin, offset + instructions.len(), true, "Select the branch specified by the if expression.") 1312 } 1313 instructions = instructions.append(JumpFalseInstruction(no_start)) 1314 sources = sources.concat(yes_code.sources) 1315 probes = probes.concat(yes_code.probes) 1316 instructions = instructions.concat(yes_code.instructions) 1317 if retain_sources { 1318 sources = add_origin(sources, origin, offset + instructions.len(), true, "Select the branch specified by the if expression.") 1319 } 1320 instructions = instructions.append(JumpInstruction(end)) 1321 sources = sources.concat(no_code.sources) 1322 probes = probes.concat(no_code.probes) 1323 instructions = instructions.concat(no_code.instructions) 1324 probes = add_emission_probe(probes, "if", condition, branch, branch + 1, retain_sources) 1325 EmittedCode(instructions, no_code.next_temporary, sources, probes) 1326 } else { 1327 void_start: Nat = branch + 2 + yes_code.instructions.len() 1328 sources = condition_code.sources 1329 probes = condition_code.probes 1330 mut instructions: [Instruction] = condition_code.instructions 1331 if retain_sources { 1332 sources = add_origin(sources, origin, offset + instructions.len(), true, "Select the branch specified by the if expression.") 1333 } 1334 instructions = instructions.append(JumpFalseInstruction(void_start)) 1335 sources = sources.concat(yes_code.sources) 1336 probes = probes.concat(yes_code.probes) 1337 instructions = instructions.concat(yes_code.instructions) 1338 if retain_sources { 1339 sources = add_origin(sources, origin, offset + instructions.len(), true, "Select the branch specified by the if expression.") 1340 } 1341 instructions = instructions.append(PopInstruction()) 1342 if retain_sources { 1343 sources = add_origin(sources, origin, offset + instructions.len(), true, "Select the branch specified by the if expression.") 1344 } 1345 instructions = instructions.append(ConstInstruction(VoidConstant())) 1346 probes = add_emission_probe(probes, "if", condition, branch, branch + 1, retain_sources) 1347 EmittedCode(instructions, yes_code.next_temporary, sources, probes) 1348 } 1349 }, 1350 BlockExpr(block) => emit_block(block, program, next_temporary, offset, retain_sources), 1351 MatchExpr(subject, arms) => emit_match( 1352 subject, 1353 arms, 1354 program, 1355 next_temporary, 1356 offset, 1357 retain_sources, 1358 origin 1359 ) 1360 } 1361 } 1362 1363 // Core routines are implicit but emitted only when reachable from user code. 1364 // Keep all ordinary functions: only compiler-owned implementation names are pruned. 1365 pub pure core_call_name(instruction: Instruction): Str { 1366 match instruction { 1367 ConstInstruction(a0) => "", 1368 LoadInstruction(a0) => "", 1369 StoreInstruction(a0) => "", 1370 PopInstruction() => "", 1371 UnaryInstruction(a0) => "", 1372 BinaryInstruction(a0) => "", 1373 MakeRangeInstruction() => "", 1374 MakeArrayInstruction(a0) => "", 1375 IndexGetInstruction() => "", 1376 InterpolateInstruction(a0) => "", 1377 IterInitInstruction(a0) => "", 1378 IterNextInstruction(a0, a1, a2) => "", 1379 MakeRecordInstruction(a0, a1) => "", 1380 FieldGetInstruction(a0) => "", 1381 MakeVariantInstruction(a0, a1, a2) => "", 1382 MatchVariantInstruction(a0, a1) => "", 1383 MatchFailInstruction() => "", 1384 CallInstruction(a0, a1) => a0, 1385 CallValueInstruction(a0) => "", 1386 AwaitCallInstruction(a0, a1) => a0, 1387 AwaitValueInstruction(a0) => "", 1388 JumpFalseInstruction(a0) => "", 1389 JumpInstruction(a0) => "", 1390 PendingEndJumpInstruction() => "", 1391 ReturnInstruction() => "" 1392 } 1393 } 1394 1395 pure used_core_functions(functions: [FunctionCode]): Set[Str] { 1396 mut used: Set[Str] = set() 1397 mut changed: Bool = true 1398 1399 while changed { 1400 changed = false 1401 for function in functions { 1402 if !function.name.starts_with_at("$core_", 0) || used.has(function.name) { 1403 for instruction in function.instructions { 1404 name: Str = core_call_name(instruction) 1405 if name.starts_with_at("$core_", 0) && !used.has(name) { 1406 used = used.add(name) 1407 changed = true 1408 } 1409 } 1410 } 1411 } 1412 } 1413 used 1414 } 1415 1416 pub pure compile_program(program: Program): BytecodeProgram { 1417 compile_program_emission(program, false).bytecode 1418 } 1419 1420 pub pure compile_program_with_sources(program: Program): SourceMappedProgram { 1421 compile_program_emission(program, true) 1422 } 1423 1424 pub pure compile_program_emission(program: Program, retain_sources: Bool): SourceMappedProgram { 1425 compile_program_selection(program, retain_sources, true) 1426 } 1427 1428 pub pure compile_program_unpruned(program: Program): BytecodeProgram { 1429 compile_program_selection(program, false, false).bytecode 1430 } 1431 1432 pure compile_program_selection(program: Program, retain_sources: Bool, prune: Bool): SourceMappedProgram { 1433 mut sources: [FunctionSources] = [] 1434 mut probes: [FunctionProbes] = [] 1435 mut functions: [FunctionCode] = [] 1436 1437 for declaration in program.declarations { 1438 match declaration { 1439 FunctionDeclaration(name, parameters, return_type, is_pure, is_async, body, type_parameters) => { 1440 emitted: EmittedCode = emit_block(body, program, 0, 0, retain_sources) 1441 instructions: [Instruction] = emitted.instructions.append(ReturnInstruction()) 1442 if retain_sources { 1443 sources = sources.append(FunctionSources(name, add_origin(emitted.sources, body.span, emitted.instructions.len(), true, "Return the result of this function body."))) 1444 probes = probes.append(FunctionProbes(name, emitted.probes)) 1445 } 1446 functions = functions.append( 1447 FunctionCode(name, parameter_names(parameters), is_pure, is_async, instructions) 1448 ) 1449 }, 1450 ImportDeclaration(path) => {}, 1451 TypeDeclaration(name, base, guard_name, guard) => {}, 1452 RecordDeclaration(name, parameters, fields) => {}, 1453 EnumDeclaration(name, parameters, variants) => {} 1454 } 1455 } 1456 used: Set[Str] = used_core_functions(functions) 1457 mut selected: [FunctionCode] = [] 1458 for function in functions { 1459 if !prune || !function.name.starts_with_at("$core_", 0) || used.has(function.name) { 1460 selected = selected.append(function) 1461 } 1462 } 1463 mut selected_sources: [FunctionSources] = [] 1464 for source in sources { 1465 if !source.name.starts_with_at("$core_", 0) || used.has(source.name) { 1466 selected_sources = selected_sources.append(source) 1467 } 1468 } 1469 mut selected_probes: [FunctionProbes] = [] 1470 for probe in probes { 1471 if !probe.name.starts_with_at("$core_", 0) || used.has(probe.name) { 1472 selected_probes = selected_probes.append(probe) 1473 } 1474 } 1475 SourceMappedProgram(BytecodeProgram(selected), selected_sources, selected_probes) 1476 } 1477 1478 pub pure compile_source_disassembly(source: Str): Str { 1479 match lex(source) { 1480 Ok(tokens) => { 1481 match parse_program_complete(tokens) { 1482 Ok(program) => { 1483 diagnostics: [Diagnostic] = check_program_frontend(program) 1484 if diagnostics.len() > 0 { 1485 render_resolver_diagnostics(diagnostics) 1486 } else { 1487 render_bytecode(compile_program(program)) 1488 } 1489 }, 1490 Error(error) => error.message 1491 } 1492 }, 1493 Error(errors) => "lexing failed" 1494 } 1495 } 1496 1497 pure awaited_instruction(instruction: Instruction): Instruction { 1498 match instruction { 1499 ConstInstruction(a0) => instruction, 1500 LoadInstruction(a0) => instruction, 1501 StoreInstruction(a0) => instruction, 1502 PopInstruction() => instruction, 1503 UnaryInstruction(a0) => instruction, 1504 BinaryInstruction(a0) => instruction, 1505 MakeRangeInstruction() => instruction, 1506 MakeArrayInstruction(a0) => instruction, 1507 IndexGetInstruction() => instruction, 1508 InterpolateInstruction(a0) => instruction, 1509 IterInitInstruction(a0) => instruction, 1510 IterNextInstruction(a0, a1, a2) => instruction, 1511 MakeRecordInstruction(a0, a1) => instruction, 1512 FieldGetInstruction(a0) => instruction, 1513 MakeVariantInstruction(a0, a1, a2) => instruction, 1514 MatchVariantInstruction(a0, a1) => instruction, 1515 MatchFailInstruction() => instruction, 1516 CallInstruction(a0, a1) => AwaitCallInstruction(a0, a1), 1517 CallValueInstruction(a0) => AwaitValueInstruction(a0), 1518 AwaitCallInstruction(a0, a1) => instruction, 1519 AwaitValueInstruction(a0) => instruction, 1520 JumpFalseInstruction(a0) => instruction, 1521 JumpInstruction(a0) => instruction, 1522 PendingEndJumpInstruction() => instruction, 1523 ReturnInstruction() => instruction 1524 } 1525 } 1526
Functions
[
{
"id": "declaration/15",
"name": "add_emission_probe",
"line": 98,
"state": "covered",
"entries": "17437"
},
{
"id": "declaration/19",
"name": "add_instruction_source",
"line": 134,
"state": "covered",
"entries": "4333"
},
{
"id": "declaration/20",
"name": "add_origin",
"line": 143,
"state": "covered",
"entries": "7074"
},
{
"id": "declaration/21",
"name": "parameter_name",
"line": 151,
"state": "covered",
"entries": "8814"
},
{
"id": "declaration/22",
"name": "parameter_names",
"line": 155,
"state": "covered",
"entries": "5644"
},
{
"id": "declaration/23",
"name": "record_field_name",
"line": 159,
"state": "covered",
"entries": "7595"
},
{
"id": "declaration/24",
"name": "record_field_names",
"line": 163,
"state": "covered",
"entries": "2172"
},
{
"id": "declaration/25",
"name": "resolve_pending_jumps",
"line": 167,
"state": "covered",
"entries": "1571"
},
{
"id": "declaration/26",
"name": "render_string_items",
"line": 253,
"state": "covered",
"entries": "36"
},
{
"id": "declaration/27",
"name": "render_constant",
"line": 269,
"state": "covered",
"entries": "121"
},
{
"id": "declaration/28",
"name": "instruction_purpose",
"line": 310,
"state": "zero",
"entries": "0"
},
{
"id": "declaration/29",
"name": "render_instruction",
"line": 340,
"state": "covered",
"entries": "484"
},
{
"id": "declaration/30",
"name": "render_bytecode",
"line": 379,
"state": "covered",
"entries": "17"
},
{
"id": "declaration/31",
"name": "emit_expression_list",
"line": 406,
"state": "covered",
"entries": "30614"
},
{
"id": "declaration/32",
"name": "emit_block",
"line": 434,
"state": "covered",
"entries": "19179"
},
{
"id": "declaration/33",
"name": "emit_short_circuit",
"line": 606,
"state": "covered",
"entries": "4842"
},
{
"id": "declaration/34",
"name": "emit_string_expression",
"line": 685,
"state": "covered",
"entries": "7842"
},
{
"id": "declaration/35",
"name": "emit_call",
"line": 718,
"state": "covered",
"entries": "28371"
},
{
"id": "declaration/36",
"name": "emit_match",
"line": 952,
"state": "covered",
"entries": "1571"
},
{
"id": "declaration/37",
"name": "emit_expression",
"line": 1032,
"state": "covered",
"entries": "145163"
},
{
"id": "declaration/38",
"name": "emit_expression_at",
"line": 1042,
"state": "covered",
"entries": "290132"
},
{
"id": "declaration/39",
"name": "core_call_name",
"line": 1365,
"state": "covered",
"entries": "455221"
},
{
"id": "declaration/40",
"name": "used_core_functions",
"line": 1395,
"state": "covered",
"entries": "159"
},
{
"id": "declaration/41",
"name": "compile_program",
"line": 1416,
"state": "covered",
"entries": "100"
},
{
"id": "declaration/42",
"name": "compile_program_with_sources",
"line": 1420,
"state": "covered",
"entries": "14"
},
{
"id": "declaration/43",
"name": "compile_program_emission",
"line": 1424,
"state": "covered",
"entries": "119"
},
{
"id": "declaration/44",
"name": "compile_program_unpruned",
"line": 1428,
"state": "covered",
"entries": "40"
},
{
"id": "declaration/45",
"name": "compile_program_selection",
"line": 1432,
"state": "covered",
"entries": "159"
},
{
"id": "declaration/46",
"name": "compile_source_disassembly",
"line": 1478,
"state": "covered",
"entries": "4"
},
{
"id": "declaration/47",
"name": "awaited_instruction",
"line": 1497,
"state": "covered",
"entries": "101"
}
]Source branch outcomes
[
{
"id": "declaration/15/tail/decision/true",
"outcome": "true",
"line": 106,
"state": "covered",
"hits": "476"
},
{
"id": "declaration/15/tail/decision/false",
"outcome": "false",
"line": 106,
"state": "covered",
"hits": "16961"
},
{
"id": "declaration/15/tail/true/tail/arm/0",
"outcome": "Some",
"line": 108,
"state": "covered",
"hits": "476"
},
{
"id": "declaration/15/tail/true/tail/arm/1",
"outcome": "None",
"line": 109,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/20/tail/arm/0",
"outcome": "None",
"line": 146,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/20/tail/arm/1",
"outcome": "Some",
"line": 147,
"state": "covered",
"hits": "7069"
},
{
"id": "declaration/25/statement/1/decision/body",
"outcome": "body",
"line": 170,
"state": "covered",
"hits": "107697"
},
{
"id": "declaration/25/statement/1/decision/exit",
"outcome": "exit",
"line": 170,
"state": "covered",
"hits": "1571"
},
{
"id": "declaration/25/statement/1/body/tail/arm/0",
"outcome": "PendingEndJumpInstruction",
"line": 172,
"state": "covered",
"hits": "5803"
},
{
"id": "declaration/25/statement/1/body/tail/arm/1",
"outcome": "ConstInstruction",
"line": 175,
"state": "covered",
"hits": "12864"
},
{
"id": "declaration/25/statement/1/body/tail/arm/2",
"outcome": "LoadInstruction",
"line": 178,
"state": "covered",
"hits": "29704"
},
{
"id": "declaration/25/statement/1/body/tail/arm/3",
"outcome": "StoreInstruction",
"line": 181,
"state": "covered",
"hits": "16284"
},
{
"id": "declaration/25/statement/1/body/tail/arm/4",
"outcome": "PopInstruction",
"line": 184,
"state": "covered",
"hits": "1500"
},
{
"id": "declaration/25/statement/1/body/tail/arm/5",
"outcome": "UnaryInstruction",
"line": 187,
"state": "covered",
"hits": "253"
},
{
"id": "declaration/25/statement/1/body/tail/arm/6",
"outcome": "BinaryInstruction",
"line": 190,
"state": "covered",
"hits": "3480"
},
{
"id": "declaration/25/statement/1/body/tail/arm/7",
"outcome": "MakeRangeInstruction",
"line": 193,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/25/statement/1/body/tail/arm/8",
"outcome": "MakeArrayInstruction",
"line": 196,
"state": "covered",
"hits": "637"
},
{
"id": "declaration/25/statement/1/body/tail/arm/9",
"outcome": "IndexGetInstruction",
"line": 199,
"state": "covered",
"hits": "514"
},
{
"id": "declaration/25/statement/1/body/tail/arm/10",
"outcome": "InterpolateInstruction",
"line": 202,
"state": "covered",
"hits": "288"
},
{
"id": "declaration/25/statement/1/body/tail/arm/11",
"outcome": "IterInitInstruction",
"line": 205,
"state": "covered",
"hits": "310"
},
{
"id": "declaration/25/statement/1/body/tail/arm/12",
"outcome": "IterNextInstruction",
"line": 208,
"state": "covered",
"hits": "310"
},
{
"id": "declaration/25/statement/1/body/tail/arm/13",
"outcome": "MakeRecordInstruction",
"line": 211,
"state": "covered",
"hits": "860"
},
{
"id": "declaration/25/statement/1/body/tail/arm/14",
"outcome": "FieldGetInstruction",
"line": 214,
"state": "covered",
"hits": "5776"
},
{
"id": "declaration/25/statement/1/body/tail/arm/15",
"outcome": "MakeVariantInstruction",
"line": 217,
"state": "covered",
"hits": "3171"
},
{
"id": "declaration/25/statement/1/body/tail/arm/16",
"outcome": "MatchVariantInstruction",
"line": 220,
"state": "covered",
"hits": "8097"
},
{
"id": "declaration/25/statement/1/body/tail/arm/17",
"outcome": "MatchFailInstruction",
"line": 223,
"state": "covered",
"hits": "2351"
},
{
"id": "declaration/25/statement/1/body/tail/arm/18",
"outcome": "CallInstruction",
"line": 226,
"state": "covered",
"hits": "7684"
},
{
"id": "declaration/25/statement/1/body/tail/arm/19",
"outcome": "CallValueInstruction",
"line": 229,
"state": "covered",
"hits": "32"
},
{
"id": "declaration/25/statement/1/body/tail/arm/20",
"outcome": "AwaitCallInstruction",
"line": 232,
"state": "covered",
"hits": "27"
},
{
"id": "declaration/25/statement/1/body/tail/arm/21",
"outcome": "AwaitValueInstruction",
"line": 235,
"state": "covered",
"hits": "9"
},
{
"id": "declaration/25/statement/1/body/tail/arm/22",
"outcome": "JumpFalseInstruction",
"line": 238,
"state": "covered",
"hits": "2920"
},
{
"id": "declaration/25/statement/1/body/tail/arm/23",
"outcome": "JumpInstruction",
"line": 241,
"state": "covered",
"hits": "4802"
},
{
"id": "declaration/25/statement/1/body/tail/arm/24",
"outcome": "ReturnInstruction",
"line": 244,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/26/statement/2/decision/body",
"outcome": "body",
"line": 257,
"state": "covered",
"hits": "23"
},
{
"id": "declaration/26/statement/2/decision/exit",
"outcome": "exit",
"line": 257,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/26/statement/2/body/statement/0/value/decision/true",
"outcome": "true",
"line": 258,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/26/statement/2/body/statement/0/value/decision/false",
"outcome": "false",
"line": 258,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/27/tail/arm/0",
"outcome": "NatConstant",
"line": 271,
"state": "covered",
"hits": "65"
},
{
"id": "declaration/27/tail/arm/1",
"outcome": "IntConstant",
"line": 272,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/27/tail/arm/1/body/block/tail/decision/true",
"outcome": "true",
"line": 273,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/27/tail/arm/1/body/block/tail/decision/false",
"outcome": "false",
"line": 273,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/27/tail/arm/2",
"outcome": "DecimalConstant",
"line": 279,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/27/tail/arm/3",
"outcome": "DecimalPartsConstant",
"line": 280,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/27/tail/arm/3/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 281,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/27/tail/arm/3/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 281,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/27/tail/arm/3/body/block/statement/1/value/decision/true",
"outcome": "true",
"line": 286,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/27/tail/arm/3/body/block/statement/1/value/decision/false",
"outcome": "false",
"line": 286,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/27/tail/arm/3/body/block/statement/4/decision/body",
"outcome": "body",
"line": 293,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/27/tail/arm/3/body/block/statement/4/decision/exit",
"outcome": "exit",
"line": 293,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/27/tail/arm/4",
"outcome": "StringConstant",
"line": 298,
"state": "covered",
"hits": "17"
},
{
"id": "declaration/27/tail/arm/5",
"outcome": "BoolConstant",
"line": 299,
"state": "covered",
"hits": "10"
},
{
"id": "declaration/27/tail/arm/5/body/decision/true",
"outcome": "true",
"line": 299,
"state": "covered",
"hits": "6"
},
{
"id": "declaration/27/tail/arm/5/body/decision/false",
"outcome": "false",
"line": 299,
"state": "covered",
"hits": "4"
},
{
"id": "declaration/27/tail/arm/6",
"outcome": "VoidConstant",
"line": 304,
"state": "covered",
"hits": "23"
},
{
"id": "declaration/28/tail/arm/0",
"outcome": "ConstInstruction",
"line": 312,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/1",
"outcome": "LoadInstruction",
"line": 313,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/2",
"outcome": "StoreInstruction",
"line": 314,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/3",
"outcome": "PopInstruction",
"line": 315,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/4",
"outcome": "UnaryInstruction",
"line": 316,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/5",
"outcome": "BinaryInstruction",
"line": 317,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/6",
"outcome": "MakeRangeInstruction",
"line": 318,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/7",
"outcome": "MakeArrayInstruction",
"line": 319,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/8",
"outcome": "IndexGetInstruction",
"line": 320,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/9",
"outcome": "InterpolateInstruction",
"line": 321,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/10",
"outcome": "IterInitInstruction",
"line": 322,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/11",
"outcome": "IterNextInstruction",
"line": 323,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/12",
"outcome": "MakeRecordInstruction",
"line": 324,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/13",
"outcome": "FieldGetInstruction",
"line": 325,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/14",
"outcome": "MakeVariantInstruction",
"line": 326,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/15",
"outcome": "MatchVariantInstruction",
"line": 327,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/16",
"outcome": "MatchFailInstruction",
"line": 328,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/17",
"outcome": "CallInstruction",
"line": 329,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/17/body/decision/true",
"outcome": "true",
"line": 329,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/17/body/decision/false",
"outcome": "false",
"line": 329,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/17/body/false/tail/decision/true",
"outcome": "true",
"line": 329,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/17/body/false/tail/decision/false",
"outcome": "false",
"line": 329,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/18",
"outcome": "CallValueInstruction",
"line": 330,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/19",
"outcome": "AwaitCallInstruction",
"line": 331,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/20",
"outcome": "AwaitValueInstruction",
"line": 332,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/21",
"outcome": "JumpFalseInstruction",
"line": 333,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/22",
"outcome": "JumpInstruction",
"line": 334,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/23",
"outcome": "PendingEndJumpInstruction",
"line": 335,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/28/tail/arm/24",
"outcome": "ReturnInstruction",
"line": 336,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/29/tail/arm/0",
"outcome": "ConstInstruction",
"line": 342,
"state": "covered",
"hits": "121"
},
{
"id": "declaration/29/tail/arm/1",
"outcome": "LoadInstruction",
"line": 346,
"state": "covered",
"hits": "80"
},
{
"id": "declaration/29/tail/arm/2",
"outcome": "StoreInstruction",
"line": 347,
"state": "covered",
"hits": "43"
},
{
"id": "declaration/29/tail/arm/3",
"outcome": "PopInstruction",
"line": 348,
"state": "covered",
"hits": "37"
},
{
"id": "declaration/29/tail/arm/4",
"outcome": "UnaryInstruction",
"line": 349,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/29/tail/arm/5",
"outcome": "BinaryInstruction",
"line": 350,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/29/tail/arm/6",
"outcome": "MakeRangeInstruction",
"line": 351,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/29/tail/arm/7",
"outcome": "MakeArrayInstruction",
"line": 352,
"state": "covered",
"hits": "9"
},
{
"id": "declaration/29/tail/arm/8",
"outcome": "IndexGetInstruction",
"line": 353,
"state": "covered",
"hits": "6"
},
{
"id": "declaration/29/tail/arm/9",
"outcome": "InterpolateInstruction",
"line": 354,
"state": "covered",
"hits": "4"
},
{
"id": "declaration/29/tail/arm/10",
"outcome": "IterInitInstruction",
"line": 358,
"state": "covered",
"hits": "7"
},
{
"id": "declaration/29/tail/arm/11",
"outcome": "IterNextInstruction",
"line": 359,
"state": "covered",
"hits": "7"
},
{
"id": "declaration/29/tail/arm/12",
"outcome": "MakeRecordInstruction",
"line": 360,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/29/tail/arm/13",
"outcome": "FieldGetInstruction",
"line": 364,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/29/tail/arm/14",
"outcome": "MakeVariantInstruction",
"line": 365,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/29/tail/arm/15",
"outcome": "MatchVariantInstruction",
"line": 366,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/29/tail/arm/16",
"outcome": "MatchFailInstruction",
"line": 367,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/29/tail/arm/17",
"outcome": "CallInstruction",
"line": 368,
"state": "covered",
"hits": "53"
},
{
"id": "declaration/29/tail/arm/18",
"outcome": "CallValueInstruction",
"line": 369,
"state": "covered",
"hits": "6"
},
{
"id": "declaration/29/tail/arm/19",
"outcome": "AwaitCallInstruction",
"line": 370,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/29/tail/arm/20",
"outcome": "AwaitValueInstruction",
"line": 371,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/29/tail/arm/21",
"outcome": "JumpFalseInstruction",
"line": 372,
"state": "covered",
"hits": "12"
},
{
"id": "declaration/29/tail/arm/22",
"outcome": "JumpInstruction",
"line": 373,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/29/tail/arm/23",
"outcome": "PendingEndJumpInstruction",
"line": 374,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/29/tail/arm/24",
"outcome": "ReturnInstruction",
"line": 375,
"state": "covered",
"hits": "33"
},
{
"id": "declaration/30/statement/1/decision/body",
"outcome": "body",
"line": 382,
"state": "covered",
"hits": "29"
},
{
"id": "declaration/30/statement/1/decision/exit",
"outcome": "exit",
"line": 382,
"state": "covered",
"hits": "17"
},
{
"id": "declaration/30/statement/1/body/statement/0/value/decision/true",
"outcome": "true",
"line": 383,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/30/statement/1/body/statement/0/value/decision/false",
"outcome": "false",
"line": 383,
"state": "covered",
"hits": "29"
},
{
"id": "declaration/30/statement/1/body/statement/0/value/false/tail/decision/true",
"outcome": "true",
"line": 386,
"state": "covered",
"hits": "12"
},
{
"id": "declaration/30/statement/1/body/statement/0/value/false/tail/decision/false",
"outcome": "false",
"line": 386,
"state": "covered",
"hits": "17"
},
{
"id": "declaration/30/statement/1/body/statement/5/decision/body",
"outcome": "body",
"line": 396,
"state": "covered",
"hits": "340"
},
{
"id": "declaration/30/statement/1/body/statement/5/decision/exit",
"outcome": "exit",
"line": 396,
"state": "covered",
"hits": "29"
},
{
"id": "declaration/31/statement/4/decision/body",
"outcome": "body",
"line": 418,
"state": "covered",
"hits": "46568"
},
{
"id": "declaration/31/statement/4/decision/exit",
"outcome": "exit",
"line": 418,
"state": "covered",
"hits": "30614"
},
{
"id": "declaration/32/statement/5/decision/body",
"outcome": "body",
"line": 447,
"state": "covered",
"hits": "18185"
},
{
"id": "declaration/32/statement/5/decision/exit",
"outcome": "exit",
"line": 447,
"state": "covered",
"hits": "19179"
},
{
"id": "declaration/32/statement/5/body/statement/0/value/decision/true",
"outcome": "true",
"line": 448,
"state": "covered",
"hits": "624"
},
{
"id": "declaration/32/statement/5/body/statement/0/value/decision/false",
"outcome": "false",
"line": 448,
"state": "covered",
"hits": "17561"
},
{
"id": "declaration/32/statement/5/body/statement/0/value/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 448,
"state": "covered",
"hits": "624"
},
{
"id": "declaration/32/statement/5/body/statement/0/value/condition/decision/skip-right",
"outcome": "skip-right",
"line": 448,
"state": "covered",
"hits": "17561"
},
{
"id": "declaration/32/statement/5/body/tail/arm/0",
"outcome": "BindingStatement",
"line": 454,
"state": "covered",
"hits": "7252"
},
{
"id": "declaration/32/statement/5/body/tail/arm/0/body/block/statement/4/value/decision/true",
"outcome": "true",
"line": 465,
"state": "covered",
"hits": "247"
},
{
"id": "declaration/32/statement/5/body/tail/arm/0/body/block/statement/4/value/decision/false",
"outcome": "false",
"line": 465,
"state": "covered",
"hits": "7005"
},
{
"id": "declaration/32/statement/5/body/tail/arm/1",
"outcome": "AssignmentStatement",
"line": 469,
"state": "covered",
"hits": "6532"
},
{
"id": "declaration/32/statement/5/body/tail/arm/1/body/block/statement/4/value/decision/true",
"outcome": "true",
"line": 480,
"state": "covered",
"hits": "218"
},
{
"id": "declaration/32/statement/5/body/tail/arm/1/body/block/statement/4/value/decision/false",
"outcome": "false",
"line": 480,
"state": "covered",
"hits": "6314"
},
{
"id": "declaration/32/statement/5/body/tail/arm/2",
"outcome": "ExpressionStatement",
"line": 484,
"state": "covered",
"hits": "2561"
},
{
"id": "declaration/32/statement/5/body/tail/arm/2/body/block/statement/4/value/decision/true",
"outcome": "true",
"line": 495,
"state": "covered",
"hits": "78"
},
{
"id": "declaration/32/statement/5/body/tail/arm/2/body/block/statement/4/value/decision/false",
"outcome": "false",
"line": 495,
"state": "covered",
"hits": "2483"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3",
"outcome": "WhileStatement",
"line": 499,
"state": "covered",
"hits": "752"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3/body/block/statement/8/value/decision/true",
"outcome": "true",
"line": 527,
"state": "covered",
"hits": "55"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3/body/block/statement/8/value/decision/false",
"outcome": "false",
"line": 527,
"state": "covered",
"hits": "697"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3/body/block/statement/13/value/decision/true",
"outcome": "true",
"line": 532,
"state": "covered",
"hits": "55"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3/body/block/statement/13/value/decision/false",
"outcome": "false",
"line": 532,
"state": "covered",
"hits": "697"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3/body/block/statement/15/value/decision/true",
"outcome": "true",
"line": 534,
"state": "covered",
"hits": "55"
},
{
"id": "declaration/32/statement/5/body/tail/arm/3/body/block/statement/15/value/decision/false",
"outcome": "false",
"line": 534,
"state": "covered",
"hits": "697"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4",
"outcome": "ForStatement",
"line": 538,
"state": "covered",
"hits": "1088"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/10/value/decision/true",
"outcome": "true",
"line": 561,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/10/value/decision/false",
"outcome": "false",
"line": 561,
"state": "covered",
"hits": "1062"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/13/value/decision/true",
"outcome": "true",
"line": 571,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/13/value/decision/false",
"outcome": "false",
"line": 571,
"state": "covered",
"hits": "1062"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/18/value/decision/true",
"outcome": "true",
"line": 576,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/18/value/decision/false",
"outcome": "false",
"line": 576,
"state": "covered",
"hits": "1062"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/20/value/decision/true",
"outcome": "true",
"line": 578,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/32/statement/5/body/tail/arm/4/body/block/statement/20/value/decision/false",
"outcome": "false",
"line": 578,
"state": "covered",
"hits": "1062"
},
{
"id": "declaration/32/statement/6/value/arm/0",
"outcome": "NoBlockValue",
"line": 585,
"state": "covered",
"hits": "6552"
},
{
"id": "declaration/32/statement/6/value/arm/0/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 586,
"state": "covered",
"hits": "180"
},
{
"id": "declaration/32/statement/6/value/arm/0/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 586,
"state": "covered",
"hits": "6372"
},
{
"id": "declaration/32/statement/6/value/arm/1",
"outcome": "TailBlockValue",
"line": 589,
"state": "covered",
"hits": "12627"
},
{
"id": "declaration/33/tail/decision/true",
"outcome": "true",
"line": 621,
"state": "covered",
"hits": "2054"
},
{
"id": "declaration/33/tail/decision/false",
"outcome": "false",
"line": 621,
"state": "covered",
"hits": "2788"
},
{
"id": "declaration/33/tail/true/statement/6/value/decision/true",
"outcome": "true",
"line": 634,
"state": "covered",
"hits": "64"
},
{
"id": "declaration/33/tail/true/statement/6/value/decision/false",
"outcome": "false",
"line": 634,
"state": "covered",
"hits": "1990"
},
{
"id": "declaration/33/tail/true/statement/11/value/decision/true",
"outcome": "true",
"line": 641,
"state": "covered",
"hits": "64"
},
{
"id": "declaration/33/tail/true/statement/11/value/decision/false",
"outcome": "false",
"line": 641,
"state": "covered",
"hits": "1990"
},
{
"id": "declaration/33/tail/true/statement/13/value/decision/true",
"outcome": "true",
"line": 645,
"state": "covered",
"hits": "64"
},
{
"id": "declaration/33/tail/true/statement/13/value/decision/false",
"outcome": "false",
"line": 645,
"state": "covered",
"hits": "1990"
},
{
"id": "declaration/33/tail/false/statement/7/value/decision/true",
"outcome": "true",
"line": 665,
"state": "covered",
"hits": "122"
},
{
"id": "declaration/33/tail/false/statement/7/value/decision/false",
"outcome": "false",
"line": 665,
"state": "covered",
"hits": "2666"
},
{
"id": "declaration/33/tail/false/statement/9/value/decision/true",
"outcome": "true",
"line": 669,
"state": "covered",
"hits": "122"
},
{
"id": "declaration/33/tail/false/statement/9/value/decision/false",
"outcome": "false",
"line": 669,
"state": "covered",
"hits": "2666"
},
{
"id": "declaration/33/tail/false/statement/11/value/decision/true",
"outcome": "true",
"line": 673,
"state": "covered",
"hits": "122"
},
{
"id": "declaration/33/tail/false/statement/11/value/decision/false",
"outcome": "false",
"line": 673,
"state": "covered",
"hits": "2666"
},
{
"id": "declaration/34/statement/5/value/decision/true",
"outcome": "true",
"line": 698,
"state": "covered",
"hits": "7450"
},
{
"id": "declaration/34/statement/5/value/decision/false",
"outcome": "false",
"line": 698,
"state": "covered",
"hits": "392"
},
{
"id": "declaration/34/statement/5/value/true/statement/0/value/decision/true",
"outcome": "true",
"line": 699,
"state": "covered",
"hits": "10"
},
{
"id": "declaration/34/statement/5/value/true/statement/0/value/decision/false",
"outcome": "false",
"line": 699,
"state": "covered",
"hits": "7440"
},
{
"id": "declaration/34/statement/5/value/false/statement/0/decision/body",
"outcome": "body",
"line": 704,
"state": "covered",
"hits": "624"
},
{
"id": "declaration/34/statement/5/value/false/statement/0/decision/exit",
"outcome": "exit",
"line": 704,
"state": "covered",
"hits": "392"
},
{
"id": "declaration/34/statement/5/value/false/statement/0/body/statement/0/value/decision/true",
"outcome": "true",
"line": 705,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/34/statement/5/value/false/statement/0/body/statement/0/value/decision/false",
"outcome": "false",
"line": 705,
"state": "covered",
"hits": "623"
},
{
"id": "declaration/34/statement/5/value/false/statement/1/value/decision/true",
"outcome": "true",
"line": 710,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/34/statement/5/value/false/statement/1/value/decision/false",
"outcome": "false",
"line": 710,
"state": "covered",
"hits": "391"
},
{
"id": "declaration/35/tail/decision/true",
"outcome": "true",
"line": 730,
"state": "covered",
"hits": "377"
},
{
"id": "declaration/35/tail/decision/false",
"outcome": "false",
"line": 730,
"state": "covered",
"hits": "27994"
},
{
"id": "declaration/35/tail/true/tail/args/2/decision/true",
"outcome": "true",
"line": 741,
"state": "covered",
"hits": "13"
},
{
"id": "declaration/35/tail/true/tail/args/2/decision/false",
"outcome": "false",
"line": 741,
"state": "covered",
"hits": "364"
},
{
"id": "declaration/35/tail/false/tail/decision/true",
"outcome": "true",
"line": 747,
"state": "covered",
"hits": "70"
},
{
"id": "declaration/35/tail/false/tail/decision/false",
"outcome": "false",
"line": 747,
"state": "covered",
"hits": "27924"
},
{
"id": "declaration/35/tail/false/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 747,
"state": "covered",
"hits": "27950"
},
{
"id": "declaration/35/tail/false/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 747,
"state": "covered",
"hits": "44"
},
{
"id": "declaration/35/tail/false/tail/true/statement/8/value/decision/true",
"outcome": "true",
"line": 762,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/8/value/decision/false",
"outcome": "false",
"line": 762,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/decision/true",
"outcome": "true",
"line": 772,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/decision/false",
"outcome": "false",
"line": 772,
"state": "covered",
"hits": "44"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/true/statement/4/value/decision/true",
"outcome": "true",
"line": 783,
"state": "covered",
"hits": "11"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/true/statement/4/value/decision/false",
"outcome": "false",
"line": 783,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/false/statement/0/value/decision/true",
"outcome": "true",
"line": 789,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/false/statement/0/value/decision/false",
"outcome": "false",
"line": 789,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/false/statement/2/value/decision/true",
"outcome": "true",
"line": 793,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/11/value/false/statement/2/value/decision/false",
"outcome": "false",
"line": 793,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/16/value/decision/true",
"outcome": "true",
"line": 808,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/16/value/decision/false",
"outcome": "false",
"line": 808,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/true/statement/18/value/decision/true",
"outcome": "true",
"line": 812,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/18/value/decision/false",
"outcome": "false",
"line": 812,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/true/statement/20/value/decision/true",
"outcome": "true",
"line": 816,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/20/value/decision/false",
"outcome": "false",
"line": 816,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/true/statement/24/value/decision/true",
"outcome": "true",
"line": 822,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/24/value/decision/false",
"outcome": "false",
"line": 822,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/decision/true",
"outcome": "true",
"line": 826,
"state": "covered",
"hits": "44"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/decision/false",
"outcome": "false",
"line": 826,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/0/value/decision/true",
"outcome": "true",
"line": 827,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/0/value/decision/false",
"outcome": "false",
"line": 827,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/2/value/decision/true",
"outcome": "true",
"line": 831,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/2/value/decision/false",
"outcome": "false",
"line": 831,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/4/value/decision/true",
"outcome": "true",
"line": 835,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/4/value/decision/false",
"outcome": "false",
"line": 835,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/6/value/decision/true",
"outcome": "true",
"line": 839,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/6/value/decision/false",
"outcome": "false",
"line": 839,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/8/value/decision/true",
"outcome": "true",
"line": 843,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/8/value/decision/false",
"outcome": "false",
"line": 843,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/10/value/decision/true",
"outcome": "true",
"line": 847,
"state": "covered",
"hits": "8"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/true/statement/10/value/decision/false",
"outcome": "false",
"line": 847,
"state": "covered",
"hits": "36"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/0/value/decision/true",
"outcome": "true",
"line": 852,
"state": "covered",
"hits": "11"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/0/value/decision/false",
"outcome": "false",
"line": 852,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/2/value/decision/true",
"outcome": "true",
"line": 856,
"state": "covered",
"hits": "11"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/2/value/decision/false",
"outcome": "false",
"line": 856,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/4/value/decision/true",
"outcome": "true",
"line": 860,
"state": "covered",
"hits": "11"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/4/value/decision/false",
"outcome": "false",
"line": 860,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/6/value/decision/true",
"outcome": "true",
"line": 864,
"state": "covered",
"hits": "11"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/6/value/decision/false",
"outcome": "false",
"line": 864,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/8/value/decision/true",
"outcome": "true",
"line": 868,
"state": "covered",
"hits": "11"
},
{
"id": "declaration/35/tail/false/tail/true/statement/26/value/false/statement/8/value/decision/false",
"outcome": "false",
"line": 868,
"state": "covered",
"hits": "15"
},
{
"id": "declaration/35/tail/false/tail/true/statement/27/value/decision/true",
"outcome": "true",
"line": 873,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/27/value/decision/false",
"outcome": "false",
"line": 873,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/true/statement/32/decision/body",
"outcome": "body",
"line": 880,
"state": "covered",
"hits": "1405"
},
{
"id": "declaration/35/tail/false/tail/true/statement/32/decision/exit",
"outcome": "exit",
"line": 880,
"state": "covered",
"hits": "70"
},
{
"id": "declaration/35/tail/false/tail/true/statement/32/body/statement/0/value/decision/true",
"outcome": "true",
"line": 881,
"state": "covered",
"hits": "70"
},
{
"id": "declaration/35/tail/false/tail/true/statement/32/body/statement/0/value/decision/false",
"outcome": "false",
"line": 881,
"state": "covered",
"hits": "1335"
},
{
"id": "declaration/35/tail/false/tail/true/statement/33/value/decision/true",
"outcome": "true",
"line": 888,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/35/tail/false/tail/true/statement/33/value/decision/false",
"outcome": "false",
"line": 888,
"state": "covered",
"hits": "51"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/decision/true",
"outcome": "true",
"line": 906,
"state": "covered",
"hits": "2172"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/decision/false",
"outcome": "false",
"line": 906,
"state": "covered",
"hits": "25752"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/true/statement/0/value/decision/true",
"outcome": "true",
"line": 907,
"state": "covered",
"hits": "24"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/true/statement/0/value/decision/false",
"outcome": "false",
"line": 907,
"state": "covered",
"hits": "2148"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/decision/true",
"outcome": "true",
"line": 914,
"state": "covered",
"hits": "5019"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/decision/false",
"outcome": "false",
"line": 914,
"state": "covered",
"hits": "20733"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/true/statement/0/value/decision/true",
"outcome": "true",
"line": 915,
"state": "covered",
"hits": "131"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/true/statement/0/value/decision/false",
"outcome": "false",
"line": 915,
"state": "covered",
"hits": "4888"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/0/value/decision/true",
"outcome": "true",
"line": 922,
"state": "covered",
"hits": "713"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/0/value/decision/false",
"outcome": "false",
"line": 922,
"state": "covered",
"hits": "20020"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/decision/true",
"outcome": "true",
"line": 925,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/decision/false",
"outcome": "false",
"line": 925,
"state": "covered",
"hits": "20733"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/decision/true",
"outcome": "true",
"line": 928,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/decision/false",
"outcome": "false",
"line": 928,
"state": "covered",
"hits": "20733"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/false/tail/decision/true",
"outcome": "true",
"line": 931,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/false/tail/decision/false",
"outcome": "false",
"line": 931,
"state": "covered",
"hits": "20733"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/false/tail/false/tail/decision/true",
"outcome": "true",
"line": 934,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/false/tail/false/tail/decision/false",
"outcome": "false",
"line": 934,
"state": "covered",
"hits": "20733"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/false/tail/false/tail/false/tail/decision/true",
"outcome": "true",
"line": 937,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/35/tail/false/tail/false/statement/6/value/false/tail/false/statement/1/value/args/0/args/0/false/tail/false/tail/false/tail/false/tail/decision/false",
"outcome": "false",
"line": 937,
"state": "covered",
"hits": "20733"
},
{
"id": "declaration/36/statement/7/value/decision/true",
"outcome": "true",
"line": 975,
"state": "covered",
"hits": "29"
},
{
"id": "declaration/36/statement/7/value/decision/false",
"outcome": "false",
"line": 975,
"state": "covered",
"hits": "1542"
},
{
"id": "declaration/36/statement/10/decision/body",
"outcome": "body",
"line": 980,
"state": "covered",
"hits": "5803"
},
{
"id": "declaration/36/statement/10/decision/exit",
"outcome": "exit",
"line": 980,
"state": "covered",
"hits": "1571"
},
{
"id": "declaration/36/statement/10/body/statement/4/value/decision/true",
"outcome": "true",
"line": 991,
"state": "covered",
"hits": "58"
},
{
"id": "declaration/36/statement/10/body/statement/4/value/decision/false",
"outcome": "false",
"line": 991,
"state": "covered",
"hits": "5745"
},
{
"id": "declaration/36/statement/10/body/statement/6/value/decision/true",
"outcome": "true",
"line": 995,
"state": "covered",
"hits": "58"
},
{
"id": "declaration/36/statement/10/body/statement/6/value/decision/false",
"outcome": "false",
"line": 995,
"state": "covered",
"hits": "5745"
},
{
"id": "declaration/36/statement/10/body/statement/10/decision/body",
"outcome": "body",
"line": 1008,
"state": "covered",
"hits": "7024"
},
{
"id": "declaration/36/statement/10/body/statement/10/decision/exit",
"outcome": "exit",
"line": 1008,
"state": "covered",
"hits": "5803"
},
{
"id": "declaration/36/statement/10/body/statement/10/body/statement/1/value/decision/true",
"outcome": "true",
"line": 1010,
"state": "covered",
"hits": "46"
},
{
"id": "declaration/36/statement/10/body/statement/10/body/statement/1/value/decision/false",
"outcome": "false",
"line": 1010,
"state": "covered",
"hits": "6978"
},
{
"id": "declaration/36/statement/10/body/statement/14/value/decision/true",
"outcome": "true",
"line": 1018,
"state": "covered",
"hits": "58"
},
{
"id": "declaration/36/statement/10/body/statement/14/value/decision/false",
"outcome": "false",
"line": 1018,
"state": "covered",
"hits": "5745"
},
{
"id": "declaration/36/statement/11/value/decision/true",
"outcome": "true",
"line": 1024,
"state": "covered",
"hits": "29"
},
{
"id": "declaration/36/statement/11/value/decision/false",
"outcome": "false",
"line": 1024,
"state": "covered",
"hits": "1542"
},
{
"id": "declaration/38/tail/arm/0",
"outcome": "LocatedExpr",
"line": 1054,
"state": "covered",
"hits": "144969"
},
{
"id": "declaration/38/tail/arm/0/body/block/statement/0/value/args/5/decision/true",
"outcome": "true",
"line": 1061,
"state": "covered",
"hits": "4711"
},
{
"id": "declaration/38/tail/arm/0/body/block/statement/0/value/args/5/decision/false",
"outcome": "false",
"line": 1061,
"state": "covered",
"hits": "140258"
},
{
"id": "declaration/38/tail/arm/0/body/block/tail/args/3/decision/true",
"outcome": "true",
"line": 1067,
"state": "covered",
"hits": "4711"
},
{
"id": "declaration/38/tail/arm/0/body/block/tail/args/3/decision/false",
"outcome": "false",
"line": 1067,
"state": "covered",
"hits": "140258"
},
{
"id": "declaration/38/tail/arm/1",
"outcome": "NatExpr",
"line": 1075,
"state": "covered",
"hits": "12893"
},
{
"id": "declaration/38/tail/arm/1/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 1076,
"state": "covered",
"hits": "775"
},
{
"id": "declaration/38/tail/arm/1/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 1076,
"state": "covered",
"hits": "12118"
},
{
"id": "declaration/38/tail/arm/2",
"outcome": "DecimalExpr",
"line": 1082,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/38/tail/arm/2/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 1083,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/38/tail/arm/2/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 1083,
"state": "covered",
"hits": "18"
},
{
"id": "declaration/38/tail/arm/3",
"outcome": "StringExpr",
"line": 1089,
"state": "covered",
"hits": "7842"
},
{
"id": "declaration/38/tail/arm/4",
"outcome": "BoolExpr",
"line": 1096,
"state": "covered",
"hits": "1796"
},
{
"id": "declaration/38/tail/arm/4/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 1097,
"state": "covered",
"hits": "47"
},
{
"id": "declaration/38/tail/arm/4/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 1097,
"state": "covered",
"hits": "1749"
},
{
"id": "declaration/38/tail/arm/5",
"outcome": "NameExpr",
"line": 1103,
"state": "covered",
"hits": "49415"
},
{
"id": "declaration/38/tail/arm/5/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 1104,
"state": "covered",
"hits": "1630"
},
{
"id": "declaration/38/tail/arm/5/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 1104,
"state": "covered",
"hits": "47785"
},
{
"id": "declaration/38/tail/arm/6",
"outcome": "AnonymousExpr",
"line": 1111,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/38/tail/arm/7",
"outcome": "FunctionExpr",
"line": 1112,
"state": "covered",
"hits": "347"
},
{
"id": "declaration/38/tail/arm/7/body/block/statement/0/value/decision/true",
"outcome": "true",
"line": 1113,
"state": "covered",
"hits": "20"
},
{
"id": "declaration/38/tail/arm/7/body/block/statement/0/value/decision/false",
"outcome": "false",
"line": 1113,
"state": "covered",
"hits": "327"
},
{
"id": "declaration/38/tail/arm/7/body/block/statement/1/value/decision/true",
"outcome": "true",
"line": 1116,
"state": "covered",
"hits": "20"
},
{
"id": "declaration/38/tail/arm/7/body/block/statement/1/value/decision/false",
"outcome": "false",
"line": 1116,
"state": "covered",
"hits": "327"
},
{
"id": "declaration/38/tail/arm/8",
"outcome": "ArrayExpr",
"line": 1121,
"state": "covered",
"hits": "2313"
},
{
"id": "declaration/38/tail/arm/8/body/block/statement/3/value/decision/true",
"outcome": "true",
"line": 1131,
"state": "covered",
"hits": "60"
},
{
"id": "declaration/38/tail/arm/8/body/block/statement/3/value/decision/false",
"outcome": "false",
"line": 1131,
"state": "covered",
"hits": "2253"
},
{
"id": "declaration/38/tail/arm/9",
"outcome": "UnaryExpr",
"line": 1137,
"state": "covered",
"hits": "734"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/decision/true",
"outcome": "true",
"line": 1148,
"state": "covered",
"hits": "101"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/decision/false",
"outcome": "false",
"line": 1148,
"state": "covered",
"hits": "633"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/true/statement/1/decision/body",
"outcome": "body",
"line": 1151,
"state": "covered",
"hits": "232"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/true/statement/1/decision/exit",
"outcome": "exit",
"line": 1151,
"state": "covered",
"hits": "101"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/true/statement/1/body/statement/0/value/decision/true",
"outcome": "true",
"line": 1152,
"state": "covered",
"hits": "101"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/true/statement/1/body/statement/0/value/decision/false",
"outcome": "false",
"line": 1152,
"state": "covered",
"hits": "131"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/true/statement/1/body/statement/0/value/true/tail/decision/true",
"outcome": "true",
"line": 1154,
"state": "covered",
"hits": "13"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/true/statement/1/body/statement/0/value/true/tail/decision/false",
"outcome": "false",
"line": 1154,
"state": "covered",
"hits": "88"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/false/statement/0/value/decision/true",
"outcome": "true",
"line": 1161,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/38/tail/arm/9/body/block/statement/4/value/false/statement/0/value/decision/false",
"outcome": "false",
"line": 1161,
"state": "covered",
"hits": "612"
},
{
"id": "declaration/38/tail/arm/10",
"outcome": "BinaryExpr",
"line": 1173,
"state": "covered",
"hits": "20562"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/decision/true",
"outcome": "true",
"line": 1174,
"state": "covered",
"hits": "4842"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/decision/false",
"outcome": "false",
"line": 1174,
"state": "covered",
"hits": "15720"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1174,
"state": "covered",
"hits": "18508"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 1174,
"state": "covered",
"hits": "2054"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/false/statement/6/value/decision/true",
"outcome": "true",
"line": 1204,
"state": "covered",
"hits": "314"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/false/statement/6/value/decision/false",
"outcome": "false",
"line": 1204,
"state": "covered",
"hits": "15406"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/false/statement/6/value/true/statement/0/value/decision/true",
"outcome": "true",
"line": 1205,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/false/statement/6/value/true/statement/0/value/decision/false",
"outcome": "false",
"line": 1205,
"state": "covered",
"hits": "293"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/false/statement/6/value/false/statement/0/value/decision/true",
"outcome": "true",
"line": 1210,
"state": "covered",
"hits": "740"
},
{
"id": "declaration/38/tail/arm/10/body/block/tail/false/statement/6/value/false/statement/0/value/decision/false",
"outcome": "false",
"line": 1210,
"state": "covered",
"hits": "14666"
},
{
"id": "declaration/38/tail/arm/11",
"outcome": "OwnedCallExpr",
"line": 1219,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/38/tail/arm/12",
"outcome": "DotCallExpr",
"line": 1225,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/38/tail/arm/13",
"outcome": "CallExpr",
"line": 1231,
"state": "covered",
"hits": "28371"
},
{
"id": "declaration/38/tail/arm/14",
"outcome": "FieldExpr",
"line": 1240,
"state": "covered",
"hits": "9232"
},
{
"id": "declaration/38/tail/arm/14/body/block/statement/3/value/decision/true",
"outcome": "true",
"line": 1250,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/38/tail/arm/14/body/block/statement/3/value/decision/false",
"outcome": "false",
"line": 1250,
"state": "covered",
"hits": "9227"
},
{
"id": "declaration/38/tail/arm/15",
"outcome": "IndexExpr",
"line": 1256,
"state": "covered",
"hits": "2091"
},
{
"id": "declaration/38/tail/arm/15/body/block/statement/5/value/decision/true",
"outcome": "true",
"line": 1274,
"state": "covered",
"hits": "101"
},
{
"id": "declaration/38/tail/arm/15/body/block/statement/5/value/decision/false",
"outcome": "false",
"line": 1274,
"state": "covered",
"hits": "1990"
},
{
"id": "declaration/38/tail/arm/16",
"outcome": "IfExpr",
"line": 1280,
"state": "covered",
"hits": "4952"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/decision/true",
"outcome": "true",
"line": 1296,
"state": "covered",
"hits": "3718"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/decision/false",
"outcome": "false",
"line": 1296,
"state": "covered",
"hits": "1234"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/true/statement/7/value/decision/true",
"outcome": "true",
"line": 1310,
"state": "covered",
"hits": "130"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/true/statement/7/value/decision/false",
"outcome": "false",
"line": 1310,
"state": "covered",
"hits": "3588"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/true/statement/12/value/decision/true",
"outcome": "true",
"line": 1317,
"state": "covered",
"hits": "130"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/true/statement/12/value/decision/false",
"outcome": "false",
"line": 1317,
"state": "covered",
"hits": "3588"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/false/statement/4/value/decision/true",
"outcome": "true",
"line": 1331,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/false/statement/4/value/decision/false",
"outcome": "false",
"line": 1331,
"state": "covered",
"hits": "1213"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/false/statement/9/value/decision/true",
"outcome": "true",
"line": 1338,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/false/statement/9/value/decision/false",
"outcome": "false",
"line": 1338,
"state": "covered",
"hits": "1213"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/false/statement/11/value/decision/true",
"outcome": "true",
"line": 1342,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/38/tail/arm/16/body/block/tail/false/statement/11/value/decision/false",
"outcome": "false",
"line": 1342,
"state": "covered",
"hits": "1213"
},
{
"id": "declaration/38/tail/arm/17",
"outcome": "BlockExpr",
"line": 1350,
"state": "covered",
"hits": "3025"
},
{
"id": "declaration/38/tail/arm/18",
"outcome": "MatchExpr",
"line": 1351,
"state": "covered",
"hits": "1571"
},
{
"id": "declaration/39/tail/arm/0",
"outcome": "ConstInstruction",
"line": 1367,
"state": "covered",
"hits": "69662"
},
{
"id": "declaration/39/tail/arm/1",
"outcome": "LoadInstruction",
"line": 1368,
"state": "covered",
"hits": "116198"
},
{
"id": "declaration/39/tail/arm/2",
"outcome": "StoreInstruction",
"line": 1369,
"state": "covered",
"hits": "51116"
},
{
"id": "declaration/39/tail/arm/3",
"outcome": "PopInstruction",
"line": 1370,
"state": "covered",
"hits": "11283"
},
{
"id": "declaration/39/tail/arm/4",
"outcome": "UnaryInstruction",
"line": 1371,
"state": "covered",
"hits": "1296"
},
{
"id": "declaration/39/tail/arm/5",
"outcome": "BinaryInstruction",
"line": 1372,
"state": "covered",
"hits": "23987"
},
{
"id": "declaration/39/tail/arm/6",
"outcome": "MakeRangeInstruction",
"line": 1373,
"state": "covered",
"hits": "292"
},
{
"id": "declaration/39/tail/arm/7",
"outcome": "MakeArrayInstruction",
"line": 1374,
"state": "covered",
"hits": "5654"
},
{
"id": "declaration/39/tail/arm/8",
"outcome": "IndexGetInstruction",
"line": 1375,
"state": "covered",
"hits": "3350"
},
{
"id": "declaration/39/tail/arm/9",
"outcome": "InterpolateInstruction",
"line": 1376,
"state": "covered",
"hits": "1120"
},
{
"id": "declaration/39/tail/arm/10",
"outcome": "IterInitInstruction",
"line": 1377,
"state": "covered",
"hits": "2620"
},
{
"id": "declaration/39/tail/arm/11",
"outcome": "IterNextInstruction",
"line": 1378,
"state": "covered",
"hits": "2620"
},
{
"id": "declaration/39/tail/arm/12",
"outcome": "MakeRecordInstruction",
"line": 1379,
"state": "covered",
"hits": "5755"
},
{
"id": "declaration/39/tail/arm/13",
"outcome": "FieldGetInstruction",
"line": 1380,
"state": "covered",
"hits": "27369"
},
{
"id": "declaration/39/tail/arm/14",
"outcome": "MakeVariantInstruction",
"line": 1381,
"state": "covered",
"hits": "10999"
},
{
"id": "declaration/39/tail/arm/15",
"outcome": "MatchVariantInstruction",
"line": 1382,
"state": "covered",
"hits": "15599"
},
{
"id": "declaration/39/tail/arm/16",
"outcome": "MatchFailInstruction",
"line": 1383,
"state": "covered",
"hits": "3854"
},
{
"id": "declaration/39/tail/arm/17",
"outcome": "CallInstruction",
"line": 1384,
"state": "covered",
"hits": "39504"
},
{
"id": "declaration/39/tail/arm/18",
"outcome": "CallValueInstruction",
"line": 1385,
"state": "covered",
"hits": "492"
},
{
"id": "declaration/39/tail/arm/19",
"outcome": "AwaitCallInstruction",
"line": 1386,
"state": "covered",
"hits": "120"
},
{
"id": "declaration/39/tail/arm/20",
"outcome": "AwaitValueInstruction",
"line": 1387,
"state": "covered",
"hits": "12"
},
{
"id": "declaration/39/tail/arm/21",
"outcome": "JumpFalseInstruction",
"line": 1388,
"state": "covered",
"hits": "20098"
},
{
"id": "declaration/39/tail/arm/22",
"outcome": "JumpInstruction",
"line": 1389,
"state": "covered",
"hits": "35239"
},
{
"id": "declaration/39/tail/arm/23",
"outcome": "PendingEndJumpInstruction",
"line": 1390,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/39/tail/arm/24",
"outcome": "ReturnInstruction",
"line": 1391,
"state": "covered",
"hits": "6982"
},
{
"id": "declaration/40/statement/2/decision/body",
"outcome": "body",
"line": 1399,
"state": "covered",
"hits": "182"
},
{
"id": "declaration/40/statement/2/decision/exit",
"outcome": "exit",
"line": 1399,
"state": "covered",
"hits": "159"
},
{
"id": "declaration/40/statement/2/body/statement/1/decision/body",
"outcome": "body",
"line": 1401,
"state": "covered",
"hits": "9287"
},
{
"id": "declaration/40/statement/2/body/statement/1/decision/exit",
"outcome": "exit",
"line": 1401,
"state": "covered",
"hits": "182"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/decision/true",
"outcome": "true",
"line": 1402,
"state": "covered",
"hits": "5706"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/decision/false",
"outcome": "false",
"line": 1402,
"state": "covered",
"hits": "3581"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1402,
"state": "covered",
"hits": "3780"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 1402,
"state": "covered",
"hits": "5507"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/true/statement/0/decision/body",
"outcome": "body",
"line": 1403,
"state": "covered",
"hits": "424222"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/true/statement/0/decision/exit",
"outcome": "exit",
"line": 1403,
"state": "covered",
"hits": "5706"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/true/statement/0/body/tail/decision/true",
"outcome": "true",
"line": 1405,
"state": "covered",
"hits": "191"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/true/statement/0/body/tail/decision/false",
"outcome": "false",
"line": 1405,
"state": "covered",
"hits": "424031"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/true/statement/0/body/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1405,
"state": "covered",
"hits": "1027"
},
{
"id": "declaration/40/statement/2/body/statement/1/body/tail/true/statement/0/body/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 1405,
"state": "covered",
"hits": "423195"
},
{
"id": "declaration/45/statement/3/decision/body",
"outcome": "body",
"line": 1437,
"state": "covered",
"hits": "6895"
},
{
"id": "declaration/45/statement/3/decision/exit",
"outcome": "exit",
"line": 1437,
"state": "covered",
"hits": "159"
},
{
"id": "declaration/45/statement/3/body/tail/arm/0",
"outcome": "FunctionDeclaration",
"line": 1439,
"state": "covered",
"hits": "5644"
},
{
"id": "declaration/45/statement/3/body/tail/arm/0/body/block/statement/2/value/decision/true",
"outcome": "true",
"line": 1442,
"state": "covered",
"hits": "313"
},
{
"id": "declaration/45/statement/3/body/tail/arm/0/body/block/statement/2/value/decision/false",
"outcome": "false",
"line": 1442,
"state": "covered",
"hits": "5331"
},
{
"id": "declaration/45/statement/3/body/tail/arm/1",
"outcome": "ImportDeclaration",
"line": 1450,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/45/statement/3/body/tail/arm/2",
"outcome": "TypeDeclaration",
"line": 1451,
"state": "covered",
"hits": "138"
},
{
"id": "declaration/45/statement/3/body/tail/arm/3",
"outcome": "RecordDeclaration",
"line": 1452,
"state": "covered",
"hits": "449"
},
{
"id": "declaration/45/statement/3/body/tail/arm/4",
"outcome": "EnumDeclaration",
"line": 1453,
"state": "covered",
"hits": "664"
},
{
"id": "declaration/45/statement/6/decision/body",
"outcome": "body",
"line": 1458,
"state": "covered",
"hits": "5644"
},
{
"id": "declaration/45/statement/6/decision/exit",
"outcome": "exit",
"line": 1458,
"state": "covered",
"hits": "159"
},
{
"id": "declaration/45/statement/6/body/tail/decision/true",
"outcome": "true",
"line": 1459,
"state": "covered",
"hits": "3272"
},
{
"id": "declaration/45/statement/6/body/tail/decision/false",
"outcome": "false",
"line": 1459,
"state": "covered",
"hits": "2372"
},
{
"id": "declaration/45/statement/6/body/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1459,
"state": "covered",
"hits": "2511"
},
{
"id": "declaration/45/statement/6/body/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 1459,
"state": "covered",
"hits": "3133"
},
{
"id": "declaration/45/statement/6/body/tail/condition/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1459,
"state": "covered",
"hits": "4732"
},
{
"id": "declaration/45/statement/6/body/tail/condition/left/decision/skip-right",
"outcome": "skip-right",
"line": 1459,
"state": "covered",
"hits": "912"
},
{
"id": "declaration/45/statement/8/decision/body",
"outcome": "body",
"line": 1464,
"state": "covered",
"hits": "313"
},
{
"id": "declaration/45/statement/8/decision/exit",
"outcome": "exit",
"line": 1464,
"state": "covered",
"hits": "159"
},
{
"id": "declaration/45/statement/8/body/tail/decision/true",
"outcome": "true",
"line": 1465,
"state": "covered",
"hits": "43"
},
{
"id": "declaration/45/statement/8/body/tail/decision/false",
"outcome": "false",
"line": 1465,
"state": "covered",
"hits": "270"
},
{
"id": "declaration/45/statement/8/body/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1465,
"state": "covered",
"hits": "270"
},
{
"id": "declaration/45/statement/8/body/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 1465,
"state": "covered",
"hits": "43"
},
{
"id": "declaration/45/statement/10/decision/body",
"outcome": "body",
"line": 1470,
"state": "covered",
"hits": "313"
},
{
"id": "declaration/45/statement/10/decision/exit",
"outcome": "exit",
"line": 1470,
"state": "covered",
"hits": "159"
},
{
"id": "declaration/45/statement/10/body/tail/decision/true",
"outcome": "true",
"line": 1471,
"state": "covered",
"hits": "43"
},
{
"id": "declaration/45/statement/10/body/tail/decision/false",
"outcome": "false",
"line": 1471,
"state": "covered",
"hits": "270"
},
{
"id": "declaration/45/statement/10/body/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 1471,
"state": "covered",
"hits": "270"
},
{
"id": "declaration/45/statement/10/body/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 1471,
"state": "covered",
"hits": "43"
},
{
"id": "declaration/46/tail/arm/0",
"outcome": "Ok",
"line": 1480,
"state": "covered",
"hits": "4"
},
{
"id": "declaration/46/tail/arm/0/body/block/tail/arm/0",
"outcome": "Ok",
"line": 1482,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/46/tail/arm/0/body/block/tail/arm/0/body/block/tail/decision/true",
"outcome": "true",
"line": 1484,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/46/tail/arm/0/body/block/tail/arm/0/body/block/tail/decision/false",
"outcome": "false",
"line": 1484,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/46/tail/arm/0/body/block/tail/arm/1",
"outcome": "Error",
"line": 1490,
"state": "covered",
"hits": "4"
},
{
"id": "declaration/46/tail/arm/1",
"outcome": "Error",
"line": 1493,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/0",
"outcome": "ConstInstruction",
"line": 1499,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/1",
"outcome": "LoadInstruction",
"line": 1500,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/2",
"outcome": "StoreInstruction",
"line": 1501,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/3",
"outcome": "PopInstruction",
"line": 1502,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/4",
"outcome": "UnaryInstruction",
"line": 1503,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/5",
"outcome": "BinaryInstruction",
"line": 1504,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/6",
"outcome": "MakeRangeInstruction",
"line": 1505,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/7",
"outcome": "MakeArrayInstruction",
"line": 1506,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/8",
"outcome": "IndexGetInstruction",
"line": 1507,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/9",
"outcome": "InterpolateInstruction",
"line": 1508,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/10",
"outcome": "IterInitInstruction",
"line": 1509,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/11",
"outcome": "IterNextInstruction",
"line": 1510,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/12",
"outcome": "MakeRecordInstruction",
"line": 1511,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/13",
"outcome": "FieldGetInstruction",
"line": 1512,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/14",
"outcome": "MakeVariantInstruction",
"line": 1513,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/15",
"outcome": "MatchVariantInstruction",
"line": 1514,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/16",
"outcome": "MatchFailInstruction",
"line": 1515,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/17",
"outcome": "CallInstruction",
"line": 1516,
"state": "covered",
"hits": "91"
},
{
"id": "declaration/47/tail/arm/18",
"outcome": "CallValueInstruction",
"line": 1517,
"state": "covered",
"hits": "10"
},
{
"id": "declaration/47/tail/arm/19",
"outcome": "AwaitCallInstruction",
"line": 1518,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/20",
"outcome": "AwaitValueInstruction",
"line": 1519,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/21",
"outcome": "JumpFalseInstruction",
"line": 1520,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/22",
"outcome": "JumpInstruction",
"line": 1521,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/23",
"outcome": "PendingEndJumpInstruction",
"line": 1522,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/47/tail/arm/24",
"outcome": "ReturnInstruction",
"line": 1523,
"state": "zero",
"hits": "0"
}
]Reviewed declaration exclusions
[
{
"id": "declaration/0",
"reason": "import",
"line": 1
},
{
"id": "declaration/1",
"reason": "import",
"line": 2
},
{
"id": "declaration/2",
"reason": "import",
"line": 3
},
{
"id": "declaration/3",
"reason": "import",
"line": 4
},
{
"id": "declaration/4",
"reason": "import",
"line": 18
},
{
"id": "declaration/5",
"reason": "import",
"line": 19
},
{
"id": "declaration/6",
"reason": "import",
"line": 20
},
{
"id": "declaration/7",
"reason": "import",
"line": 21
},
{
"id": "declaration/8",
"reason": "enum-declaration",
"line": 26
},
{
"id": "declaration/9",
"reason": "enum-declaration",
"line": 36
},
{
"id": "declaration/10",
"reason": "record-declaration",
"line": 64
},
{
"id": "declaration/11",
"reason": "record-declaration",
"line": 72
},
{
"id": "declaration/12",
"reason": "record-declaration",
"line": 76
},
{
"id": "declaration/13",
"reason": "record-declaration",
"line": 86
},
{
"id": "declaration/14",
"reason": "record-declaration",
"line": 93
},
{
"id": "declaration/16",
"reason": "record-declaration",
"line": 116
},
{
"id": "declaration/17",
"reason": "record-declaration",
"line": 123
},
{
"id": "declaration/18",
"reason": "record-declaration",
"line": 128
}
]