.githooks/ compiler/ kernel/ lib/ scripts/ seed/ sublime/ test/ boot/ bootstrap/ compiler/ cycles/ dispatch/ format/ host/ integration/ kernel/ loader/ manifests/ mmio/ native/ packages/ runtime/ scheduling/ shared/ slots/ smp/ std/ sync/ termination/ tests/ asm.link/ asm.rodata.prefix/ assign.qualified.static/ entry.storage.start/ fn.unsafe.callbacks/ method.module/ optional.union.const.match/ record.opaque/ ref.qualified.static/ return.never/ stack.limit.ok/ stack.limit.trap/ start.default/ start.exit/ wildcard.import.owner/ abi.sizes.rad 3.5 KiB addfn.rad 52 B addfn.ril 76 B address.literal.aggregate.rad 6.2 KiB address.literal.escape.reject.rad 1.4 KiB address.literal.local.mutable.reject.rad 293 B address.literal.local.reject.rad 336 B address.literal.mutable.rad 1.3 KiB address.literal.shared.rad 734 B address.literal.shared.ril 1.0 KiB address.value.escape.reject.rad 2.5 KiB address.value.linear.field.reject.rad 297 B address.value.linear.mutable.reject.rad 262 B address.value.linear.reject.rad 303 B address.value.local.mutable.reject.rad 361 B address.value.local.reject.rad 322 B address.value.rad 6.7 KiB address.value.temporary.rad 1.2 KiB address.value.temporary.ril 1.6 KiB aggregate.return.rad 4.1 KiB alloc.arena.trait.rad 2.7 KiB alloc.new.arena.rad 1.8 KiB alloc.new.rad 1.0 KiB arena.static.rad 1.1 KiB arith.assignment.rad 631 B arith.basic.rad 189 B arith.modulo.rad 109 B arith.subword.rad 3.9 KiB arith.subword.ril 4.3 KiB arith.sum.rad 192 B arith.w64.rad 4.1 KiB arith.w64.ril 5.2 KiB array.aggregate.stride.rad 773 B array.aggregate.stride.ril 697 B array.assign.rad 225 B array.assign.ril 570 B array.bound.signature.rad 695 B array.bounds.check.rad 321 B array.fn.assign.rad 265 B array.index.assign.rad 422 B array.index.rad 278 B array.index.ril 520 B array.len.const.rad 348 B array.len.const.ril 333 B array.length.rad 281 B array.literal.rad 136 B array.literal.ril 376 B array.math.rad 1.2 KiB array.nested.assign.rad 320 B array.nested.rad 318 B array.nested.ril 995 B array.pointer.rad 2.5 KiB array.record.elements.rad 1.7 KiB array.repeat.edge.rad 548 B array.repeat.element.type.rad 1.2 KiB array.repeat.loop.lower.rad 1.5 KiB array.repeat.loop.lower.ril 2.1 KiB array.repeat.loop.rad 52.3 KiB array.repeat.rad 831 B array.repeat.ril 2.4 KiB array.repeat.word.aggregate.lower.rad 2.0 KiB array.repeat.word.aggregate.lower.ril 3.7 KiB array.repeat.word.aggregate.rad 4.6 KiB array.repeat.word.lower.rad 2.3 KiB array.repeat.word.lower.ril 4.8 KiB array.repeat.word.rad 53.8 KiB array.return.rad 344 B array.slice.empty.rad 127 B array.slice.full.rad 124 B array.slice.full.ril 253 B array.slice.gen.end.rad 156 B array.slice.gen.index.rad 167 B array.slice.gen.open.rad 154 B array.slice.gen.start.end.rad 158 B array.slice.gen.start.rad 156 B array.slice.openend.rad 149 B array.slice.openend.ril 436 B array.slice.openstart.rad 149 B array.slice.openstart.ril 373 B array.slice.rad 816 B as.precedence.rad 224 B asm.arithmetic.spacing.ras 537 B asm.atomic.reserve.ras 1.1 KiB asm.basic.text.program.ras 191 B asm.bleu.ras 251 B asm.branch.comparisons.ras 652 B asm.call.return.flow.ras 205 B asm.compare.set.logic.ras 613 B asm.csr.system.instructions.ras 223 B asm.data.directives.ras 441 B asm.data.symbol.fixup.ras 229 B asm.directive.boundary.values.ras 813 B asm.divrem.edges.ras 2.5 KiB asm.fence.ras 78 B asm.global.scoped.symbols.ras 211 B asm.instruction.matrix.alu.ras 568 B asm.instruction.matrix.mem.control.ras 357 B asm.instruction.matrix.system.ras 117 B asm.label.fixups.ras 237 B asm.li.expressions.ras 214 B asm.li.wide.ras 578 B asm.load.store.widths.ras 713 B asm.mul.div.rem.ras 773 B asm.mulh.ras 2.3 KiB asm.scoped.symbols.la.ras 152 B asm.scoped.symbols.tail.ras 161 B asm.section.switching.ras 177 B asm.space.constant.expressions.ras 360 B asm.string.directive.lists.ras 328 B asm.vector.integer.ras 633 B asm.word.dword.constants.ras 375 B asm.word.shift.ops.ras 872 B assert.basic.rad 398 B assert.basic.ril 623 B assert.fail.rad 138 B assert.false.rad 140 B assert.message.rad 123 B assert.message.ril 141 B assert.true.rad 115 B assign.loop.rad 213 B assign.loop.ril 242 B assign.multi.var.rad 194 B assign.multi.var.ril 73 B assign.mutable.rad 6.2 KiB assign.param.rad 150 B assign.param.ril 96 B assign.rad 156 B assign.self.ref.rad 161 B assign.self.ref.ril 92 B assign.sequential.rad 163 B assign.sequential.ril 52 B assign.shadow.mutable.rad 489 B assign.use.intermediate.rad 191 B assign.use.intermediate.ril 99 B average.rad 189 B average.ril 447 B binding.storage.rad 962 B binop.arith.rad 479 B binop.arith.ril 389 B binop.bitwise.rad 1.2 KiB binop.bitwise.ril 1.2 KiB binop.cmp.rad 425 B binop.logical.rad 216 B binop.logical.ril 373 B binop.shift.rad 197 B binop.shift.ril 149 B binop.unsigned.rad 317 B binop.unsigned.ril 236 B bitmanip.rad 4.5 KiB bool.comparison.array.rad 691 B bool.comparison.nested.gen.rad 1.0 KiB bool.comparison.opt.rad 865 B bool.comparison.record.gen.rad 1.0 KiB bool.comparison.record.rad 1.1 KiB bool.comparison.slice.gen.rad 157 B bool.comparison.slice.rad 4.4 KiB bool.comparison.slice.record.gen.rad 2.0 KiB bool.comparison.slice.union.gen.rad 2.6 KiB bool.comparison.union.ctor.rad 711 B bool.comparison.union.gen.rad 1.2 KiB bool.comparison.union.record.gen.rad 1.5 KiB bool.comparison.union.simple.gen.rad 302 B bool.operators.complex.rad 368 B bool.operators.rad 824 B bool.short.circuit.rad 2.4 KiB bool.simple.rad 202 B bool.values.rad 787 B borrow.fields.calls.rad 1.3 KiB borrow.fields.calls.ril 1.1 KiB borrow.fields.pattern.rad 594 B borrow.fields.pattern.ril 362 B borrow.index.disjoint.rad 2.9 KiB borrow.index.overlap.reject.rad 611 B builtin.alignof.rad 698 B builtin.alignof.ril 287 B builtin.memory.fence.rad 108 B builtin.size.align.rad 1.2 KiB builtin.sizeof.rad 656 B builtin.sizeof.ril 282 B builtin.sliceof.invalid.cap.rad 271 B builtin.sliceof.limit.rad 479 B builtin.sliceof.mut.rad 672 B builtin.sliceof.rad 542 B byte.load.store.rad 380 B byte.load.store.ril 687 B call.aggregate.arg.snapshot.rad 520 B call.arg.clobber.rad 732 B call.basic.rad 256 B call.clobber.rad 509 B call.stack.args.aggregate.rad 603 B call.stack.args.fnptr.rad 1.4 KiB call.stack.args.method.rad 1.4 KiB call.stack.args.mixed.rad 1.6 KiB call.stack.args.recursive.rad 1.0 KiB call.stack.args.spill.rad 1.9 KiB call.stack.args.survive.rad 2.9 KiB call.stack.args.throws.rad 861 B call.tests.rad 764 B call.tests.ril 605 B cast.basic.rad 855 B cast.basic.ril 681 B cast.narrow.rad 583 B cast.narrow.ril 557 B cast.same.size.rad 1.0 KiB cast.same.size.ril 1.1 KiB casting.numbers.rad 1.5 KiB char.literal.rad 180 B cmp.extension.rad 3.1 KiB cmp.narrow.live.rad 1.5 KiB cmp.narrow.live.ril 2.2 KiB cmp.rel.rad 733 B cmp.rel.ril 467 B cmp.unsigned.rad 733 B cmp.unsigned.ril 467 B coercion.implicit.rad 941 B coercion.implicit.ril 1.0 KiB compare.literal.first.u64.rad 301 B compound.assign.field.rad 318 B compound.assign.index.once.rad 431 B compound.assign.rad 1.2 KiB compound.assign.ril 2.0 KiB cond.assign.merge.basic.rad 221 B cond.assign.merge.basic.ril 172 B cond.assign.merge.rad 214 B cond.assign.merge.ril 169 B cond.assign.rad 766 B cond.elseif.rad 204 B cond.elseif.ril 181 B cond.expr.aggregate.rad 1.2 KiB cond.expr.literal-first.rad 326 B cond.expr.rad 1.9 KiB cond.expr.ril 3.5 KiB cond.for.else.break.rad 343 B cond.for.indexed.rad 255 B cond.for.rad 180 B cond.for.range.indexed.rad 549 B cond.for.range.rad 190 B cond.for.unsigned.range.rad 677 B cond.forever.break.continue.rad 197 B cond.forever.break.rad 251 B cond.fused.rad 939 B cond.if.case.rad 2.2 KiB cond.if.else.min.rad 152 B cond.if.else.rad 233 B cond.if.elseif.rad 418 B cond.if.noelse.rad 134 B cond.if.rad 840 B cond.ifelse.rad 104 B cond.ifelse.ril 117 B cond.iflet.case.rad 170 B cond.iflet.case.ril 114 B cond.iflet.guard.rad 182 B cond.iflet.guard.ril 165 B cond.iflet.mut.rad 195 B cond.iflet.mut.ril 223 B cond.iflet.noelse.rad 156 B cond.iflet.noelse.ril 231 B cond.iflet.optional.rad 184 B cond.iflet.optional.ril 197 B cond.iflet.optional.value.rad 194 B cond.iflet.optional.value.ril 212 B cond.letelse.case.rad 158 B cond.letelse.case.ril 149 B cond.letelse.guard.rad 172 B cond.letelse.guard.ril 200 B cond.letelse.mut.rad 185 B cond.letelse.mut.ril 258 B cond.letelse.optional.rad 172 B cond.letelse.optional.ril 232 B cond.match.fallthrough.rad 418 B cond.match.guard.rad 1.4 KiB cond.match.guard.regalloc.rad 1.4 KiB cond.nested.rad 138 B cond.nested.ril 185 B cond.optional.annotation.rad 867 B cond.shortcircuit.eval.rad 1006 B cond.shortcircuit.rad 418 B cond.shortcircuit.ril 484 B cond.simple.rad 86 B cond.simple.ril 118 B cond.while.else.break.rad 299 B cond.while.rad 134 B const-cast-wrap.rad 442 B const-expr-array-size.rad 391 B const-expr-cast.rad 1.1 KiB const-expr-literal.rad 673 B const-expr-refs.rad 872 B const.array.copy.mutate.rad 397 B const.array.ident.rad 247 B const.array.ident.ril 208 B const.array.rad 213 B const.array.record.ident.rad 396 B const.array.record.ident.ril 293 B const.array.repeat.record.rad 225 B const.array.repeat.record.ril 211 B const.array.repeat.string.slice.rad 303 B const.array.repeat.string.slice.ril 1.1 KiB const.array.ril 437 B const.array.strings.slice.rad 274 B const.array.strings.slice.ril 781 B const.basic.rad 341 B const.char.rad 174 B const.fn.array.rad 670 B const.i32.shift.right.rad 244 B const.local.duplicate.rad 474 B const.local.duplicate.ril 866 B const.negative.rad 331 B const.negative.ril 380 B const.record.array.rad 1.2 KiB const.record.array.simple.rad 554 B const.record.ctor.rad 194 B const.record.ctor.ril 448 B const.record.fn.rad 362 B const.record.mutcopy.rad 1.0 KiB const.record.mutcopy.ril 1.4 KiB const.record.nested.rad 408 B const.record.nested.ril 312 B const.record.packed.rad 275 B const.record.packed.ril 204 B const.record.padded.rad 275 B const.record.padded.ril 237 B const.record.rad 204 B const.record.ril 164 B const.record.union.rad 612 B const.record.union.ril 883 B const.scalar.rad 105 B const.scalar.ril 116 B const.shift.negative.count.rad 305 B const.slice.of.slices.rad 238 B const.slice.of.slices.ril 1.2 KiB const.slice.param.rad 339 B const.string.rad 114 B const.string.ril 401 B const.string.scoped.names.rad 263 B const.string.scoped.names.ril 1.0 KiB const.u32.shift.mask.rad 249 B const.u64.compare.rad 188 B const.u64.divide.rad 174 B const.union.nested.mixed.rad 889 B const.union.payload.ctor.rad 376 B const.union.payload.ctor.ril 504 B const.union.payload.fn.array.rad 1.1 KiB const.union.payload.record.array.rad 1.5 KiB const.union.record.literal.rad 383 B const.union.record.literal.ril 550 B constant.mutable.pointer.reject.rad 416 B constant.projections.rad 1.8 KiB data.array.rad 803 B data.bool.rad 237 B data.i16.rad 288 B data.i32.rad 308 B data.i8.rad 275 B data.optional.nil.rad 935 B data.optional.value.rad 2.5 KiB data.record.rad 597 B data.simple.rad 492 B data.u16.rad 244 B data.u32.rad 264 B data.u8.rad 232 B data.union.rad 1.0 KiB debug.tag.rad 563 B definit.aggregates.rad 1.9 KiB definit.branches.rad 3.5 KiB definit.loops.rad 1.9 KiB div.u8.immediate.wrap.rad 213 B ecall.i64.rad 535 B edge.cases.2.rad 361 B edge.cases.3.rad 606 B edge.cases.4.rad 1.3 KiB edge.cases.5.rad 1.1 KiB edge.cases.6.rad 3.0 KiB edge.cases.7.addr.bug.rad 246 B edge.cases.8.bug.rad 553 B edge.cases.rad 246 B entry.storage.call.rad 635 B entry.storage.dict.rad 1.6 KiB entry.storage.noenv.rad 1.6 KiB entry.storage.rad 2.3 KiB entry.storage.record.rad 5.5 KiB entry.storage.reject.rad 4.9 KiB entry.storage.slices.index.rad 346 B entry.storage.slices.lower.rad 616 B entry.storage.slices.lower.ril 904 B entry.storage.slices.rad 4.7 KiB entry.storage.slices.range.rad 441 B entry.storage.small.rad 446 B entry.storage.small.record.rad 432 B entry.storage.small.record.ril 367 B entry.storage.small.ril 641 B entry.storage.split.rad 2.5 KiB error.basic.rad 185 B error.catch.discard.pointer.rad 1.0 KiB error.catch.rad 1.6 KiB error.catch.return.rad 414 B error.catch.return.ril 511 B error.division.zero.rad 164 B error.match.discard.rad 533 B error.modulo.zero.rad 162 B error.multi.basic.rad 721 B error.multi.catch.rad 870 B error.multi.catch.typed.binding.rad 840 B error.multi.catch.typed.catchall.rad 1.1 KiB error.multi.catch.typed.rad 1.1 KiB error.multi.mixed.union.rad 3.0 KiB error.multi.propagate.multi.rad 1010 B error.multi.propagate.rad 874 B error.multi.try.optional.rad 544 B error.slice.bounds.rad 233 B error.throw.coercion.rad 318 B error.try.bang.success.rad 381 B error.try.catch.binding.rad 2.0 KiB error.try.optional.rad 1.9 KiB error.try.rad 4.1 KiB extern.inferred.rad 70 B externfn.rad 32 B externfn.ril 37 B fibonacci.rad 120 B fibonacci.ril 247 B field.aggregate.rad 842 B field.aggregate.ril 934 B fn.block.scope.rad 508 B fn.callback.nested.rad 1.6 KiB fn.default.rad 144 B fn.local.rad 153 B fn.ptr.assign.rad 277 B fn.ptr.assign.ril 180 B fn.ptr.call.rad 258 B fn.ptr.call.ril 217 B fn.ptr.param.rad 356 B fn.ptr.param.ril 319 B fn.recursion.2.rad 237 B fn.void.rad 163 B for.else.continue.rad 1.1 KiB for.record.inner.loop.rad 713 B frame.large.rad 614 B generic.function.growth.reject.rad 284 B generic.function.rad 1.5 KiB generic.layout.overflow.reject.rad 211 B generic.layout.rad 875 B heap.allocator.slots.reject.rad 630 B heap.constant.rad 1.2 KiB heap.forge.handle.reject.rad 440 B heap.forge.local.reject.rad 499 B heap.forge.param.reject.rad 316 B heap.forge.static.reject.rad 351 B heap.rewind.static.rad 328 B heap.static.rad 2.8 KiB if-let-mut.rad 1.2 KiB iflet.shadow.else.rad 408 B iflet.shadow.leak.rad 316 B index.eval.order.rad 395 B index.u8.rad 616 B infer.empty.array.reject.rad 197 B infer.nested.integer.reject.rad 366 B int.default.i64.rad 1.1 KiB integer.bitwise.basic.rad 738 B integer.overflow.rad 1.8 KiB intrinsic.bits.rad 239 B intrinsic.bytes.load16.end.rad 406 B intrinsic.bytes.load16.overflow.rad 415 B intrinsic.bytes.load16.short.rad 406 B intrinsic.bytes.load32.end.rad 406 B intrinsic.bytes.load32.overflow.rad 415 B intrinsic.bytes.load32.short.rad 406 B intrinsic.bytes.load64.end.rad 406 B intrinsic.bytes.load64.overflow.rad 415 B intrinsic.bytes.load64.short.rad 406 B intrinsic.bytes.rad 389 B intrinsic.bytes.store16.end.rad 391 B intrinsic.bytes.store16.overflow.rad 400 B intrinsic.bytes.store16.short.rad 391 B intrinsic.bytes.store32.end.rad 391 B intrinsic.bytes.store32.overflow.rad 400 B intrinsic.bytes.store32.short.rad 391 B intrinsic.bytes.store64.end.rad 391 B intrinsic.bytes.store64.overflow.rad 400 B intrinsic.bytes.store64.short.rad 391 B intrinsic.ebreak.rad 90 B intrinsic.ebreak.ril 51 B intrinsic.ecall.buffer.rad 1.1 KiB intrinsic.ecall.buffer.ril 730 B intrinsic.ecall.rad 171 B intrinsic.ecall.ril 70 B intrinsic.page.heap.rad 1.6 KiB large.blit.store.rad 2.1 KiB layout.fn.rad 771 B layout.fn.ril 1.1 KiB layout.optional.rad 698 B layout.optional.ril 1.1 KiB layout.recursive.rad 816 B layout.recursive.ril 409 B layout.result.rad 782 B layout.result.ril 1.5 KiB layout.slice.rad 1.0 KiB layout.slice.ril 2.1 KiB layout.union.rad 996 B layout.union.ril 1.1 KiB let.case.ref.binding.rad 2.7 KiB let.copy.semantics.rad 883 B let.copy.semantics.ril 1.0 KiB let.guard.rad 1.9 KiB let.placeholder.rad 291 B let.placeholder.ril 262 B linear.let-else.rad 402 B linear.ownership.rad 395 B linear.ownership.ril 362 B linear.reference.rad 663 B linear.reference.ril 736 B linear.unsafe.rad 531 B linear.unsafe.ril 318 B literal.char.rad 209 B literal.char.ril 127 B literal.slice.bytes.rad 124 B literal.slice.bytes.ril 351 B literal.slice.dedup.rad 199 B literal.slice.dedup.ril 485 B literal.slice.empty.rad 100 B literal.slice.empty.ril 212 B literal.slice.multi.rad 170 B literal.slice.multi.ril 580 B literal.slice.rad 123 B literal.slice.record.rad 217 B literal.slice.record.ril 495 B literal.slice.ril 361 B literal.string.dedup.rad 179 B literal.string.dedup.ril 472 B literal.string.empty.rad 93 B literal.string.empty.ril 336 B literal.string.fns.rad 180 B literal.string.fns.ril 524 B literal.string.multi.rad 153 B literal.string.multi.ril 534 B literal.string.rad 108 B literal.string.ril 335 B literal.w64.rad 1.7 KiB load.u32.high.rad 1.8 KiB loc.addr.offset.bug.rad 453 B loc.addr.opt.to.opt.rad 454 B loc.addr.optional.assign.rad 429 B loc.addr.record.assign.rad 497 B local.multi.rad 85 B local.multi.ril 67 B local.mut.rad 79 B local.mut.ril 45 B local.simple.rad 60 B local.simple.ril 45 B loop.break.rad 156 B loop.break.ril 228 B loop.complex.flow.rad 1.0 KiB loop.continue.rad 219 B loop.continue.ril 327 B loop.for.array.rad 223 B loop.for.array.ril 371 B loop.for.break.bound.rad 163 B loop.for.break.bound.ril 264 B loop.for.continue.rad 405 B loop.for.continue.ril 797 B loop.for.indexed.rad 151 B loop.for.indexed.ril 285 B loop.for.placeholder.rad 323 B loop.for.placeholder.ril 502 B loop.for.pointer.rad 1.5 KiB loop.for.rad 122 B loop.for.ril 220 B loop.for.slice.indexed.offset.bounds.rad 275 B loop.for.slice.indexed.other.bounds.rad 345 B loop.for.slice.indexed.rad 209 B loop.for.slice.indexed.ril 446 B loop.for.slice.indexed.runtime.rad 1.2 KiB loop.for.slice.indexed.shadow.bounds.rad 296 B loop.for.slice.indexed.source.shadow.bounds.rad 346 B loop.for.slice.pointer.bound.rad 190 B loop.for.slice.pointer.bound.ril 415 B loop.for.slice.rad 216 B loop.for.slice.ril 431 B loop.for.unsigned.range.rad 321 B loop.for.unsigned.range.ril 481 B loop.infinite.rad 41 B loop.infinite.ril 105 B loop.mutable.rad 377 B loop.mutable.ril 569 B loop.nested.break.rad 392 B loop.nested.break.ril 461 B loop.nested.continue.rad 418 B loop.nested.continue.ril 581 B loop.return.rad 141 B loop.return.ril 206 B loop.sealblock.rad 946 B loop.while.false.noparams.rad 170 B loop.while.false.noparams.ril 171 B loop.while.nested.shortcircuit.rad 872 B loop.while.nested.shortcircuit.ril 429 B loop.while.rad 164 B loop.while.ril 241 B loop.whilelet.case.rad 259 B loop.whilelet.case.ril 204 B loop.whilelet.guard.rad 265 B loop.whilelet.guard.ril 256 B loop.whilelet.optional.rad 212 B loop.whilelet.optional.ril 293 B loop.whilelet.union.rad 387 B loop.whilelet.union.ril 444 B lower.const.record.ident.rad 291 B lower.const.record.ident.ril 635 B lower.private.union.const.rad 259 B lower.private.union.const.ril 528 B lower.record.scalar.record.const.rad 244 B lower.record.scalar.record.const.ril 561 B lower.slice.strings.names.rad 462 B match.alternatives.il.rad 1.1 KiB match.alternatives.il.ril 2.0 KiB match.alternatives.nested.rad 9.2 KiB match.alternatives.subject.rad 10.1 KiB match.array.rad 3.5 KiB match.borrow.scope.rad 797 B match.byref.scalar.rad 5.9 KiB match.catchall.reject.rad 660 B match.char.rad 1.7 KiB match.last.prong.il.rad 1.5 KiB match.last.prong.il.ril 1.6 KiB match.last.prong.rad 4.0 KiB match.many.rad 1.6 KiB match.more.rad 667 B match.more.ril 778 B match.multi.seal.rad 1011 B match.multi.seal.ril 848 B match.multi.survive.rad 1.6 KiB match.mutref.push.rad 1.1 KiB match.mutref.union.rad 691 B match.nested.call.rad 1.8 KiB match.nested.deep.rad 2.2 KiB match.nested.deref.rad 3.8 KiB match.nested.enum.byref.rad 27.3 KiB match.nested.guard.field.rad 1.0 KiB match.nested.guard.field.safe.rad 1.9 KiB match.nested.guard.rad 1.6 KiB match.nested.iflet.guard.rad 1.6 KiB match.nested.iflet.rad 1.4 KiB match.nested.iflet.ril 2.3 KiB match.nested.letelse.rad 848 B match.nested.letelse.union.rad 1.4 KiB match.nested.literal.rad 3.1 KiB match.nested.multi.rad 2.5 KiB match.nested.pattern.rad 5.3 KiB match.nested.pattern.ril 8.1 KiB match.nested.record.rad 2.1 KiB match.nested.record.ril 3.4 KiB match.nested.scalar.byref.rad 15.3 KiB match.nested.union.rad 2.3 KiB match.nested.union.ril 4.5 KiB match.nested.whilelet.rad 2.4 KiB match.optional.aggregate.rad 230 B match.optional.aggregate.ril 607 B match.optional.rad 190 B match.optional.record.pattern.rad 14.1 KiB match.optional.record.rad 294 B match.optional.record.ril 369 B match.optional.ref.rad 215 B match.optional.ref.ril 328 B match.optional.ril 268 B match.optional.union.variant.rad 303 B match.optional.union.variant.ril 385 B match.optional.wildcard.rad 282 B match.record.pattern.rad 349 B match.record.pattern.ril 302 B match.record.positional.fields.rad 5.1 KiB match.scalar.extension.rad 1.6 KiB match.simple.rad 375 B match.simple.ril 392 B match.string.rad 1.9 KiB match.subject.inplace.eval.rad 1.9 KiB match.subject.inplace.rad 1.6 KiB match.subject.inplace.ril 2.4 KiB match.switch.dense.rad 3.6 KiB match.switch.rad 219 B match.switch.ril 207 B match.union.switch.rad 3.8 KiB match.value.copy.rad 2.0 KiB match.variant.fields.bind.rad 6.3 KiB match.variant.fields.deref.rad 1.6 KiB match.variant.fields.literal.rad 5.0 KiB match.variant.fields.nested.rad 7.0 KiB match.variant.fields.optional.rad 4.6 KiB match.variant.fields.rad 459 B match.variant.fields.ref.rad 3.2 KiB match.variant.fields.reject.rad 372 B match.variant.fields.ril 835 B match.void.then.or.rad 1.6 KiB match.wildcard.literal.rad 3.5 KiB match.wildcard.switch.rad 403 B match.wildcard.switch.ril 297 B match.wildcard.union.rad 1.7 KiB memzero.result.bug.rad 820 B memzero.union.bug.rad 617 B method.basic.rad 590 B method.eight.params.rad 1.4 KiB method.eight.params.throws.rad 2.3 KiB method.multiple.rad 945 B method.ptr.rad 717 B method.pub.rad 247 B method.return.rad 472 B method.scalar.receiver.rad 920 B method.throws.rad 849 B method.union.rad 447 B method.with.trait.rad 706 B mixedtypes.rad 79 B mixedtypes.ril 82 B multi.throw.basic.rad 294 B multi.throw.basic.ril 395 B multi.throw.catch.typed.rad 466 B multi.throw.catch.typed.ril 830 B multi.throw.propagate.rad 357 B multi.throw.propagate.ril 697 B multiplefns.rad 109 B multiplefns.ril 147 B mutable.data.plain.rad 1.7 KiB mutable.data.slice.reject.rad 992 B mutable.static.slice.reject.rad 404 B mutref.call.result.rad 350 B mutref.loop.bug.rad 1.9 KiB mutref.loop.rad 324 B mutref.loop.ril 412 B mutref.scalar.rad 232 B mutref.scalar.ril 366 B nil.cmp.rad 622 B nil.cmp.ril 556 B noparams.rad 38 B noparams.ril 43 B opt.array.hint.rad 951 B opt.assignment.bug.rad 1.3 KiB opt.bug.test.rad 1.4 KiB opt.if.let.complex.rad 6.1 KiB opt.if.let.guard.rad 801 B opt.if.let.rad 948 B opt.nil.check.rad 1.6 KiB opt.ptr.return.nil.rad 85 B opt.ptr.return.nil.ril 104 B opt.record.eq.rad 864 B opt.record.eq.rev.rad 313 B opt.record.eq.rev.ril 593 B opt.record.eq.ril 3.5 KiB opt.record.rad 677 B opt.return.array.rad 289 B opt.return.nested.rad 803 B opt.return.nil.rad 82 B opt.return.nil.ril 156 B opt.return.record.rad 351 B opt.return.value.rad 91 B opt.return.value.ril 180 B opt.slice.npo.rad 3.0 KiB opt.slice.npo.ril 6.8 KiB opt.type.rad 227 B opt.while.let.complex.rad 411 B optional.aggregate.eq.rad 292 B optional.aggregate.eq.ril 825 B optional.array.repeat.rad 2.9 KiB optional.array.repeat.static.rad 833 B optional.const.scalar.rad 2.6 KiB optional.const.string.rad 340 B optional.eq.rad 131 B optional.eq.ril 311 B optional.field.value.match.rad 628 B optional.let.literal.rad 1.5 KiB optional.pointer.wide.rad 875 B optional.pointer.wide.ril 1.1 KiB optional.ptr.eq.rad 313 B optional.ptr.eq.ril 477 B optional.record.value.match.rad 645 B optional.union.eq.rad 1.5 KiB optional.union.init.rad 2.5 KiB optional.union.let.rad 2.9 KiB optional.union.variant.cond.rad 2.5 KiB optional.union.variant.exhaustive.rad 2.0 KiB optional.union.variant.match.rad 2.4 KiB optional.union.variant.nested.rad 1.5 KiB optional.union.variant.owned.rad 1.3 KiB optional.union.variant.placeholder.rad 408 B optional.union.variant.record.rad 2.9 KiB optional.union.variant.ref.rad 1.4 KiB optional.union.variant.void.rad 1.3 KiB owned.root.fields.rad 1.8 KiB panic.basic.rad 70 B panic.basic.ril 46 B panic.rad 111 B param.address.loop.rad 423 B parser.call.record.argument.rad 209 B parser.condition.array.record.rad 232 B parser.condition.subscript.record.rad 278 B parser.keyword.reject.rad 206 B placeholder.basic.rad 147 B placeholder.comprehensive.rad 578 B placeholder.value.reject.rad 510 B pointer.arithmetic.unsafe.rad 465 B pointer.borrow.unsafe.rad 1.7 KiB pointer.cast.unsafe.rad 475 B pointer.copy.edge.case.rad 1.5 KiB pointer.move.record.rad 570 B pointer.nonnull.rad 1.7 KiB pointer.nonnull.ril 3.3 KiB pointer.slice.index.rad 302 B pointer.slice.store.rad 1005 B pointer.stack.borrow.rad 954 B pointer.stack.unsafe.rad 517 B pointer.zero.trap.rad 407 B pointerfn.rad 50 B pointerfn.ril 112 B prog.ackermann.rad 5.0 KiB prog.bignum.rad 9.7 KiB prog.binsearch.rad 2.5 KiB prog.bubblesort.rad 2.0 KiB prog.cordic.rad 6.9 KiB prog.crc32.rad 2.8 KiB prog.dijkstra.rad 8.0 KiB prog.eval.rad 6.3 KiB prog.hanoi.rad 3.8 KiB prog.huffman.rad 9.8 KiB prog.hybridsort.rad 3.1 KiB prog.linkedlist.rad 5.9 KiB prog.lzw.rad 7.2 KiB prog.matmul.rad 3.0 KiB prog.mersenne.rad 5.5 KiB prog.nqueens.rad 3.6 KiB prog.rbtree.rad 8.8 KiB prog.regex.rad 11.0 KiB prog.sha256.rad 7.2 KiB prog.sieve.rad 2.8 KiB prog.symtab.rad 10.3 KiB prog.tokenizer.rad 14.8 KiB prog.vm.rad 18.2 KiB ptr.addressof.field.rad 138 B ptr.addressof.field.ril 163 B ptr.addressof.local.rad 501 B ptr.addressof.local.ril 353 B ptr.addressof.rad 133 B ptr.addressof.ril 163 B ptr.assign.rad 155 B ptr.assign.ril 159 B ptr.deref.rad 720 B ptr.deref.record.rad 288 B ptr.deref.record.ril 250 B ptr.deref.ril 1.1 KiB ptr.eq.rad 1.1 KiB ptr.mutate.rad 256 B ptr.opaque.rad 1.6 KiB ptr.subscript.assign.rad 133 B ptr.subscript.assign.ril 229 B range.arithmetic.rad 897 B record.access.rad 304 B record.alignment.rad 200 B record.array.elements.rad 1.7 KiB record.assign.blit.rad 121 B record.assign.blit.ril 193 B record.copy.rad 2.1 KiB record.ctor.tuple.rad 75 B record.ctor.tuple.ril 248 B record.empty.eq.rad 278 B record.empty.eq.ril 312 B record.eq.rad 229 B record.eq.ril 272 B record.field.assign.rad 215 B record.field.assign.ril 337 B record.literal.labeled.rad 109 B record.literal.labeled.ril 157 B record.mixed.layout.rad 122 B record.mixed.layout.ril 179 B record.nested.calls.2.rad 622 B record.nested.calls.3.rad 755 B record.nested.eq.rad 258 B record.nested.eq.ril 638 B record.nested.lit.rad 182 B record.nested.lit.ril 249 B record.nodeid.cheap.rad 1.1 KiB record.nodeid.cheap.ril 1.5 KiB record.param.lit.rad 379 B record.positional.destructure.rad 1.1 KiB record.ptr.access.rad 260 B record.ptr.access.ril 227 B record.ptr.mutate.rad 249 B record.scalar.rad 10.7 KiB record.shorthand.rad 1.5 KiB record.single.deref.rad 1.6 KiB record.unlabeled.deref.rad 1.4 KiB record.unlabeled.rad 419 B ref.if.bug.rad 527 B ref.immut.loop.bug.rad 674 B ref.local.bindings.rad 1.5 KiB ref.local.bindings.ril 1.2 KiB ref.local.fields.rad 1.8 KiB ref.local.never.rad 269 B ref.local.never.ril 124 B ref.local.scopes.rad 1.1 KiB ref.local.scopes.ril 1023 B ref.local.slice.release.rad 288 B ref.local.slice.release.ril 654 B ref.mut.ptr.rad 291 B reference.array.repeat.rad 133 B reference.array.repeat.ril 360 B regalloc.callee.save.rad 1.5 KiB regalloc.spill.reuse.rad 488 B region.buffered.rad 6.1 KiB region.cursor.implicit.rad 1.1 KiB region.empty.rad 1.4 KiB region.heap.rad 2.1 KiB region.http.rad 5.9 KiB region.iterator.rad 2.5 KiB region.mutable.views.escape.reject.rad 463 B region.mutable.views.rad 588 B region.nested.rad 2.7 KiB region.record.rad 4.4 KiB region.return.rad 5.4 KiB region.slice.rad 1.5 KiB region.sources.rad 3.6 KiB region.stores.rad 2.8 KiB region.union.variants.rad 1.3 KiB region.unknown.join.reject.rad 456 B region.unnamed.optional.reject.rad 230 B region.unnamed.rad 1.5 KiB region.unnamed.slice.reject.rad 234 B region.writer.rad 2.8 KiB reserve.loop.rad 421 B reserve.loop.ril 502 B reserve.zeroed.rad 1.2 KiB result.slice.rad 1.7 KiB result.void.success.rad 699 B return.lit.rad 45 B return.lit.ril 50 B return.never.catch.rad 794 B return.never.flow.rad 647 B return.never.flow.ril 607 B return.param.rad 48 B return.param.ril 54 B rv64.u32.compare.rad 2.1 KiB scope.local.overflow.reject.rad 842 B scratch.forge.opaque.rad 698 B scratch.frame.rad 3.3 KiB scratch.slots.reject.rad 650 B scratch.stale.values.rad 1.7 KiB set.keyword.rad 446 B simplefn.rad 45 B simplefn.ril 51 B slice.alloc.loop.rad 850 B slice.append.failure.rad 1.1 KiB slice.append.limit.rad 915 B slice.append.limit.trap.rad 369 B slice.append.rad 586 B slice.append.ril 1.5 KiB slice.append.values.rad 3.4 KiB slice.append.zero.rad 1.3 KiB slice.assign.mismatch.rad 220 B slice.assign.rad 2.2 KiB slice.basic.rad 763 B slice.basic.ril 1.3 KiB slice.borrow.coerce.rad 1.4 KiB slice.cap.rad 996 B slice.construct.unsafe.rad 468 B slice.delete.bounds.rad 288 B slice.delete.owned.rad 420 B slice.delete.rad 1009 B slice.delete.ril 4.4 KiB slice.delete.slots.rad 1.2 KiB slice.elem.bounds.rad 271 B slice.empty.nonnull.rad 1.9 KiB slice.empty.suffix.rad 599 B slice.eq.rad 126 B slice.eq.ril 330 B slice.extend.borrowed.rad 6.7 KiB slice.extend.bytes.rad 892 B slice.extend.bytes.ril 3.2 KiB slice.extend.copy.rad 24.0 KiB slice.extend.overflow.rad 1.1 KiB slice.extend.overflow.words.rad 1.1 KiB slice.failure.rad 2.6 KiB slice.grow.rad 6.7 KiB slice.header.unsafe.rad 629 B slice.index.rad 104 B slice.index.ril 220 B slice.mutable.rad 297 B slice.mutable.ril 696 B slice.mutator.place.reject.rad 1.3 KiB slice.new.bounds.rad 258 B slice.new.order.rad 258 B slice.of.rad 560 B slice.owned.return.const.rad 1.5 KiB slice.param.grow.rad 4.0 KiB slice.param.lent.rad 1.6 KiB slice.ptr.checked.bounds.rad 228 B slice.ptr.unsafe.rad 680 B slice.range.bounds.check.rad 301 B slice.range.capacity.bounds.rad 349 B slice.range.capacity.rad 1.8 KiB slice.range.dynamic.rad 883 B slice.range.order.check.rad 300 B slice.range.rad 682 B slice.range.ril 2.2 KiB slice.reserve.limit.rad 722 B slice.reserve.overflow.rad 1.6 KiB slice.reserve.rad 2.2 KiB slice.reserve.result.rad 634 B slice.reserve.result.ril 1.1 KiB slice.resize.extend.rad 793 B slice.resize.extend.ril 2.8 KiB slice.resize.fill.snapshot.rad 1.5 KiB slice.runtime.i32.rad 279 B slice.runtime.i32.ril 873 B slice.runtime.literal.rad 271 B slice.runtime.literal.ril 564 B slice.sizes.rad 13.1 KiB slice.sub.bounds.rad 407 B slice.sub.order.rad 357 B slice.sub.values.rad 1.1 KiB slice.subslice.rad 1.5 KiB slice.take.control.rad 1.4 KiB slice.take.lower.rad 410 B slice.take.lower.ril 351 B slice.take.neighbors.rad 1.8 KiB slice.take.rad 1.9 KiB slice.take.sizes.rad 2.7 KiB slice.zero-sized.limit.rad 345 B slice.zero-sized.rad 1.6 KiB spill.blockarg.clobber.rad 3.6 KiB spill.loop.rad 1.7 KiB stack.local.corrupt.rad 335 B static.array.mutate.rad 441 B static.assign.rad 138 B static.assign.ril 278 B static.basic.rad 361 B static.empty.slice.optional.rad 902 B static.fn.array.rad 628 B static.local.decl.rad 208 B static.local.decl.ril 458 B static.move.reject.rad 566 B static.mutation.reject.rad 3.4 KiB static.optional.nil.rad 1.0 KiB static.owned.alias.reject.rad 499 B static.record.array.rad 546 B static.reference.call.reject.rad 984 B static.scalar.rad 109 B static.scalar.ril 169 B static.slice.empty.rad 375 B static.slice.empty.record.table.rad 2.4 KiB static.slice.empty.ril 729 B static.slice.empty.table.rad 1.6 KiB static.slice.index.assign.rad 450 B static.slice.offset.rad 719 B static.zero.bss.rad 1.1 KiB static.zero.record.repeat.rad 759 B static.zero.record.repeat.ril 581 B string.basic.rad 162 B string.escape.rad 364 B string.index.rad 129 B switch.blockargs.clobber.rad 1.4 KiB trait.aggregate.ret.rad 1.7 KiB trait.array.optional.rad 1.8 KiB trait.basic.rad 632 B trait.control.flow.rad 1.2 KiB trait.dispatch.rad 333 B trait.dispatch.ril 801 B trait.fn.param.rad 1.8 KiB trait.multiple.methods.rad 1.3 KiB trait.multiple.traits.rad 1.3 KiB trait.multiple.types.rad 1.4 KiB trait.object.narrow.rad 1.7 KiB trait.object.rad 408 B trait.object.ril 642 B trait.optional.coerce.rad 1.0 KiB trait.param.names.shared.rad 759 B trait.supertrait.forward.rad 693 B trait.supertrait.rad 2.7 KiB trait.supertrait.ril 4.0 KiB trait.throws.rad 1.0 KiB trait.type.local.reject.rad 357 B trait.type.scoped.reject.rad 333 B trait.writer.rad 2.8 KiB trivial.phi.rad 1.1 KiB trivial.phi.ril 512 B try.basic.rad 402 B try.basic.ril 702 B try.catch.rad 350 B try.catch.ril 637 B try.optional.rad 374 B try.optional.ril 736 B try.panic.rad 362 B try.panic.ril 516 B try.reference.rad 911 B try.reference.ril 2.0 KiB type.unify.rad 4.7 KiB undefined.aggregate.rad 165 B undefined.aggregate.ril 114 B undefined.bitvalid.rad 2.7 KiB undefined.merge.dominance.rad 1.1 KiB undefined.merge.dominance.ril 934 B undefined.merge.one.path.rad 197 B undefined.merge.one.path.ril 119 B undefined.merge.pointer.rad 661 B undefined.merge.rad 1.9 KiB undefined.primitive.rad 122 B undefined.primitive.ril 48 B undefined.rad 459 B undefined.record.field.rad 1.6 KiB undefined.record.field.ril 849 B undefined.unsafe.rad 868 B union-tag.rad 967 B union.bitfield.rad 1.2 KiB union.ctor.rad 574 B union.ctor.ril 509 B union.discriminant.cast.rad 391 B union.edge.case.2.rad 699 B union.edge.case.3.rad 674 B union.eq.rad 827 B union.eq.ril 1.5 KiB union.eq.void.ctor.rad 389 B union.eq.void.ctor.ril 131 B union.eq.void.rad 189 B union.eq.void.ril 75 B union.match.bind.rad 275 B union.match.bind.ril 256 B union.match.ref.rad 1.1 KiB union.match.ref.ril 1.3 KiB union.match.tag.rad 910 B union.match.tag.ril 821 B union.mixed.alias.rad 1.1 KiB union.mixed.assign.rad 1002 B union.mixed.rad 9.9 KiB union.mixed.snapshot.rad 1.7 KiB union.payload.mutref.rad 1.5 KiB union.payload.rad 666 B union.payload.record.eq.rad 304 B union.payload.record.eq.ril 1.0 KiB union.record.forward.rad 1.3 KiB union.record.literal.rad 457 B union.record.literal.ril 418 B union.variant.access.rad 753 B union.variant.access.ril 692 B union.variants.limit.reject.rad 1.4 KiB union.variants.max.rad 1.3 KiB union.void.call.rad 1.5 KiB union.void.match.rad 427 B union.void.rad 969 B unop.rad 701 B unop.ril 506 B unsafe.block.bounds.rad 268 B unsafe.block.rad 866 B unsafe.static.rad 535 B unsigned.compare.rad 1.8 KiB var.align.rad 996 B var.infer.rad 574 B var.shadow.rad 244 B var.shadow.ril 145 B void.throw.rad 281 B void.throw.ril 601 B voidfn.rad 18 B voidfn.ril 44 B trap/ verify/ Makefile 9.2 KiB kernel.rad 776 B runner.rad 11.6 KiB vim/ .gitignore 333 B .gitsigners 224 B AGENTS.md 8.3 KiB CONTRIBUTING 2.1 KiB LICENSE 1.1 KiB Makefile 2.5 KiB README 3.4 KiB STYLE 3.2 KiB std.lib 2.1 KiB std.lib.test 1.1 KiB
test/tests/array.repeat.loop.rad 52.3 KiB raw
1
//! returns: 0
2
//! Array repeat literals fill every element, and only the array, for lengths around the unrolling
3
//! limit. The items are scalar, record, string slice, optional, and nested values, each known at
4
//! run time and constant.
5
6
/// Record with two words.
7
record Pair: Copy {
8
    /// First word.
9
    a: u32,
10
    /// Second word.
11
    b: u32,
12
}
13
14
/// Record with three bytes and alignment 1.
15
record Rgb: Copy {
16
    /// Red.
17
    r: u8,
18
    /// Green.
19
    g: u8,
20
    /// Blue.
21
    b: u8,
22
}
23
24
/// Record of 112 bytes.
25
record Wide: Copy {
26
    /// Fourteen double words.
27
    f: [u64; 14],
28
}
29
30
/// Check that every byte of a guard array still holds the value it was created with.
31
fn intact(guard: &[u8]) -> bool {
32
    for x in guard {
33
        if x <> 0x77 {
34
            return false;
35
        }
36
    }
37
    return true;
38
}
39
40
/// Overwrite the stack below the caller with a value that no check expects.
41
fn dirty(seed: u32) -> u32 {
42
    let mut d: [u32; 600] = [0; 600];
43
    for i in 0 .. 600 {
44
        set d[i] = 0xdeadbeef + seed;
45
    }
46
    return d[seed % 600];
47
}
48
49
// U8 //
50
51
/// Build the repeated value for `seed`.
52
fn mkU8(seed: u32) -> u8 {
53
    return (seed * 7 + 1) as u8;
54
}
55
56
/// Check that every element of `items` equals `v`.
57
fn allU8(items: &[u8], v: u8) -> bool {
58
    for x in items {
59
        if x <> v {
60
            return false;
61
        }
62
    }
63
    return true;
64
}
65
66
/// Fill an array of 1 `U8` elements from a run-time value and from a constant, and check them and
67
/// their neighbors.
68
fn fillU8_1(seed: u32) -> i32 {
69
    dirty(seed);
70
    let v = mkU8(seed);
71
    let k: u8 = 0x5a;
72
    let before: [u8; 8] = [0x77; 8];
73
    let items: [u8; 1] = [v; 1];
74
    let after: [u8; 8] = [0x77; 8];
75
    if not allU8(&items[..], v) {
76
        return 1;
77
    }
78
    if not intact(&before[..]) or not intact(&after[..]) {
79
        return 2;
80
    }
81
    dirty(seed);
82
    let constants: [u8; 1] = [0x5a; 1];
83
    let behind: [u8; 8] = [0x77; 8];
84
    if not allU8(&constants[..], k) {
85
        return 3;
86
    }
87
    if not intact(&behind[..]) {
88
        return 4;
89
    }
90
    return 0;
91
}
92
93
/// Fill an array of 3 `U8` elements from a run-time value and from a constant, and check them and
94
/// their neighbors.
95
fn fillU8_3(seed: u32) -> i32 {
96
    dirty(seed);
97
    let v = mkU8(seed);
98
    let k: u8 = 0x5a;
99
    let before: [u8; 8] = [0x77; 8];
100
    let items: [u8; 3] = [v; 3];
101
    let after: [u8; 8] = [0x77; 8];
102
    if not allU8(&items[..], v) {
103
        return 1;
104
    }
105
    if not intact(&before[..]) or not intact(&after[..]) {
106
        return 2;
107
    }
108
    dirty(seed);
109
    let constants: [u8; 3] = [0x5a; 3];
110
    let behind: [u8; 8] = [0x77; 8];
111
    if not allU8(&constants[..], k) {
112
        return 3;
113
    }
114
    if not intact(&behind[..]) {
115
        return 4;
116
    }
117
    return 0;
118
}
119
120
/// Fill an array of 16 `U8` elements from a run-time value and from a constant, and check them and
121
/// their neighbors.
122
fn fillU8_16(seed: u32) -> i32 {
123
    dirty(seed);
124
    let v = mkU8(seed);
125
    let k: u8 = 0x5a;
126
    let before: [u8; 8] = [0x77; 8];
127
    let items: [u8; 16] = [v; 16];
128
    let after: [u8; 8] = [0x77; 8];
129
    if not allU8(&items[..], v) {
130
        return 1;
131
    }
132
    if not intact(&before[..]) or not intact(&after[..]) {
133
        return 2;
134
    }
135
    dirty(seed);
136
    let constants: [u8; 16] = [0x5a; 16];
137
    let behind: [u8; 8] = [0x77; 8];
138
    if not allU8(&constants[..], k) {
139
        return 3;
140
    }
141
    if not intact(&behind[..]) {
142
        return 4;
143
    }
144
    return 0;
145
}
146
147
/// Fill an array of 17 `U8` elements from a run-time value and from a constant, and check them and
148
/// their neighbors.
149
fn fillU8_17(seed: u32) -> i32 {
150
    dirty(seed);
151
    let v = mkU8(seed);
152
    let k: u8 = 0x5a;
153
    let before: [u8; 8] = [0x77; 8];
154
    let items: [u8; 17] = [v; 17];
155
    let after: [u8; 8] = [0x77; 8];
156
    if not allU8(&items[..], v) {
157
        return 1;
158
    }
159
    if not intact(&before[..]) or not intact(&after[..]) {
160
        return 2;
161
    }
162
    dirty(seed);
163
    let constants: [u8; 17] = [0x5a; 17];
164
    let behind: [u8; 8] = [0x77; 8];
165
    if not allU8(&constants[..], k) {
166
        return 3;
167
    }
168
    if not intact(&behind[..]) {
169
        return 4;
170
    }
171
    return 0;
172
}
173
174
/// Fill an array of 32 `U8` elements from a run-time value and from a constant, and check them and
175
/// their neighbors.
176
fn fillU8_32(seed: u32) -> i32 {
177
    dirty(seed);
178
    let v = mkU8(seed);
179
    let k: u8 = 0x5a;
180
    let before: [u8; 8] = [0x77; 8];
181
    let items: [u8; 32] = [v; 32];
182
    let after: [u8; 8] = [0x77; 8];
183
    if not allU8(&items[..], v) {
184
        return 1;
185
    }
186
    if not intact(&before[..]) or not intact(&after[..]) {
187
        return 2;
188
    }
189
    dirty(seed);
190
    let constants: [u8; 32] = [0x5a; 32];
191
    let behind: [u8; 8] = [0x77; 8];
192
    if not allU8(&constants[..], k) {
193
        return 3;
194
    }
195
    if not intact(&behind[..]) {
196
        return 4;
197
    }
198
    return 0;
199
}
200
201
/// Fill an array of 33 `U8` elements from a run-time value and from a constant, and check them and
202
/// their neighbors.
203
fn fillU8_33(seed: u32) -> i32 {
204
    dirty(seed);
205
    let v = mkU8(seed);
206
    let k: u8 = 0x5a;
207
    let before: [u8; 8] = [0x77; 8];
208
    let items: [u8; 33] = [v; 33];
209
    let after: [u8; 8] = [0x77; 8];
210
    if not allU8(&items[..], v) {
211
        return 1;
212
    }
213
    if not intact(&before[..]) or not intact(&after[..]) {
214
        return 2;
215
    }
216
    dirty(seed);
217
    let constants: [u8; 33] = [0x5a; 33];
218
    let behind: [u8; 8] = [0x77; 8];
219
    if not allU8(&constants[..], k) {
220
        return 3;
221
    }
222
    if not intact(&behind[..]) {
223
        return 4;
224
    }
225
    return 0;
226
}
227
228
/// Fill an array of 130 `U8` elements from a run-time value and from a constant, and check them and
229
/// their neighbors.
230
fn fillU8_130(seed: u32) -> i32 {
231
    dirty(seed);
232
    let v = mkU8(seed);
233
    let k: u8 = 0x5a;
234
    let before: [u8; 8] = [0x77; 8];
235
    let items: [u8; 130] = [v; 130];
236
    let after: [u8; 8] = [0x77; 8];
237
    if not allU8(&items[..], v) {
238
        return 1;
239
    }
240
    if not intact(&before[..]) or not intact(&after[..]) {
241
        return 2;
242
    }
243
    dirty(seed);
244
    let constants: [u8; 130] = [0x5a; 130];
245
    let behind: [u8; 8] = [0x77; 8];
246
    if not allU8(&constants[..], k) {
247
        return 3;
248
    }
249
    if not intact(&behind[..]) {
250
        return 4;
251
    }
252
    return 0;
253
}
254
255
/// Check every tested length of `U8`.
256
fn checkU8(seed: u32) -> i32 {
257
    let r1 = fillU8_1(seed);
258
    if r1 <> 0 {
259
        return 1 * 10 + r1;
260
    }
261
    let r3 = fillU8_3(seed);
262
    if r3 <> 0 {
263
        return 2 * 10 + r3;
264
    }
265
    let r16 = fillU8_16(seed);
266
    if r16 <> 0 {
267
        return 3 * 10 + r16;
268
    }
269
    let r17 = fillU8_17(seed);
270
    if r17 <> 0 {
271
        return 4 * 10 + r17;
272
    }
273
    let r32 = fillU8_32(seed);
274
    if r32 <> 0 {
275
        return 5 * 10 + r32;
276
    }
277
    let r33 = fillU8_33(seed);
278
    if r33 <> 0 {
279
        return 6 * 10 + r33;
280
    }
281
    let r130 = fillU8_130(seed);
282
    if r130 <> 0 {
283
        return 7 * 10 + r130;
284
    }
285
    return 0;
286
}
287
288
// U32 //
289
290
/// Build the repeated value for `seed`.
291
fn mkU32(seed: u32) -> u32 {
292
    return seed * 1000003 + 1;
293
}
294
295
/// Check that every element of `items` equals `v`.
296
fn allU32(items: &[u32], v: u32) -> bool {
297
    for x in items {
298
        if x <> v {
299
            return false;
300
        }
301
    }
302
    return true;
303
}
304
305
/// Fill an array of 1 `U32` elements from a run-time value and from a constant, and check them and
306
/// their neighbors.
307
fn fillU32_1(seed: u32) -> i32 {
308
    dirty(seed);
309
    let v = mkU32(seed);
310
    let k: u32 = 0x12345678;
311
    let before: [u8; 8] = [0x77; 8];
312
    let items: [u32; 1] = [v; 1];
313
    let after: [u8; 8] = [0x77; 8];
314
    if not allU32(&items[..], v) {
315
        return 1;
316
    }
317
    if not intact(&before[..]) or not intact(&after[..]) {
318
        return 2;
319
    }
320
    dirty(seed);
321
    let constants: [u32; 1] = [0x12345678; 1];
322
    let behind: [u8; 8] = [0x77; 8];
323
    if not allU32(&constants[..], k) {
324
        return 3;
325
    }
326
    if not intact(&behind[..]) {
327
        return 4;
328
    }
329
    return 0;
330
}
331
332
/// Fill an array of 3 `U32` elements from a run-time value and from a constant, and check them and
333
/// their neighbors.
334
fn fillU32_3(seed: u32) -> i32 {
335
    dirty(seed);
336
    let v = mkU32(seed);
337
    let k: u32 = 0x12345678;
338
    let before: [u8; 8] = [0x77; 8];
339
    let items: [u32; 3] = [v; 3];
340
    let after: [u8; 8] = [0x77; 8];
341
    if not allU32(&items[..], v) {
342
        return 1;
343
    }
344
    if not intact(&before[..]) or not intact(&after[..]) {
345
        return 2;
346
    }
347
    dirty(seed);
348
    let constants: [u32; 3] = [0x12345678; 3];
349
    let behind: [u8; 8] = [0x77; 8];
350
    if not allU32(&constants[..], k) {
351
        return 3;
352
    }
353
    if not intact(&behind[..]) {
354
        return 4;
355
    }
356
    return 0;
357
}
358
359
/// Fill an array of 16 `U32` elements from a run-time value and from a constant, and check them and
360
/// their neighbors.
361
fn fillU32_16(seed: u32) -> i32 {
362
    dirty(seed);
363
    let v = mkU32(seed);
364
    let k: u32 = 0x12345678;
365
    let before: [u8; 8] = [0x77; 8];
366
    let items: [u32; 16] = [v; 16];
367
    let after: [u8; 8] = [0x77; 8];
368
    if not allU32(&items[..], v) {
369
        return 1;
370
    }
371
    if not intact(&before[..]) or not intact(&after[..]) {
372
        return 2;
373
    }
374
    dirty(seed);
375
    let constants: [u32; 16] = [0x12345678; 16];
376
    let behind: [u8; 8] = [0x77; 8];
377
    if not allU32(&constants[..], k) {
378
        return 3;
379
    }
380
    if not intact(&behind[..]) {
381
        return 4;
382
    }
383
    return 0;
384
}
385
386
/// Fill an array of 17 `U32` elements from a run-time value and from a constant, and check them and
387
/// their neighbors.
388
fn fillU32_17(seed: u32) -> i32 {
389
    dirty(seed);
390
    let v = mkU32(seed);
391
    let k: u32 = 0x12345678;
392
    let before: [u8; 8] = [0x77; 8];
393
    let items: [u32; 17] = [v; 17];
394
    let after: [u8; 8] = [0x77; 8];
395
    if not allU32(&items[..], v) {
396
        return 1;
397
    }
398
    if not intact(&before[..]) or not intact(&after[..]) {
399
        return 2;
400
    }
401
    dirty(seed);
402
    let constants: [u32; 17] = [0x12345678; 17];
403
    let behind: [u8; 8] = [0x77; 8];
404
    if not allU32(&constants[..], k) {
405
        return 3;
406
    }
407
    if not intact(&behind[..]) {
408
        return 4;
409
    }
410
    return 0;
411
}
412
413
/// Fill an array of 32 `U32` elements from a run-time value and from a constant, and check them and
414
/// their neighbors.
415
fn fillU32_32(seed: u32) -> i32 {
416
    dirty(seed);
417
    let v = mkU32(seed);
418
    let k: u32 = 0x12345678;
419
    let before: [u8; 8] = [0x77; 8];
420
    let items: [u32; 32] = [v; 32];
421
    let after: [u8; 8] = [0x77; 8];
422
    if not allU32(&items[..], v) {
423
        return 1;
424
    }
425
    if not intact(&before[..]) or not intact(&after[..]) {
426
        return 2;
427
    }
428
    dirty(seed);
429
    let constants: [u32; 32] = [0x12345678; 32];
430
    let behind: [u8; 8] = [0x77; 8];
431
    if not allU32(&constants[..], k) {
432
        return 3;
433
    }
434
    if not intact(&behind[..]) {
435
        return 4;
436
    }
437
    return 0;
438
}
439
440
/// Fill an array of 33 `U32` elements from a run-time value and from a constant, and check them and
441
/// their neighbors.
442
fn fillU32_33(seed: u32) -> i32 {
443
    dirty(seed);
444
    let v = mkU32(seed);
445
    let k: u32 = 0x12345678;
446
    let before: [u8; 8] = [0x77; 8];
447
    let items: [u32; 33] = [v; 33];
448
    let after: [u8; 8] = [0x77; 8];
449
    if not allU32(&items[..], v) {
450
        return 1;
451
    }
452
    if not intact(&before[..]) or not intact(&after[..]) {
453
        return 2;
454
    }
455
    dirty(seed);
456
    let constants: [u32; 33] = [0x12345678; 33];
457
    let behind: [u8; 8] = [0x77; 8];
458
    if not allU32(&constants[..], k) {
459
        return 3;
460
    }
461
    if not intact(&behind[..]) {
462
        return 4;
463
    }
464
    return 0;
465
}
466
467
/// Fill an array of 130 `U32` elements from a run-time value and from a constant, and check them
468
/// and their neighbors.
469
fn fillU32_130(seed: u32) -> i32 {
470
    dirty(seed);
471
    let v = mkU32(seed);
472
    let k: u32 = 0x12345678;
473
    let before: [u8; 8] = [0x77; 8];
474
    let items: [u32; 130] = [v; 130];
475
    let after: [u8; 8] = [0x77; 8];
476
    if not allU32(&items[..], v) {
477
        return 1;
478
    }
479
    if not intact(&before[..]) or not intact(&after[..]) {
480
        return 2;
481
    }
482
    dirty(seed);
483
    let constants: [u32; 130] = [0x12345678; 130];
484
    let behind: [u8; 8] = [0x77; 8];
485
    if not allU32(&constants[..], k) {
486
        return 3;
487
    }
488
    if not intact(&behind[..]) {
489
        return 4;
490
    }
491
    return 0;
492
}
493
494
/// Check every tested length of `U32`.
495
fn checkU32(seed: u32) -> i32 {
496
    let r1 = fillU32_1(seed);
497
    if r1 <> 0 {
498
        return 1 * 10 + r1;
499
    }
500
    let r3 = fillU32_3(seed);
501
    if r3 <> 0 {
502
        return 2 * 10 + r3;
503
    }
504
    let r16 = fillU32_16(seed);
505
    if r16 <> 0 {
506
        return 3 * 10 + r16;
507
    }
508
    let r17 = fillU32_17(seed);
509
    if r17 <> 0 {
510
        return 4 * 10 + r17;
511
    }
512
    let r32 = fillU32_32(seed);
513
    if r32 <> 0 {
514
        return 5 * 10 + r32;
515
    }
516
    let r33 = fillU32_33(seed);
517
    if r33 <> 0 {
518
        return 6 * 10 + r33;
519
    }
520
    let r130 = fillU32_130(seed);
521
    if r130 <> 0 {
522
        return 7 * 10 + r130;
523
    }
524
    return 0;
525
}
526
527
// U64 //
528
529
/// Build the repeated value for `seed`.
530
fn mkU64(seed: u32) -> u64 {
531
    return seed as u64 * 1000003 + 4294967296;
532
}
533
534
/// Check that every element of `items` equals `v`.
535
fn allU64(items: &[u64], v: u64) -> bool {
536
    for x in items {
537
        if x <> v {
538
            return false;
539
        }
540
    }
541
    return true;
542
}
543
544
/// Fill an array of 1 `U64` elements from a run-time value and from a constant, and check them and
545
/// their neighbors.
546
fn fillU64_1(seed: u32) -> i32 {
547
    dirty(seed);
548
    let v = mkU64(seed);
549
    let k: u64 = 0x123456789abcdef;
550
    let before: [u8; 8] = [0x77; 8];
551
    let items: [u64; 1] = [v; 1];
552
    let after: [u8; 8] = [0x77; 8];
553
    if not allU64(&items[..], v) {
554
        return 1;
555
    }
556
    if not intact(&before[..]) or not intact(&after[..]) {
557
        return 2;
558
    }
559
    dirty(seed);
560
    let constants: [u64; 1] = [0x123456789abcdef; 1];
561
    let behind: [u8; 8] = [0x77; 8];
562
    if not allU64(&constants[..], k) {
563
        return 3;
564
    }
565
    if not intact(&behind[..]) {
566
        return 4;
567
    }
568
    return 0;
569
}
570
571
/// Fill an array of 3 `U64` elements from a run-time value and from a constant, and check them and
572
/// their neighbors.
573
fn fillU64_3(seed: u32) -> i32 {
574
    dirty(seed);
575
    let v = mkU64(seed);
576
    let k: u64 = 0x123456789abcdef;
577
    let before: [u8; 8] = [0x77; 8];
578
    let items: [u64; 3] = [v; 3];
579
    let after: [u8; 8] = [0x77; 8];
580
    if not allU64(&items[..], v) {
581
        return 1;
582
    }
583
    if not intact(&before[..]) or not intact(&after[..]) {
584
        return 2;
585
    }
586
    dirty(seed);
587
    let constants: [u64; 3] = [0x123456789abcdef; 3];
588
    let behind: [u8; 8] = [0x77; 8];
589
    if not allU64(&constants[..], k) {
590
        return 3;
591
    }
592
    if not intact(&behind[..]) {
593
        return 4;
594
    }
595
    return 0;
596
}
597
598
/// Fill an array of 16 `U64` elements from a run-time value and from a constant, and check them and
599
/// their neighbors.
600
fn fillU64_16(seed: u32) -> i32 {
601
    dirty(seed);
602
    let v = mkU64(seed);
603
    let k: u64 = 0x123456789abcdef;
604
    let before: [u8; 8] = [0x77; 8];
605
    let items: [u64; 16] = [v; 16];
606
    let after: [u8; 8] = [0x77; 8];
607
    if not allU64(&items[..], v) {
608
        return 1;
609
    }
610
    if not intact(&before[..]) or not intact(&after[..]) {
611
        return 2;
612
    }
613
    dirty(seed);
614
    let constants: [u64; 16] = [0x123456789abcdef; 16];
615
    let behind: [u8; 8] = [0x77; 8];
616
    if not allU64(&constants[..], k) {
617
        return 3;
618
    }
619
    if not intact(&behind[..]) {
620
        return 4;
621
    }
622
    return 0;
623
}
624
625
/// Fill an array of 17 `U64` elements from a run-time value and from a constant, and check them and
626
/// their neighbors.
627
fn fillU64_17(seed: u32) -> i32 {
628
    dirty(seed);
629
    let v = mkU64(seed);
630
    let k: u64 = 0x123456789abcdef;
631
    let before: [u8; 8] = [0x77; 8];
632
    let items: [u64; 17] = [v; 17];
633
    let after: [u8; 8] = [0x77; 8];
634
    if not allU64(&items[..], v) {
635
        return 1;
636
    }
637
    if not intact(&before[..]) or not intact(&after[..]) {
638
        return 2;
639
    }
640
    dirty(seed);
641
    let constants: [u64; 17] = [0x123456789abcdef; 17];
642
    let behind: [u8; 8] = [0x77; 8];
643
    if not allU64(&constants[..], k) {
644
        return 3;
645
    }
646
    if not intact(&behind[..]) {
647
        return 4;
648
    }
649
    return 0;
650
}
651
652
/// Fill an array of 32 `U64` elements from a run-time value and from a constant, and check them and
653
/// their neighbors.
654
fn fillU64_32(seed: u32) -> i32 {
655
    dirty(seed);
656
    let v = mkU64(seed);
657
    let k: u64 = 0x123456789abcdef;
658
    let before: [u8; 8] = [0x77; 8];
659
    let items: [u64; 32] = [v; 32];
660
    let after: [u8; 8] = [0x77; 8];
661
    if not allU64(&items[..], v) {
662
        return 1;
663
    }
664
    if not intact(&before[..]) or not intact(&after[..]) {
665
        return 2;
666
    }
667
    dirty(seed);
668
    let constants: [u64; 32] = [0x123456789abcdef; 32];
669
    let behind: [u8; 8] = [0x77; 8];
670
    if not allU64(&constants[..], k) {
671
        return 3;
672
    }
673
    if not intact(&behind[..]) {
674
        return 4;
675
    }
676
    return 0;
677
}
678
679
/// Fill an array of 33 `U64` elements from a run-time value and from a constant, and check them and
680
/// their neighbors.
681
fn fillU64_33(seed: u32) -> i32 {
682
    dirty(seed);
683
    let v = mkU64(seed);
684
    let k: u64 = 0x123456789abcdef;
685
    let before: [u8; 8] = [0x77; 8];
686
    let items: [u64; 33] = [v; 33];
687
    let after: [u8; 8] = [0x77; 8];
688
    if not allU64(&items[..], v) {
689
        return 1;
690
    }
691
    if not intact(&before[..]) or not intact(&after[..]) {
692
        return 2;
693
    }
694
    dirty(seed);
695
    let constants: [u64; 33] = [0x123456789abcdef; 33];
696
    let behind: [u8; 8] = [0x77; 8];
697
    if not allU64(&constants[..], k) {
698
        return 3;
699
    }
700
    if not intact(&behind[..]) {
701
        return 4;
702
    }
703
    return 0;
704
}
705
706
/// Fill an array of 130 `U64` elements from a run-time value and from a constant, and check them
707
/// and their neighbors.
708
fn fillU64_130(seed: u32) -> i32 {
709
    dirty(seed);
710
    let v = mkU64(seed);
711
    let k: u64 = 0x123456789abcdef;
712
    let before: [u8; 8] = [0x77; 8];
713
    let items: [u64; 130] = [v; 130];
714
    let after: [u8; 8] = [0x77; 8];
715
    if not allU64(&items[..], v) {
716
        return 1;
717
    }
718
    if not intact(&before[..]) or not intact(&after[..]) {
719
        return 2;
720
    }
721
    dirty(seed);
722
    let constants: [u64; 130] = [0x123456789abcdef; 130];
723
    let behind: [u8; 8] = [0x77; 8];
724
    if not allU64(&constants[..], k) {
725
        return 3;
726
    }
727
    if not intact(&behind[..]) {
728
        return 4;
729
    }
730
    return 0;
731
}
732
733
/// Check every tested length of `U64`.
734
fn checkU64(seed: u32) -> i32 {
735
    let r1 = fillU64_1(seed);
736
    if r1 <> 0 {
737
        return 1 * 10 + r1;
738
    }
739
    let r3 = fillU64_3(seed);
740
    if r3 <> 0 {
741
        return 2 * 10 + r3;
742
    }
743
    let r16 = fillU64_16(seed);
744
    if r16 <> 0 {
745
        return 3 * 10 + r16;
746
    }
747
    let r17 = fillU64_17(seed);
748
    if r17 <> 0 {
749
        return 4 * 10 + r17;
750
    }
751
    let r32 = fillU64_32(seed);
752
    if r32 <> 0 {
753
        return 5 * 10 + r32;
754
    }
755
    let r33 = fillU64_33(seed);
756
    if r33 <> 0 {
757
        return 6 * 10 + r33;
758
    }
759
    let r130 = fillU64_130(seed);
760
    if r130 <> 0 {
761
        return 7 * 10 + r130;
762
    }
763
    return 0;
764
}
765
766
// Pair //
767
768
/// Build the repeated value for `seed`.
769
fn mkPair(seed: u32) -> Pair {
770
    return Pair { a: seed + 1, b: seed * 3 };
771
}
772
773
/// Check that every element of `items` equals `v`.
774
fn allPair(items: &[Pair], v: Pair) -> bool {
775
    for x in items {
776
        if x.a <> v.a or x.b <> v.b {
777
            return false;
778
        }
779
    }
780
    return true;
781
}
782
783
/// Fill an array of 1 `Pair` elements from a run-time value and from a constant, and check them and
784
/// their neighbors.
785
fn fillPair_1(seed: u32) -> i32 {
786
    dirty(seed);
787
    let v = mkPair(seed);
788
    let k: Pair = Pair { a: 11, b: 22 };
789
    let before: [u8; 8] = [0x77; 8];
790
    let items: [Pair; 1] = [v; 1];
791
    let after: [u8; 8] = [0x77; 8];
792
    if not allPair(&items[..], v) {
793
        return 1;
794
    }
795
    if not intact(&before[..]) or not intact(&after[..]) {
796
        return 2;
797
    }
798
    dirty(seed);
799
    let constants: [Pair; 1] = [Pair { a: 11, b: 22 }; 1];
800
    let behind: [u8; 8] = [0x77; 8];
801
    if not allPair(&constants[..], k) {
802
        return 3;
803
    }
804
    if not intact(&behind[..]) {
805
        return 4;
806
    }
807
    return 0;
808
}
809
810
/// Fill an array of 3 `Pair` elements from a run-time value and from a constant, and check them and
811
/// their neighbors.
812
fn fillPair_3(seed: u32) -> i32 {
813
    dirty(seed);
814
    let v = mkPair(seed);
815
    let k: Pair = Pair { a: 11, b: 22 };
816
    let before: [u8; 8] = [0x77; 8];
817
    let items: [Pair; 3] = [v; 3];
818
    let after: [u8; 8] = [0x77; 8];
819
    if not allPair(&items[..], v) {
820
        return 1;
821
    }
822
    if not intact(&before[..]) or not intact(&after[..]) {
823
        return 2;
824
    }
825
    dirty(seed);
826
    let constants: [Pair; 3] = [Pair { a: 11, b: 22 }; 3];
827
    let behind: [u8; 8] = [0x77; 8];
828
    if not allPair(&constants[..], k) {
829
        return 3;
830
    }
831
    if not intact(&behind[..]) {
832
        return 4;
833
    }
834
    return 0;
835
}
836
837
/// Fill an array of 16 `Pair` elements from a run-time value and from a constant, and check them
838
/// and their neighbors.
839
fn fillPair_16(seed: u32) -> i32 {
840
    dirty(seed);
841
    let v = mkPair(seed);
842
    let k: Pair = Pair { a: 11, b: 22 };
843
    let before: [u8; 8] = [0x77; 8];
844
    let items: [Pair; 16] = [v; 16];
845
    let after: [u8; 8] = [0x77; 8];
846
    if not allPair(&items[..], v) {
847
        return 1;
848
    }
849
    if not intact(&before[..]) or not intact(&after[..]) {
850
        return 2;
851
    }
852
    dirty(seed);
853
    let constants: [Pair; 16] = [Pair { a: 11, b: 22 }; 16];
854
    let behind: [u8; 8] = [0x77; 8];
855
    if not allPair(&constants[..], k) {
856
        return 3;
857
    }
858
    if not intact(&behind[..]) {
859
        return 4;
860
    }
861
    return 0;
862
}
863
864
/// Fill an array of 17 `Pair` elements from a run-time value and from a constant, and check them
865
/// and their neighbors.
866
fn fillPair_17(seed: u32) -> i32 {
867
    dirty(seed);
868
    let v = mkPair(seed);
869
    let k: Pair = Pair { a: 11, b: 22 };
870
    let before: [u8; 8] = [0x77; 8];
871
    let items: [Pair; 17] = [v; 17];
872
    let after: [u8; 8] = [0x77; 8];
873
    if not allPair(&items[..], v) {
874
        return 1;
875
    }
876
    if not intact(&before[..]) or not intact(&after[..]) {
877
        return 2;
878
    }
879
    dirty(seed);
880
    let constants: [Pair; 17] = [Pair { a: 11, b: 22 }; 17];
881
    let behind: [u8; 8] = [0x77; 8];
882
    if not allPair(&constants[..], k) {
883
        return 3;
884
    }
885
    if not intact(&behind[..]) {
886
        return 4;
887
    }
888
    return 0;
889
}
890
891
/// Fill an array of 32 `Pair` elements from a run-time value and from a constant, and check them
892
/// and their neighbors.
893
fn fillPair_32(seed: u32) -> i32 {
894
    dirty(seed);
895
    let v = mkPair(seed);
896
    let k: Pair = Pair { a: 11, b: 22 };
897
    let before: [u8; 8] = [0x77; 8];
898
    let items: [Pair; 32] = [v; 32];
899
    let after: [u8; 8] = [0x77; 8];
900
    if not allPair(&items[..], v) {
901
        return 1;
902
    }
903
    if not intact(&before[..]) or not intact(&after[..]) {
904
        return 2;
905
    }
906
    dirty(seed);
907
    let constants: [Pair; 32] = [Pair { a: 11, b: 22 }; 32];
908
    let behind: [u8; 8] = [0x77; 8];
909
    if not allPair(&constants[..], k) {
910
        return 3;
911
    }
912
    if not intact(&behind[..]) {
913
        return 4;
914
    }
915
    return 0;
916
}
917
918
/// Fill an array of 33 `Pair` elements from a run-time value and from a constant, and check them
919
/// and their neighbors.
920
fn fillPair_33(seed: u32) -> i32 {
921
    dirty(seed);
922
    let v = mkPair(seed);
923
    let k: Pair = Pair { a: 11, b: 22 };
924
    let before: [u8; 8] = [0x77; 8];
925
    let items: [Pair; 33] = [v; 33];
926
    let after: [u8; 8] = [0x77; 8];
927
    if not allPair(&items[..], v) {
928
        return 1;
929
    }
930
    if not intact(&before[..]) or not intact(&after[..]) {
931
        return 2;
932
    }
933
    dirty(seed);
934
    let constants: [Pair; 33] = [Pair { a: 11, b: 22 }; 33];
935
    let behind: [u8; 8] = [0x77; 8];
936
    if not allPair(&constants[..], k) {
937
        return 3;
938
    }
939
    if not intact(&behind[..]) {
940
        return 4;
941
    }
942
    return 0;
943
}
944
945
/// Fill an array of 130 `Pair` elements from a run-time value and from a constant, and check them
946
/// and their neighbors.
947
fn fillPair_130(seed: u32) -> i32 {
948
    dirty(seed);
949
    let v = mkPair(seed);
950
    let k: Pair = Pair { a: 11, b: 22 };
951
    let before: [u8; 8] = [0x77; 8];
952
    let items: [Pair; 130] = [v; 130];
953
    let after: [u8; 8] = [0x77; 8];
954
    if not allPair(&items[..], v) {
955
        return 1;
956
    }
957
    if not intact(&before[..]) or not intact(&after[..]) {
958
        return 2;
959
    }
960
    dirty(seed);
961
    let constants: [Pair; 130] = [Pair { a: 11, b: 22 }; 130];
962
    let behind: [u8; 8] = [0x77; 8];
963
    if not allPair(&constants[..], k) {
964
        return 3;
965
    }
966
    if not intact(&behind[..]) {
967
        return 4;
968
    }
969
    return 0;
970
}
971
972
/// Check every tested length of `Pair`.
973
fn checkPair(seed: u32) -> i32 {
974
    let r1 = fillPair_1(seed);
975
    if r1 <> 0 {
976
        return 1 * 10 + r1;
977
    }
978
    let r3 = fillPair_3(seed);
979
    if r3 <> 0 {
980
        return 2 * 10 + r3;
981
    }
982
    let r16 = fillPair_16(seed);
983
    if r16 <> 0 {
984
        return 3 * 10 + r16;
985
    }
986
    let r17 = fillPair_17(seed);
987
    if r17 <> 0 {
988
        return 4 * 10 + r17;
989
    }
990
    let r32 = fillPair_32(seed);
991
    if r32 <> 0 {
992
        return 5 * 10 + r32;
993
    }
994
    let r33 = fillPair_33(seed);
995
    if r33 <> 0 {
996
        return 6 * 10 + r33;
997
    }
998
    let r130 = fillPair_130(seed);
999
    if r130 <> 0 {
1000
        return 7 * 10 + r130;
1001
    }
1002
    return 0;
1003
}
1004
1005
// Rgb //
1006
1007
/// Build the repeated value for `seed`.
1008
fn mkRgb(seed: u32) -> Rgb {
1009
    return Rgb { r: seed as u8, g: (seed + 1) as u8, b: (seed + 2) as u8 };
1010
}
1011
1012
/// Check that every element of `items` equals `v`.
1013
fn allRgb(items: &[Rgb], v: Rgb) -> bool {
1014
    for x in items {
1015
        if x.r <> v.r or x.g <> v.g or x.b <> v.b {
1016
            return false;
1017
        }
1018
    }
1019
    return true;
1020
}
1021
1022
/// Fill an array of 1 `Rgb` elements from a run-time value and from a constant, and check them and
1023
/// their neighbors.
1024
fn fillRgb_1(seed: u32) -> i32 {
1025
    dirty(seed);
1026
    let v = mkRgb(seed);
1027
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1028
    let before: [u8; 8] = [0x77; 8];
1029
    let items: [Rgb; 1] = [v; 1];
1030
    let after: [u8; 8] = [0x77; 8];
1031
    if not allRgb(&items[..], v) {
1032
        return 1;
1033
    }
1034
    if not intact(&before[..]) or not intact(&after[..]) {
1035
        return 2;
1036
    }
1037
    dirty(seed);
1038
    let constants: [Rgb; 1] = [Rgb { r: 1, g: 2, b: 3 }; 1];
1039
    let behind: [u8; 8] = [0x77; 8];
1040
    if not allRgb(&constants[..], k) {
1041
        return 3;
1042
    }
1043
    if not intact(&behind[..]) {
1044
        return 4;
1045
    }
1046
    return 0;
1047
}
1048
1049
/// Fill an array of 3 `Rgb` elements from a run-time value and from a constant, and check them and
1050
/// their neighbors.
1051
fn fillRgb_3(seed: u32) -> i32 {
1052
    dirty(seed);
1053
    let v = mkRgb(seed);
1054
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1055
    let before: [u8; 8] = [0x77; 8];
1056
    let items: [Rgb; 3] = [v; 3];
1057
    let after: [u8; 8] = [0x77; 8];
1058
    if not allRgb(&items[..], v) {
1059
        return 1;
1060
    }
1061
    if not intact(&before[..]) or not intact(&after[..]) {
1062
        return 2;
1063
    }
1064
    dirty(seed);
1065
    let constants: [Rgb; 3] = [Rgb { r: 1, g: 2, b: 3 }; 3];
1066
    let behind: [u8; 8] = [0x77; 8];
1067
    if not allRgb(&constants[..], k) {
1068
        return 3;
1069
    }
1070
    if not intact(&behind[..]) {
1071
        return 4;
1072
    }
1073
    return 0;
1074
}
1075
1076
/// Fill an array of 16 `Rgb` elements from a run-time value and from a constant, and check them and
1077
/// their neighbors.
1078
fn fillRgb_16(seed: u32) -> i32 {
1079
    dirty(seed);
1080
    let v = mkRgb(seed);
1081
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1082
    let before: [u8; 8] = [0x77; 8];
1083
    let items: [Rgb; 16] = [v; 16];
1084
    let after: [u8; 8] = [0x77; 8];
1085
    if not allRgb(&items[..], v) {
1086
        return 1;
1087
    }
1088
    if not intact(&before[..]) or not intact(&after[..]) {
1089
        return 2;
1090
    }
1091
    dirty(seed);
1092
    let constants: [Rgb; 16] = [Rgb { r: 1, g: 2, b: 3 }; 16];
1093
    let behind: [u8; 8] = [0x77; 8];
1094
    if not allRgb(&constants[..], k) {
1095
        return 3;
1096
    }
1097
    if not intact(&behind[..]) {
1098
        return 4;
1099
    }
1100
    return 0;
1101
}
1102
1103
/// Fill an array of 17 `Rgb` elements from a run-time value and from a constant, and check them and
1104
/// their neighbors.
1105
fn fillRgb_17(seed: u32) -> i32 {
1106
    dirty(seed);
1107
    let v = mkRgb(seed);
1108
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1109
    let before: [u8; 8] = [0x77; 8];
1110
    let items: [Rgb; 17] = [v; 17];
1111
    let after: [u8; 8] = [0x77; 8];
1112
    if not allRgb(&items[..], v) {
1113
        return 1;
1114
    }
1115
    if not intact(&before[..]) or not intact(&after[..]) {
1116
        return 2;
1117
    }
1118
    dirty(seed);
1119
    let constants: [Rgb; 17] = [Rgb { r: 1, g: 2, b: 3 }; 17];
1120
    let behind: [u8; 8] = [0x77; 8];
1121
    if not allRgb(&constants[..], k) {
1122
        return 3;
1123
    }
1124
    if not intact(&behind[..]) {
1125
        return 4;
1126
    }
1127
    return 0;
1128
}
1129
1130
/// Fill an array of 32 `Rgb` elements from a run-time value and from a constant, and check them and
1131
/// their neighbors.
1132
fn fillRgb_32(seed: u32) -> i32 {
1133
    dirty(seed);
1134
    let v = mkRgb(seed);
1135
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1136
    let before: [u8; 8] = [0x77; 8];
1137
    let items: [Rgb; 32] = [v; 32];
1138
    let after: [u8; 8] = [0x77; 8];
1139
    if not allRgb(&items[..], v) {
1140
        return 1;
1141
    }
1142
    if not intact(&before[..]) or not intact(&after[..]) {
1143
        return 2;
1144
    }
1145
    dirty(seed);
1146
    let constants: [Rgb; 32] = [Rgb { r: 1, g: 2, b: 3 }; 32];
1147
    let behind: [u8; 8] = [0x77; 8];
1148
    if not allRgb(&constants[..], k) {
1149
        return 3;
1150
    }
1151
    if not intact(&behind[..]) {
1152
        return 4;
1153
    }
1154
    return 0;
1155
}
1156
1157
/// Fill an array of 33 `Rgb` elements from a run-time value and from a constant, and check them and
1158
/// their neighbors.
1159
fn fillRgb_33(seed: u32) -> i32 {
1160
    dirty(seed);
1161
    let v = mkRgb(seed);
1162
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1163
    let before: [u8; 8] = [0x77; 8];
1164
    let items: [Rgb; 33] = [v; 33];
1165
    let after: [u8; 8] = [0x77; 8];
1166
    if not allRgb(&items[..], v) {
1167
        return 1;
1168
    }
1169
    if not intact(&before[..]) or not intact(&after[..]) {
1170
        return 2;
1171
    }
1172
    dirty(seed);
1173
    let constants: [Rgb; 33] = [Rgb { r: 1, g: 2, b: 3 }; 33];
1174
    let behind: [u8; 8] = [0x77; 8];
1175
    if not allRgb(&constants[..], k) {
1176
        return 3;
1177
    }
1178
    if not intact(&behind[..]) {
1179
        return 4;
1180
    }
1181
    return 0;
1182
}
1183
1184
/// Fill an array of 130 `Rgb` elements from a run-time value and from a constant, and check them
1185
/// and their neighbors.
1186
fn fillRgb_130(seed: u32) -> i32 {
1187
    dirty(seed);
1188
    let v = mkRgb(seed);
1189
    let k: Rgb = Rgb { r: 1, g: 2, b: 3 };
1190
    let before: [u8; 8] = [0x77; 8];
1191
    let items: [Rgb; 130] = [v; 130];
1192
    let after: [u8; 8] = [0x77; 8];
1193
    if not allRgb(&items[..], v) {
1194
        return 1;
1195
    }
1196
    if not intact(&before[..]) or not intact(&after[..]) {
1197
        return 2;
1198
    }
1199
    dirty(seed);
1200
    let constants: [Rgb; 130] = [Rgb { r: 1, g: 2, b: 3 }; 130];
1201
    let behind: [u8; 8] = [0x77; 8];
1202
    if not allRgb(&constants[..], k) {
1203
        return 3;
1204
    }
1205
    if not intact(&behind[..]) {
1206
        return 4;
1207
    }
1208
    return 0;
1209
}
1210
1211
/// Check every tested length of `Rgb`.
1212
fn checkRgb(seed: u32) -> i32 {
1213
    let r1 = fillRgb_1(seed);
1214
    if r1 <> 0 {
1215
        return 1 * 10 + r1;
1216
    }
1217
    let r3 = fillRgb_3(seed);
1218
    if r3 <> 0 {
1219
        return 2 * 10 + r3;
1220
    }
1221
    let r16 = fillRgb_16(seed);
1222
    if r16 <> 0 {
1223
        return 3 * 10 + r16;
1224
    }
1225
    let r17 = fillRgb_17(seed);
1226
    if r17 <> 0 {
1227
        return 4 * 10 + r17;
1228
    }
1229
    let r32 = fillRgb_32(seed);
1230
    if r32 <> 0 {
1231
        return 5 * 10 + r32;
1232
    }
1233
    let r33 = fillRgb_33(seed);
1234
    if r33 <> 0 {
1235
        return 6 * 10 + r33;
1236
    }
1237
    let r130 = fillRgb_130(seed);
1238
    if r130 <> 0 {
1239
        return 7 * 10 + r130;
1240
    }
1241
    return 0;
1242
}
1243
1244
// Str //
1245
1246
/// Build the repeated value for `seed`.
1247
fn mkStr(seed: u32) -> *[u8] {
1248
    return "ab" if seed % 2 == 0 else "xyz";
1249
}
1250
1251
/// Check that every element of `items` equals `v`.
1252
fn allStr(items: &[*[u8]], v: *[u8]) -> bool {
1253
    for x in items {
1254
        if x.len <> v.len or x[0] <> v[0] {
1255
            return false;
1256
        }
1257
    }
1258
    return true;
1259
}
1260
1261
/// Fill an array of 1 `Str` elements from a run-time value and from a constant, and check them and
1262
/// their neighbors.
1263
fn fillStr_1(seed: u32) -> i32 {
1264
    dirty(seed);
1265
    let v = mkStr(seed);
1266
    let k: *[u8] = "constant";
1267
    let before: [u8; 8] = [0x77; 8];
1268
    let items: [*[u8]; 1] = [v; 1];
1269
    let after: [u8; 8] = [0x77; 8];
1270
    if not allStr(&items[..], v) {
1271
        return 1;
1272
    }
1273
    if not intact(&before[..]) or not intact(&after[..]) {
1274
        return 2;
1275
    }
1276
    dirty(seed);
1277
    let constants: [*[u8]; 1] = ["constant"; 1];
1278
    let behind: [u8; 8] = [0x77; 8];
1279
    if not allStr(&constants[..], k) {
1280
        return 3;
1281
    }
1282
    if not intact(&behind[..]) {
1283
        return 4;
1284
    }
1285
    return 0;
1286
}
1287
1288
/// Fill an array of 3 `Str` elements from a run-time value and from a constant, and check them and
1289
/// their neighbors.
1290
fn fillStr_3(seed: u32) -> i32 {
1291
    dirty(seed);
1292
    let v = mkStr(seed);
1293
    let k: *[u8] = "constant";
1294
    let before: [u8; 8] = [0x77; 8];
1295
    let items: [*[u8]; 3] = [v; 3];
1296
    let after: [u8; 8] = [0x77; 8];
1297
    if not allStr(&items[..], v) {
1298
        return 1;
1299
    }
1300
    if not intact(&before[..]) or not intact(&after[..]) {
1301
        return 2;
1302
    }
1303
    dirty(seed);
1304
    let constants: [*[u8]; 3] = ["constant"; 3];
1305
    let behind: [u8; 8] = [0x77; 8];
1306
    if not allStr(&constants[..], k) {
1307
        return 3;
1308
    }
1309
    if not intact(&behind[..]) {
1310
        return 4;
1311
    }
1312
    return 0;
1313
}
1314
1315
/// Fill an array of 16 `Str` elements from a run-time value and from a constant, and check them and
1316
/// their neighbors.
1317
fn fillStr_16(seed: u32) -> i32 {
1318
    dirty(seed);
1319
    let v = mkStr(seed);
1320
    let k: *[u8] = "constant";
1321
    let before: [u8; 8] = [0x77; 8];
1322
    let items: [*[u8]; 16] = [v; 16];
1323
    let after: [u8; 8] = [0x77; 8];
1324
    if not allStr(&items[..], v) {
1325
        return 1;
1326
    }
1327
    if not intact(&before[..]) or not intact(&after[..]) {
1328
        return 2;
1329
    }
1330
    dirty(seed);
1331
    let constants: [*[u8]; 16] = ["constant"; 16];
1332
    let behind: [u8; 8] = [0x77; 8];
1333
    if not allStr(&constants[..], k) {
1334
        return 3;
1335
    }
1336
    if not intact(&behind[..]) {
1337
        return 4;
1338
    }
1339
    return 0;
1340
}
1341
1342
/// Fill an array of 17 `Str` elements from a run-time value and from a constant, and check them and
1343
/// their neighbors.
1344
fn fillStr_17(seed: u32) -> i32 {
1345
    dirty(seed);
1346
    let v = mkStr(seed);
1347
    let k: *[u8] = "constant";
1348
    let before: [u8; 8] = [0x77; 8];
1349
    let items: [*[u8]; 17] = [v; 17];
1350
    let after: [u8; 8] = [0x77; 8];
1351
    if not allStr(&items[..], v) {
1352
        return 1;
1353
    }
1354
    if not intact(&before[..]) or not intact(&after[..]) {
1355
        return 2;
1356
    }
1357
    dirty(seed);
1358
    let constants: [*[u8]; 17] = ["constant"; 17];
1359
    let behind: [u8; 8] = [0x77; 8];
1360
    if not allStr(&constants[..], k) {
1361
        return 3;
1362
    }
1363
    if not intact(&behind[..]) {
1364
        return 4;
1365
    }
1366
    return 0;
1367
}
1368
1369
/// Fill an array of 32 `Str` elements from a run-time value and from a constant, and check them and
1370
/// their neighbors.
1371
fn fillStr_32(seed: u32) -> i32 {
1372
    dirty(seed);
1373
    let v = mkStr(seed);
1374
    let k: *[u8] = "constant";
1375
    let before: [u8; 8] = [0x77; 8];
1376
    let items: [*[u8]; 32] = [v; 32];
1377
    let after: [u8; 8] = [0x77; 8];
1378
    if not allStr(&items[..], v) {
1379
        return 1;
1380
    }
1381
    if not intact(&before[..]) or not intact(&after[..]) {
1382
        return 2;
1383
    }
1384
    dirty(seed);
1385
    let constants: [*[u8]; 32] = ["constant"; 32];
1386
    let behind: [u8; 8] = [0x77; 8];
1387
    if not allStr(&constants[..], k) {
1388
        return 3;
1389
    }
1390
    if not intact(&behind[..]) {
1391
        return 4;
1392
    }
1393
    return 0;
1394
}
1395
1396
/// Fill an array of 33 `Str` elements from a run-time value and from a constant, and check them and
1397
/// their neighbors.
1398
fn fillStr_33(seed: u32) -> i32 {
1399
    dirty(seed);
1400
    let v = mkStr(seed);
1401
    let k: *[u8] = "constant";
1402
    let before: [u8; 8] = [0x77; 8];
1403
    let items: [*[u8]; 33] = [v; 33];
1404
    let after: [u8; 8] = [0x77; 8];
1405
    if not allStr(&items[..], v) {
1406
        return 1;
1407
    }
1408
    if not intact(&before[..]) or not intact(&after[..]) {
1409
        return 2;
1410
    }
1411
    dirty(seed);
1412
    let constants: [*[u8]; 33] = ["constant"; 33];
1413
    let behind: [u8; 8] = [0x77; 8];
1414
    if not allStr(&constants[..], k) {
1415
        return 3;
1416
    }
1417
    if not intact(&behind[..]) {
1418
        return 4;
1419
    }
1420
    return 0;
1421
}
1422
1423
/// Fill an array of 130 `Str` elements from a run-time value and from a constant, and check them
1424
/// and their neighbors.
1425
fn fillStr_130(seed: u32) -> i32 {
1426
    dirty(seed);
1427
    let v = mkStr(seed);
1428
    let k: *[u8] = "constant";
1429
    let before: [u8; 8] = [0x77; 8];
1430
    let items: [*[u8]; 130] = [v; 130];
1431
    let after: [u8; 8] = [0x77; 8];
1432
    if not allStr(&items[..], v) {
1433
        return 1;
1434
    }
1435
    if not intact(&before[..]) or not intact(&after[..]) {
1436
        return 2;
1437
    }
1438
    dirty(seed);
1439
    let constants: [*[u8]; 130] = ["constant"; 130];
1440
    let behind: [u8; 8] = [0x77; 8];
1441
    if not allStr(&constants[..], k) {
1442
        return 3;
1443
    }
1444
    if not intact(&behind[..]) {
1445
        return 4;
1446
    }
1447
    return 0;
1448
}
1449
1450
/// Check every tested length of `Str`.
1451
fn checkStr(seed: u32) -> i32 {
1452
    let r1 = fillStr_1(seed);
1453
    if r1 <> 0 {
1454
        return 1 * 10 + r1;
1455
    }
1456
    let r3 = fillStr_3(seed);
1457
    if r3 <> 0 {
1458
        return 2 * 10 + r3;
1459
    }
1460
    let r16 = fillStr_16(seed);
1461
    if r16 <> 0 {
1462
        return 3 * 10 + r16;
1463
    }
1464
    let r17 = fillStr_17(seed);
1465
    if r17 <> 0 {
1466
        return 4 * 10 + r17;
1467
    }
1468
    let r32 = fillStr_32(seed);
1469
    if r32 <> 0 {
1470
        return 5 * 10 + r32;
1471
    }
1472
    let r33 = fillStr_33(seed);
1473
    if r33 <> 0 {
1474
        return 6 * 10 + r33;
1475
    }
1476
    let r130 = fillStr_130(seed);
1477
    if r130 <> 0 {
1478
        return 7 * 10 + r130;
1479
    }
1480
    return 0;
1481
}
1482
1483
// OptU32 //
1484
1485
/// Build the repeated value for `seed`.
1486
fn mkOptU32(seed: u32) -> ?u32 {
1487
    return seed + 1;
1488
}
1489
1490
/// Check that every element of `items` equals `v`.
1491
fn allOptU32(items: &[?u32], v: ?u32) -> bool {
1492
    for x in items {
1493
        if x <> v {
1494
            return false;
1495
        }
1496
    }
1497
    return true;
1498
}
1499
1500
/// Fill an array of 1 `OptU32` elements from a run-time value and from a constant, and check them
1501
/// and their neighbors.
1502
fn fillOptU32_1(seed: u32) -> i32 {
1503
    dirty(seed);
1504
    let v = mkOptU32(seed);
1505
    let k: ?u32 = 7;
1506
    let before: [u8; 8] = [0x77; 8];
1507
    let items: [?u32; 1] = [v; 1];
1508
    let after: [u8; 8] = [0x77; 8];
1509
    if not allOptU32(&items[..], v) {
1510
        return 1;
1511
    }
1512
    if not intact(&before[..]) or not intact(&after[..]) {
1513
        return 2;
1514
    }
1515
    dirty(seed);
1516
    let constants: [?u32; 1] = [7; 1];
1517
    let behind: [u8; 8] = [0x77; 8];
1518
    if not allOptU32(&constants[..], k) {
1519
        return 3;
1520
    }
1521
    if not intact(&behind[..]) {
1522
        return 4;
1523
    }
1524
    return 0;
1525
}
1526
1527
/// Fill an array of 3 `OptU32` elements from a run-time value and from a constant, and check them
1528
/// and their neighbors.
1529
fn fillOptU32_3(seed: u32) -> i32 {
1530
    dirty(seed);
1531
    let v = mkOptU32(seed);
1532
    let k: ?u32 = 7;
1533
    let before: [u8; 8] = [0x77; 8];
1534
    let items: [?u32; 3] = [v; 3];
1535
    let after: [u8; 8] = [0x77; 8];
1536
    if not allOptU32(&items[..], v) {
1537
        return 1;
1538
    }
1539
    if not intact(&before[..]) or not intact(&after[..]) {
1540
        return 2;
1541
    }
1542
    dirty(seed);
1543
    let constants: [?u32; 3] = [7; 3];
1544
    let behind: [u8; 8] = [0x77; 8];
1545
    if not allOptU32(&constants[..], k) {
1546
        return 3;
1547
    }
1548
    if not intact(&behind[..]) {
1549
        return 4;
1550
    }
1551
    return 0;
1552
}
1553
1554
/// Fill an array of 16 `OptU32` elements from a run-time value and from a constant, and check them
1555
/// and their neighbors.
1556
fn fillOptU32_16(seed: u32) -> i32 {
1557
    dirty(seed);
1558
    let v = mkOptU32(seed);
1559
    let k: ?u32 = 7;
1560
    let before: [u8; 8] = [0x77; 8];
1561
    let items: [?u32; 16] = [v; 16];
1562
    let after: [u8; 8] = [0x77; 8];
1563
    if not allOptU32(&items[..], v) {
1564
        return 1;
1565
    }
1566
    if not intact(&before[..]) or not intact(&after[..]) {
1567
        return 2;
1568
    }
1569
    dirty(seed);
1570
    let constants: [?u32; 16] = [7; 16];
1571
    let behind: [u8; 8] = [0x77; 8];
1572
    if not allOptU32(&constants[..], k) {
1573
        return 3;
1574
    }
1575
    if not intact(&behind[..]) {
1576
        return 4;
1577
    }
1578
    return 0;
1579
}
1580
1581
/// Fill an array of 17 `OptU32` elements from a run-time value and from a constant, and check them
1582
/// and their neighbors.
1583
fn fillOptU32_17(seed: u32) -> i32 {
1584
    dirty(seed);
1585
    let v = mkOptU32(seed);
1586
    let k: ?u32 = 7;
1587
    let before: [u8; 8] = [0x77; 8];
1588
    let items: [?u32; 17] = [v; 17];
1589
    let after: [u8; 8] = [0x77; 8];
1590
    if not allOptU32(&items[..], v) {
1591
        return 1;
1592
    }
1593
    if not intact(&before[..]) or not intact(&after[..]) {
1594
        return 2;
1595
    }
1596
    dirty(seed);
1597
    let constants: [?u32; 17] = [7; 17];
1598
    let behind: [u8; 8] = [0x77; 8];
1599
    if not allOptU32(&constants[..], k) {
1600
        return 3;
1601
    }
1602
    if not intact(&behind[..]) {
1603
        return 4;
1604
    }
1605
    return 0;
1606
}
1607
1608
/// Fill an array of 32 `OptU32` elements from a run-time value and from a constant, and check them
1609
/// and their neighbors.
1610
fn fillOptU32_32(seed: u32) -> i32 {
1611
    dirty(seed);
1612
    let v = mkOptU32(seed);
1613
    let k: ?u32 = 7;
1614
    let before: [u8; 8] = [0x77; 8];
1615
    let items: [?u32; 32] = [v; 32];
1616
    let after: [u8; 8] = [0x77; 8];
1617
    if not allOptU32(&items[..], v) {
1618
        return 1;
1619
    }
1620
    if not intact(&before[..]) or not intact(&after[..]) {
1621
        return 2;
1622
    }
1623
    dirty(seed);
1624
    let constants: [?u32; 32] = [7; 32];
1625
    let behind: [u8; 8] = [0x77; 8];
1626
    if not allOptU32(&constants[..], k) {
1627
        return 3;
1628
    }
1629
    if not intact(&behind[..]) {
1630
        return 4;
1631
    }
1632
    return 0;
1633
}
1634
1635
/// Fill an array of 33 `OptU32` elements from a run-time value and from a constant, and check them
1636
/// and their neighbors.
1637
fn fillOptU32_33(seed: u32) -> i32 {
1638
    dirty(seed);
1639
    let v = mkOptU32(seed);
1640
    let k: ?u32 = 7;
1641
    let before: [u8; 8] = [0x77; 8];
1642
    let items: [?u32; 33] = [v; 33];
1643
    let after: [u8; 8] = [0x77; 8];
1644
    if not allOptU32(&items[..], v) {
1645
        return 1;
1646
    }
1647
    if not intact(&before[..]) or not intact(&after[..]) {
1648
        return 2;
1649
    }
1650
    dirty(seed);
1651
    let constants: [?u32; 33] = [7; 33];
1652
    let behind: [u8; 8] = [0x77; 8];
1653
    if not allOptU32(&constants[..], k) {
1654
        return 3;
1655
    }
1656
    if not intact(&behind[..]) {
1657
        return 4;
1658
    }
1659
    return 0;
1660
}
1661
1662
/// Fill an array of 130 `OptU32` elements from a run-time value and from a constant, and check them
1663
/// and their neighbors.
1664
fn fillOptU32_130(seed: u32) -> i32 {
1665
    dirty(seed);
1666
    let v = mkOptU32(seed);
1667
    let k: ?u32 = 7;
1668
    let before: [u8; 8] = [0x77; 8];
1669
    let items: [?u32; 130] = [v; 130];
1670
    let after: [u8; 8] = [0x77; 8];
1671
    if not allOptU32(&items[..], v) {
1672
        return 1;
1673
    }
1674
    if not intact(&before[..]) or not intact(&after[..]) {
1675
        return 2;
1676
    }
1677
    dirty(seed);
1678
    let constants: [?u32; 130] = [7; 130];
1679
    let behind: [u8; 8] = [0x77; 8];
1680
    if not allOptU32(&constants[..], k) {
1681
        return 3;
1682
    }
1683
    if not intact(&behind[..]) {
1684
        return 4;
1685
    }
1686
    return 0;
1687
}
1688
1689
/// Check every tested length of `OptU32`.
1690
fn checkOptU32(seed: u32) -> i32 {
1691
    let r1 = fillOptU32_1(seed);
1692
    if r1 <> 0 {
1693
        return 1 * 10 + r1;
1694
    }
1695
    let r3 = fillOptU32_3(seed);
1696
    if r3 <> 0 {
1697
        return 2 * 10 + r3;
1698
    }
1699
    let r16 = fillOptU32_16(seed);
1700
    if r16 <> 0 {
1701
        return 3 * 10 + r16;
1702
    }
1703
    let r17 = fillOptU32_17(seed);
1704
    if r17 <> 0 {
1705
        return 4 * 10 + r17;
1706
    }
1707
    let r32 = fillOptU32_32(seed);
1708
    if r32 <> 0 {
1709
        return 5 * 10 + r32;
1710
    }
1711
    let r33 = fillOptU32_33(seed);
1712
    if r33 <> 0 {
1713
        return 6 * 10 + r33;
1714
    }
1715
    let r130 = fillOptU32_130(seed);
1716
    if r130 <> 0 {
1717
        return 7 * 10 + r130;
1718
    }
1719
    return 0;
1720
}
1721
1722
// Wide //
1723
1724
/// Build the repeated value for `seed`.
1725
fn mkWide(seed: u32) -> Wide {
1726
    let mut w = Wide { f: [0; 14] };
1727
    for i in 0 .. 14 {
1728
        set w.f[i] = seed as u64 * 100 + i;
1729
    }
1730
    return w;
1731
}
1732
1733
/// Check that every element of `items` equals `v`.
1734
fn allWide(items: &[Wide], v: Wide) -> bool {
1735
    for x in items {
1736
        for i in 0 .. 14 {
1737
            if x.f[i] <> v.f[i] {
1738
                return false;
1739
            }
1740
        }
1741
    }
1742
    return true;
1743
}
1744
1745
/// Fill an array of 1 `Wide` elements from a run-time value and from a constant, and check them and
1746
/// their neighbors.
1747
fn fillWide_1(seed: u32) -> i32 {
1748
    dirty(seed);
1749
    let v = mkWide(seed);
1750
    let k: Wide = Wide { f: [3; 14] };
1751
    let before: [u8; 8] = [0x77; 8];
1752
    let items: [Wide; 1] = [v; 1];
1753
    let after: [u8; 8] = [0x77; 8];
1754
    if not allWide(&items[..], v) {
1755
        return 1;
1756
    }
1757
    if not intact(&before[..]) or not intact(&after[..]) {
1758
        return 2;
1759
    }
1760
    dirty(seed);
1761
    let constants: [Wide; 1] = [Wide { f: [3; 14] }; 1];
1762
    let behind: [u8; 8] = [0x77; 8];
1763
    if not allWide(&constants[..], k) {
1764
        return 3;
1765
    }
1766
    if not intact(&behind[..]) {
1767
        return 4;
1768
    }
1769
    return 0;
1770
}
1771
1772
/// Fill an array of 3 `Wide` elements from a run-time value and from a constant, and check them and
1773
/// their neighbors.
1774
fn fillWide_3(seed: u32) -> i32 {
1775
    dirty(seed);
1776
    let v = mkWide(seed);
1777
    let k: Wide = Wide { f: [3; 14] };
1778
    let before: [u8; 8] = [0x77; 8];
1779
    let items: [Wide; 3] = [v; 3];
1780
    let after: [u8; 8] = [0x77; 8];
1781
    if not allWide(&items[..], v) {
1782
        return 1;
1783
    }
1784
    if not intact(&before[..]) or not intact(&after[..]) {
1785
        return 2;
1786
    }
1787
    dirty(seed);
1788
    let constants: [Wide; 3] = [Wide { f: [3; 14] }; 3];
1789
    let behind: [u8; 8] = [0x77; 8];
1790
    if not allWide(&constants[..], k) {
1791
        return 3;
1792
    }
1793
    if not intact(&behind[..]) {
1794
        return 4;
1795
    }
1796
    return 0;
1797
}
1798
1799
/// Fill an array of 16 `Wide` elements from a run-time value and from a constant, and check them
1800
/// and their neighbors.
1801
fn fillWide_16(seed: u32) -> i32 {
1802
    dirty(seed);
1803
    let v = mkWide(seed);
1804
    let k: Wide = Wide { f: [3; 14] };
1805
    let before: [u8; 8] = [0x77; 8];
1806
    let items: [Wide; 16] = [v; 16];
1807
    let after: [u8; 8] = [0x77; 8];
1808
    if not allWide(&items[..], v) {
1809
        return 1;
1810
    }
1811
    if not intact(&before[..]) or not intact(&after[..]) {
1812
        return 2;
1813
    }
1814
    dirty(seed);
1815
    let constants: [Wide; 16] = [Wide { f: [3; 14] }; 16];
1816
    let behind: [u8; 8] = [0x77; 8];
1817
    if not allWide(&constants[..], k) {
1818
        return 3;
1819
    }
1820
    if not intact(&behind[..]) {
1821
        return 4;
1822
    }
1823
    return 0;
1824
}
1825
1826
/// Fill an array of 17 `Wide` elements from a run-time value and from a constant, and check them
1827
/// and their neighbors.
1828
fn fillWide_17(seed: u32) -> i32 {
1829
    dirty(seed);
1830
    let v = mkWide(seed);
1831
    let k: Wide = Wide { f: [3; 14] };
1832
    let before: [u8; 8] = [0x77; 8];
1833
    let items: [Wide; 17] = [v; 17];
1834
    let after: [u8; 8] = [0x77; 8];
1835
    if not allWide(&items[..], v) {
1836
        return 1;
1837
    }
1838
    if not intact(&before[..]) or not intact(&after[..]) {
1839
        return 2;
1840
    }
1841
    dirty(seed);
1842
    let constants: [Wide; 17] = [Wide { f: [3; 14] }; 17];
1843
    let behind: [u8; 8] = [0x77; 8];
1844
    if not allWide(&constants[..], k) {
1845
        return 3;
1846
    }
1847
    if not intact(&behind[..]) {
1848
        return 4;
1849
    }
1850
    return 0;
1851
}
1852
1853
/// Fill an array of 32 `Wide` elements from a run-time value and from a constant, and check them
1854
/// and their neighbors.
1855
fn fillWide_32(seed: u32) -> i32 {
1856
    dirty(seed);
1857
    let v = mkWide(seed);
1858
    let k: Wide = Wide { f: [3; 14] };
1859
    let before: [u8; 8] = [0x77; 8];
1860
    let items: [Wide; 32] = [v; 32];
1861
    let after: [u8; 8] = [0x77; 8];
1862
    if not allWide(&items[..], v) {
1863
        return 1;
1864
    }
1865
    if not intact(&before[..]) or not intact(&after[..]) {
1866
        return 2;
1867
    }
1868
    dirty(seed);
1869
    let constants: [Wide; 32] = [Wide { f: [3; 14] }; 32];
1870
    let behind: [u8; 8] = [0x77; 8];
1871
    if not allWide(&constants[..], k) {
1872
        return 3;
1873
    }
1874
    if not intact(&behind[..]) {
1875
        return 4;
1876
    }
1877
    return 0;
1878
}
1879
1880
/// Fill an array of 33 `Wide` elements from a run-time value and from a constant, and check them
1881
/// and their neighbors.
1882
fn fillWide_33(seed: u32) -> i32 {
1883
    dirty(seed);
1884
    let v = mkWide(seed);
1885
    let k: Wide = Wide { f: [3; 14] };
1886
    let before: [u8; 8] = [0x77; 8];
1887
    let items: [Wide; 33] = [v; 33];
1888
    let after: [u8; 8] = [0x77; 8];
1889
    if not allWide(&items[..], v) {
1890
        return 1;
1891
    }
1892
    if not intact(&before[..]) or not intact(&after[..]) {
1893
        return 2;
1894
    }
1895
    dirty(seed);
1896
    let constants: [Wide; 33] = [Wide { f: [3; 14] }; 33];
1897
    let behind: [u8; 8] = [0x77; 8];
1898
    if not allWide(&constants[..], k) {
1899
        return 3;
1900
    }
1901
    if not intact(&behind[..]) {
1902
        return 4;
1903
    }
1904
    return 0;
1905
}
1906
1907
/// Fill an array of 130 `Wide` elements from a run-time value and from a constant, and check them
1908
/// and their neighbors.
1909
fn fillWide_130(seed: u32) -> i32 {
1910
    dirty(seed);
1911
    let v = mkWide(seed);
1912
    let k: Wide = Wide { f: [3; 14] };
1913
    let before: [u8; 8] = [0x77; 8];
1914
    let items: [Wide; 130] = [v; 130];
1915
    let after: [u8; 8] = [0x77; 8];
1916
    if not allWide(&items[..], v) {
1917
        return 1;
1918
    }
1919
    if not intact(&before[..]) or not intact(&after[..]) {
1920
        return 2;
1921
    }
1922
    dirty(seed);
1923
    let constants: [Wide; 130] = [Wide { f: [3; 14] }; 130];
1924
    let behind: [u8; 8] = [0x77; 8];
1925
    if not allWide(&constants[..], k) {
1926
        return 3;
1927
    }
1928
    if not intact(&behind[..]) {
1929
        return 4;
1930
    }
1931
    return 0;
1932
}
1933
1934
/// Check every tested length of `Wide`.
1935
fn checkWide(seed: u32) -> i32 {
1936
    let r1 = fillWide_1(seed);
1937
    if r1 <> 0 {
1938
        return 1 * 10 + r1;
1939
    }
1940
    let r3 = fillWide_3(seed);
1941
    if r3 <> 0 {
1942
        return 2 * 10 + r3;
1943
    }
1944
    let r16 = fillWide_16(seed);
1945
    if r16 <> 0 {
1946
        return 3 * 10 + r16;
1947
    }
1948
    let r17 = fillWide_17(seed);
1949
    if r17 <> 0 {
1950
        return 4 * 10 + r17;
1951
    }
1952
    let r32 = fillWide_32(seed);
1953
    if r32 <> 0 {
1954
        return 5 * 10 + r32;
1955
    }
1956
    let r33 = fillWide_33(seed);
1957
    if r33 <> 0 {
1958
        return 6 * 10 + r33;
1959
    }
1960
    let r130 = fillWide_130(seed);
1961
    if r130 <> 0 {
1962
        return 7 * 10 + r130;
1963
    }
1964
    return 0;
1965
}
1966
1967
// Nested repeat literals //
1968
1969
/// Check nested repeat literals of scalars and records.
1970
fn checkNested(seed: u32) -> i32 {
1971
    dirty(seed);
1972
    let b = (seed + 1) as u8;
1973
    let bytes: [[u8; 3]; 40] = [[b; 3]; 40];
1974
    for i in 0 .. 40 {
1975
        for j in 0 .. 3 {
1976
            if bytes[i][j] <> b {
1977
                return 1;
1978
            }
1979
        }
1980
    }
1981
    let p = Pair { a: seed, b: seed + 1 };
1982
    let pairs: [[Pair; 2]; 20] = [[p; 2]; 20];
1983
    for i in 0 .. 20 {
1984
        for j in 0 .. 2 {
1985
            if pairs[i][j].a <> seed or pairs[i][j].b <> seed + 1 {
1986
                return 2;
1987
            }
1988
        }
1989
    }
1990
    let wide: [[u32; 33]; 3] = [[seed; 33]; 3];
1991
    for i in 0 .. 3 {
1992
        for j in 0 .. 33 {
1993
            if wide[i][j] <> seed {
1994
                return 3;
1995
            }
1996
        }
1997
    }
1998
    let deep: [[[u8; 2]; 17]; 9] = [[[b; 2]; 17]; 9];
1999
    for i in 0 .. 9 {
2000
        for j in 0 .. 17 {
2001
            for k in 0 .. 2 {
2002
                if deep[i][j][k] <> b {
2003
                    return 4;
2004
                }
2005
            }
2006
        }
2007
    }
2008
    let optionals: [[?u32; 3]; 24] = [[seed; 3]; 24];
2009
    for i in 0 .. 24 {
2010
        for j in 0 .. 3 {
2011
            if optionals[i][j] <> seed {
2012
                return 5;
2013
            }
2014
        }
2015
    }
2016
    let absent: [?u32; 40] = [nil; 40];
2017
    for i in 0 .. 40 {
2018
        if absent[i] <> nil {
2019
            return 6;
2020
        }
2021
    }
2022
    return 0;
2023
}
2024
2025
/// Record with an array between two words.
2026
record Frame: Copy {
2027
    /// Word before the array.
2028
    head: u64,
2029
    /// Repeated items.
2030
    items: [Pair; 40],
2031
    /// Word after the array.
2032
    tail: u64,
2033
}
2034
2035
/// Check a repeat literal in a record literal and in an assignment.
2036
fn checkFrame(seed: u32) -> i32 {
2037
    dirty(seed);
2038
    let p = Pair { a: seed, b: 7 };
2039
    let mut f = Frame { head: 0x1111, items: [p; 40], tail: 0x2222 };
2040
    if f.head <> 0x1111 or f.tail <> 0x2222 {
2041
        return 1;
2042
    }
2043
    for i in 0 .. 40 {
2044
        if f.items[i].a <> seed or f.items[i].b <> 7 {
2045
            return 2;
2046
        }
2047
    }
2048
    set f.items = [Pair { a: 3, b: seed }; 40];
2049
    if f.head <> 0x1111 or f.tail <> 0x2222 {
2050
        return 3;
2051
    }
2052
    for i in 0 .. 40 {
2053
        if f.items[i].a <> 3 or f.items[i].b <> seed {
2054
            return 4;
2055
        }
2056
    }
2057
    return 0;
2058
}
2059
2060
@default unsafe fn main() -> i32 {
2061
    for seed in 0 .. 3 {
2062
        let rU8 = checkU8(seed);
2063
        if rU8 <> 0 {
2064
            return 100 + rU8;
2065
        }
2066
        let rU32 = checkU32(seed);
2067
        if rU32 <> 0 {
2068
            return 200 + rU32;
2069
        }
2070
        let rU64 = checkU64(seed);
2071
        if rU64 <> 0 {
2072
            return 300 + rU64;
2073
        }
2074
        let rPair = checkPair(seed);
2075
        if rPair <> 0 {
2076
            return 400 + rPair;
2077
        }
2078
        let rRgb = checkRgb(seed);
2079
        if rRgb <> 0 {
2080
            return 500 + rRgb;
2081
        }
2082
        let rStr = checkStr(seed);
2083
        if rStr <> 0 {
2084
            return 600 + rStr;
2085
        }
2086
        let rOpt = checkOptU32(seed);
2087
        if rOpt <> 0 {
2088
            return 700 + rOpt;
2089
        }
2090
        let rWide = checkWide(seed);
2091
        if rWide <> 0 {
2092
            return 800 + rWide;
2093
        }
2094
        let rNested = checkNested(seed);
2095
        if rNested <> 0 {
2096
            return 900 + rNested;
2097
        }
2098
        let rFrame = checkFrame(seed);
2099
        if rFrame <> 0 {
2100
            return 1000 + rFrame;
2101
        }
2102
    }
2103
    let loose: [u32; 100] = [undefined; 100];
2104
    return 0;
2105
}