Repository navigation
Conversation
…son at its manifests mink 6b8c86f is mink dev after #611, on std b05d073 with std.args.
asm.read reads source into an assembler's builder, so a caller that lists the builder after finishing it keeps it. asm.assemble reads through it.
each command is one CommandSpec and its run in one table, the set made from it with the registered sets' mode flags joined to the commands that take them. help pages come from std.args.help, so masc.tool.help goes. listing, inline and walk are new commands, so the program reaches emit, listing, inline and walk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #555
What
masc's command line moves onto std.args
CommandSpec, on mink 6b8c86f (mink dev after #611) and std b05d073.dep/minkandgen/dep/minkat 6b8c86f, with std b05d073, yaml 72b442c, deflate 9ac36c2 and zstd ce66726 as that mink pins them, in the root and in gen, and gen's json at 06e7b03.src/cli/cmdsexports oneSPEC: args.CommandSpecand itsrun.src/cli/masc.machholds one command table (spec, whether it takes the sets' mode flags, run) and builds theCommandSetfrom it. The line is read withargs.parse, refusals are worded byargs.describe, pages are rendered bystd.args.help, and dispatch finds the table row of the spec the invocation names. No argument parsing is left insrc/cliorsrc/bin/masc.mach.masc.tool.helpis gone, replaced bystd.args.help.render.MEANINGSbecomesrender.EXITS, the set'sargs.Exitrows.listing(emit.listing over the builder),inline(inline.parse and inline.encode, operands resolved through emit.registers) andwalk(walk.check).emit.emitis reached throughregistersandspell.asm.readis split out ofasm.assemble, solistingkeeps the assembler's builder pastfinishto list it.Decisions
-a,-o,-vand-hare alias rows of--arch,--output,--verboseand--help, per std.args' one spelling per row.--help/-hare the set's common table, and--helpin the command word's place is a global of thehelpcommand.error[cli.line]: <args.describe's sentence>.inlinedeclares each operand with--operand <name>=<register>(collect): the register's class is its constraint, the register its location, its role read-write. The block is encoded at the start of the dialect's first section through the assembler's builder and written with-o.walktakes--symbol <name>(placed, sized) and--secret <register>(collect), and reports clear, unguaranteed (with ct's warning), refused (worded byct.spell) or unread, at the function offset.Consumer changes
masc's own command line only. The commands and flags mirl and mach can call:
masc assemble <input> --arch <arch> -o <path> [--isa] [--syntax] [--abi] [--format] [-v] [mode flags]masc disassemble <input> --arch <arch> [--isa] [--syntax] [--[no-]aliases] [-o] [-v]masc listing <input> --arch <arch> [--isa] [--syntax] [--abi] [--format] [-o] [-v] [mode flags](new)masc inline <input> --arch <arch> -o <path> [--operand name=register]... [--isa] [--syntax] [--abi] [--format] [-v](new)masc walk <input> --arch <arch> --symbol <name> [--secret register]... [--isa] [--syntax](new)masc targets,masc help [command],--help/-hon every commandLibrary:
masc.tool.helpis removed (internal, not forwarded).asm.readis new (internal).None of mink's consumer changes (
link.command.parse,Commandfields,--state) reach masc, which never called mink's link command.sink.writerandfile.writtencarry the help page and the usage refusal into masc's text.Notes
walkexposes no memory, frame or symbol seeds, declassify points, call models or fixup sites, so a symbol-addressed access is placed as any other and every call takes the conservative rule.inlineprints no footprint (inline.effects), since masc has no footprint renderer.machd check . -a '*'andmachd build . -a mascon linux-x86_64 (the program artifact ismasc, notcli),machd fmt ., and a smoke run of assemble, listing, inline, disassemble and walk on x86_64 elf.