mixin optionButton(bind, isActive, text, title) .button-checkbox button(type="button" class="dropdown-item btn btn-sm btn-light" + (isActive ? "active" : "") title=title data-bind=bind aria-pressed=isActive ? "true" : "false") span #{text} input.d-none(type="checkbox" checked=isActive) #gccdump .top-bar.btn-toolbar.bg-light(role="toolbar") include ../../font-size .btn-group.btn-group-sm(role="group") select.gccdump-pass-picker(placeholder="Select a pass...") .btn-group.btn-group-sm.dump-filters button.btn.btn-sm.btn-light.dropdown-toggle(type="button" title="Dump passes" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Available dump passes") span.fas.fa-compass span.hideable Passes .dropdown-menu +optionButton("treeDump", true, "Tree Pass", "Show Tree passes") +optionButton("rtlDump", true, "RTL Pass", "Show RTL passes") +optionButton("ipaDump", true, "IPA Pass", "Show IPA passes") .btn-group.btn-group-sm.dump-filters button.btn.btn-sm.btn-light.dropdown-toggle(type="button" title="Dump pass options" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Control the details of the dump") span.fas.fa-microchip span.hideable Options .dropdown-menu +optionButton("rawOption", false, "Raw Dump", "Print raw representation of the tree") +optionButton("slimOption", false, "Slim Dump", "Print condensed intermediate representations") div.dropdown-divider +optionButton("allOption", false, "All Options", "Turn on all options (except raw, slim and lineno)") // This addresses one was marked as aria-pressed=true, but not checked. What should its default state be then? Set to false for now +optionButton("gimpleFeOption", false, "GIMPLE Frontend Syntax", "Dump syntax that the GIMPLE frontend can accept") +optionButton("addressOption", false, "Addresses", "Print the address of each tree node") +optionButton("blocksOption", false, "Basic Blocks", "Show the basic block boundaries (disabled in raw dumps)") +optionButton("linenoOption", false, "Line Numbers", "Show line numbers") +optionButton("detailsOption", false, "Pass Details", "Enable more detailed dumps (not honored by every dump option)") +optionButton("statsOption", false, "Pass Stats", "Dump statistics (not honored by every dump option)") +optionButton("uidOption", false, "Unique IDs", "Show variable UIDs") +optionButton("vopsOption", false, "Virtual Operands", "Show virtual operands") .monaco-placeholder