cap-lab22-samy/docs/searchindex.js
2022-10-04 20:43:34 +02:00

1 line
11 KiB
JavaScript

Search.setIndex({"docnames": ["api/Lib", "api/Lib.Allocator", "api/Lib.Errors", "api/Lib.FunctionData", "api/Lib.LinearCode", "api/Lib.Operands", "api/Lib.RiscV", "api/Lib.Statement", "api/modules", "index"], "filenames": ["api/Lib.rst", "api/Lib.Allocator.rst", "api/Lib.Errors.rst", "api/Lib.FunctionData.rst", "api/Lib.LinearCode.rst", "api/Lib.Operands.rst", "api/Lib.RiscV.rst", "api/Lib.Statement.rst", "api/modules.rst", "index.rst"], "titles": ["Lib package", "Lib.Allocator module", "Lib.Errors module", "Lib.FunctionData module", "Lib.LinearCode module", "Lib.Operands module", "Lib.RiscV module", "Lib.Statement module", "MiniC", "Welcome to MiniC\u2019s documentation!"], "terms": {"alloc": [0, 4, 5, 8], "error": [0, 8, 9], "functiondata": [0, 1, 4, 8], "linearcod": [0, 1, 3, 8, 9], "operand": [0, 1, 3, 6, 7, 8, 9], "riscv": [0, 3, 4, 5, 7, 8, 9], "statement": [0, 4, 8, 9], "thi": [1, 3, 4, 5, 6], "file": [1, 3, 4, 5], "defin": [1, 3, 5, 6, 7, 9], "base": [1, 2, 3, 4, 5, 7], "class": [1, 3, 4, 5, 7, 9], "na\u00efv": 1, "implement": [1, 9], "naivealloc": 1, "fdata": [1, 3, 4], "sourc": [1, 2, 3, 4, 5, 6, 7, 9], "object": [1, 3, 4, 5, 7, 9], "gener": [1, 4], "naiv": [1, 9], "allinmem": 1, "smart": 1, "replac": [1, 4, 5], "all": [1, 5, 9], "temporari": [1, 3, 4, 5], "code": [1, 4, 6, 9], "actual": [1, 5], "data": [1, 5, 9], "locat": [1, 5, 7], "i": [1, 3, 4, 5, 6, 7], "done": 1, "two": 1, "step": 1, "first": [1, 7], "prepar": 1, "respons": 1, "call": [1, 4, 5, 6, 7], "temporarypool": [1, 3, 5], "set_temp_alloc": [1, 5], "map": [1, 5], "from": [1, 5, 7], "where": 1, "thei": 1, "should": [1, 7, 9], "store": [1, 3], "regist": [1, 5], "memori": [1, 3, 5, 9], "Then": 1, "each": [1, 4], "instruct": [1, 4, 6, 7, 9], "order": 1, "previous": 1, "assign": 1, "possibli": 1, "add": [1, 4, 5, 6], "some": [1, 3, 4], "befor": [1, 9], "after": 1, "concret": 1, "return": [1, 3, 4, 5], "list": [1, 4, 5, 7, 9], "origin": 1, "The": [1, 4, 5, 7, 9], "iter": [1, 4], "over": [1, 4], "handl": 1, "transpar": 1, "iter_stat": [1, 4], "none": [1, 4, 5, 7], "instr": 1, "transform": 1, "an": [1, 4, 7], "rewritecod": 1, "listcod": 1, "modifi": 1, "try": 1, "fail": 1, "ar": [1, 3, 5, 7], "more": 1, "than": [1, 5], "too": 1, "mani": 1, "old_instr": 1, "correspond": 1, "except": 2, "allocationerror": 2, "minicinternalerror": 2, "minicruntimeerror": 2, "minictypeerror": 2, "minicunsupportederror": 2, "contain": [3, 4], "metadata": 3, "function": [3, 4, 5, 6, 7, 9], "well": 3, "util": [3, 4, 7], "common": 3, "differ": [3, 5], "intermedi": 3, "represent": [3, 4], "name": [3, 4, 5, 7], "str": [3, 4, 5, 7], "label": [3, 4, 6, 7, 9], "variabl": [3, 4], "us": [3, 7], "div_by_zero": 3, "usual": 3, "indirectli": 3, "through": 3, "we": [3, 5, 9], "work": [3, 9], "fresh_label": 3, "new": [3, 4, 5], "uniqu": 3, "given": [3, 4], "string": [3, 5], "fresh_offset": 3, "offset": [3, 5], "stack": 3, "decreas": 3, "rel": 3, "fp": 3, "fresh_tmp": [3, 5], "fresh": [3, 5], "which": [3, 4, 5, 7], "ad": 3, "pool": [3, 5], "get_label_div_by_zero": 3, "get_nam": 3, "get_offset": [3, 5], "int": [3, 5], "current": 3, "cap": [4, 6], "codegener": [4, 6], "api": [4, 6], "linear": 4, "program": 4, "add_instruct": 4, "repeatedli": 4, "codegen": 4, "visitor": 4, "build": [4, 5], "complet": 4, "member": 4, "meta": 4, "inform": 4, "instanc": 4, "see": 4, "For": 4, "debug": 4, "purpos": 4, "print_cod": 4, "allow": [4, 5, 9], "print": [4, 7], "add_com": 4, "": [4, 5], "comment": [4, 7], "instru3a": [4, 6, 7], "absolutejump": [4, 6, 7], "conditionaljump": [4, 7], "also": [4, 5], "relev": 4, "add_instruction_println_int": 4, "reg": 4, "dataloc": [4, 5], "integ": [4, 5], "valu": [4, 5], "newlin": 4, "expand": 4, "add_label": 4, "get_instruct": 4, "f": 4, "real": 4, "must": [4, 5], "either": [4, 5], "If": 4, "noth": 4, "happen": 4, "output": [4, 7], "text": 4, "path": 4, "print_dot": 4, "filenam": 4, "df": 4, "view": 4, "fals": 4, "graph": 4, "its": [5, 7], "subclass": 5, "condit": [5, 6, 7], "itself": 5, "ha": 5, "address": [5, 7, 9], "immedi": [5, 6], "constant": 5, "yet": 5, "shortcut": 5, "optyp": 5, "e": 5, "comparison": 5, "condjump": 5, "exampl": 5, "usag": 5, "beq": [5, 6], "branch": [5, 7], "equal": 5, "minicpars": [5, 6], "lt": 5, "lower": 5, "constructor": 5, "argument": [5, 9], "shall": 5, "all_op": 5, "oper": 5, "gt": 5, "one": 5, "kei": 5, "opdict": 5, "A": [5, 7], "negat": 5, "method": 5, "get": 5, "opposit": 5, "place": 5, "val": 5, "basereg": 5, "comput": 5, "number": 5, "physic": 5, "renam": [5, 7], "manag": 5, "copi": 5, "give": [5, 9], "t": [5, 9], "bool": 5, "true": [5, 7], "been": 5, "It": [5, 7], "later": 5, "get_alloced_loc": 5, "add_tmp": 5, "get_all_temp": 5, "dict": [5, 7], "other": [5, 7], "typic": 5, "type": 5, "enforc": 5, "check": 5, "inde": 5, "mif08": 6, "dr": 6, "sr1": 6, "sr2orimm7": 6, "conditional_jump": 6, "op1": [6, 7], "cond": [6, 7], "op2": [6, 7], "jump": [6, 7], "wrapper": 6, "around": 6, "bge": 6, "bgt": 6, "c": 6, "like": 6, "eq": 6, "div": 6, "uncondit": 6, "land": 6, "ld": 6, "mem": 6, "li": 6, "imm7": 6, "lor": 6, "mul": 6, "mv": 6, "sr": 6, "rem": 6, "sd": 6, "sub": 6, "xor": 6, "asm": 7, "inherit": 7, "In": 7, "turn": 7, "regular": 7, "non": 7, "3": [7, 9], "absolut": 7, "specif": 7, "kind": [7, 9], "arg": 7, "ins": 7, "j": 7, "substitut": 7, "subst": 7, "target": 7, "printin": 7, "stream": 7, "never": 7, "is_read_onli": 7, "onli": 7, "read": 7, "otherwis": 7, "consid": 7, "destin": 7, "both": 7, "tstatement": 7, "regset_to_str": 7, "registerset": 7, "pretti": 7, "set": 7, "lib": [8, 9], "packag": 8, "submodul": 8, "modul": [8, 9], "content": 8, "risc": 9, "v": 9, "These": 9, "page": 9, "variou": 9, "python": 9, "folder": 9, "you": 9, "have": 9, "edit": 9, "them": 9, "repres": 9, "assembli": 9, "won": 9, "creat": 9, "directli": 9, "veri": 9, "often": 9, "instead": 9, "easili": 9, "standard": 9, "pseudo": 9, "take": 9, "model": 9, "lab": 9, "4a": 9, "understand": 9, "index": 9, "search": 9}, "objects": {"": [[0, 0, 0, "-", "Lib"]], "Lib": [[1, 0, 0, "-", "Allocator"], [2, 0, 0, "-", "Errors"], [3, 0, 0, "-", "FunctionData"], [4, 0, 0, "-", "LinearCode"], [5, 0, 0, "-", "Operands"], [6, 0, 0, "-", "RiscV"], [7, 0, 0, "-", "Statement"]], "Lib.Allocator": [[1, 1, 1, "", "Allocator"], [1, 1, 1, "", "NaiveAllocator"]], "Lib.Allocator.Allocator": [[1, 2, 1, "", "prepare"], [1, 2, 1, "", "replace"], [1, 2, 1, "", "rewriteCode"]], "Lib.Allocator.NaiveAllocator": [[1, 2, 1, "", "prepare"], [1, 2, 1, "", "replace"]], "Lib.Errors": [[2, 3, 1, "", "AllocationError"], [2, 3, 1, "", "MiniCInternalError"], [2, 3, 1, "", "MiniCRuntimeError"], [2, 3, 1, "", "MiniCTypeError"], [2, 3, 1, "", "MiniCUnsupportedError"]], "Lib.FunctionData": [[3, 1, 1, "", "FunctionData"]], "Lib.FunctionData.FunctionData": [[3, 2, 1, "", "fresh_label"], [3, 2, 1, "", "fresh_offset"], [3, 2, 1, "", "fresh_tmp"], [3, 2, 1, "", "get_label_div_by_zero"], [3, 2, 1, "", "get_name"], [3, 2, 1, "", "get_offset"]], "Lib.LinearCode": [[4, 1, 1, "", "LinearCode"]], "Lib.LinearCode.LinearCode": [[4, 2, 1, "", "add_comment"], [4, 2, 1, "", "add_instruction"], [4, 2, 1, "", "add_instruction_PRINTLN_INT"], [4, 2, 1, "", "add_label"], [4, 4, 1, "", "fdata"], [4, 2, 1, "", "get_instructions"], [4, 2, 1, "", "iter_statements"], [4, 2, 1, "", "print_code"], [4, 2, 1, "", "print_dot"]], "Lib.Operands": [[5, 1, 1, "", "Condition"], [5, 1, 1, "", "DataLocation"], [5, 1, 1, "", "Function"], [5, 1, 1, "", "Immediate"], [5, 1, 1, "", "Offset"], [5, 1, 1, "", "Operand"], [5, 1, 1, "", "Register"], [5, 1, 1, "", "Renamer"], [5, 1, 1, "", "Temporary"], [5, 1, 1, "", "TemporaryPool"]], "Lib.Operands.Condition": [[5, 2, 1, "", "negate"]], "Lib.Operands.Offset": [[5, 2, 1, "", "get_offset"]], "Lib.Operands.Renamer": [[5, 2, 1, "", "copy"], [5, 2, 1, "", "defined"], [5, 2, 1, "", "fresh"], [5, 2, 1, "", "replace"]], "Lib.Operands.Temporary": [[5, 2, 1, "", "get_alloced_loc"]], "Lib.Operands.TemporaryPool": [[5, 2, 1, "", "add_tmp"], [5, 2, 1, "", "fresh_tmp"], [5, 2, 1, "", "get_all_temps"], [5, 2, 1, "", "get_alloced_loc"], [5, 2, 1, "", "set_temp_allocation"]], "Lib.RiscV": [[6, 5, 1, "", "add"], [6, 5, 1, "", "call"], [6, 5, 1, "", "conditional_jump"], [6, 5, 1, "", "div"], [6, 5, 1, "", "jump"], [6, 5, 1, "", "land"], [6, 5, 1, "", "ld"], [6, 5, 1, "", "li"], [6, 5, 1, "", "lor"], [6, 5, 1, "", "mul"], [6, 5, 1, "", "mv"], [6, 5, 1, "", "rem"], [6, 5, 1, "", "sd"], [6, 5, 1, "", "sub"], [6, 5, 1, "", "xor"]], "Lib.Statement": [[7, 1, 1, "", "AbsoluteJump"], [7, 1, 1, "", "Comment"], [7, 1, 1, "", "ConditionalJump"], [7, 1, 1, "", "Instru3A"], [7, 1, 1, "", "Instruction"], [7, 1, 1, "", "Label"], [7, 1, 1, "", "Statement"], [7, 5, 1, "", "regset_to_string"]], "Lib.Statement.AbsoluteJump": [[7, 2, 1, "", "args"], [7, 4, 1, "", "ins"], [7, 4, 1, "", "label"], [7, 2, 1, "", "rename"], [7, 2, 1, "", "substitute"], [7, 2, 1, "", "targets"]], "Lib.Statement.Comment": [[7, 4, 1, "", "comment"], [7, 2, 1, "", "printIns"]], "Lib.Statement.ConditionalJump": [[7, 2, 1, "", "args"], [7, 4, 1, "", "cond"], [7, 4, 1, "", "label"], [7, 4, 1, "", "op1"], [7, 4, 1, "", "op2"], [7, 2, 1, "", "rename"], [7, 2, 1, "", "substitute"]], "Lib.Statement.Instru3A": [[7, 2, 1, "", "args"], [7, 2, 1, "", "rename"], [7, 2, 1, "", "substitute"]], "Lib.Statement.Instruction": [[7, 2, 1, "", "args"], [7, 2, 1, "", "defined"], [7, 4, 1, "", "ins"], [7, 2, 1, "", "is_read_only"], [7, 2, 1, "", "printIns"], [7, 2, 1, "", "rename"], [7, 2, 1, "", "used"]], "Lib.Statement.Label": [[7, 4, 1, "", "name"], [7, 2, 1, "", "printIns"]], "Lib.Statement.Statement": [[7, 2, 1, "", "defined"], [7, 2, 1, "", "printIns"], [7, 2, 1, "", "substitute"], [7, 2, 1, "", "used"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:exception", "4": "py:attribute", "5": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "exception", "Python exception"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "function", "Python function"]}, "titleterms": {"lib": [0, 1, 2, 3, 4, 5, 6, 7], "packag": 0, "submodul": 0, "modul": [0, 1, 2, 3, 4, 5, 6, 7], "content": [0, 9], "alloc": [1, 9], "error": 2, "functiondata": 3, "linearcod": 4, "operand": 5, "riscv": 6, "statement": 7, "minic": [8, 9], "welcom": 9, "": 9, "document": 9, "base": 9, "librari": 9, "linear": 9, "intermedi": 9, "represent": 9, "temporari": 9, "indic": 9, "tabl": 9}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 56}})