Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types from beginning to end #37

Merged
merged 98 commits into from
Feb 7, 2023
Merged

Types from beginning to end #37

merged 98 commits into from
Feb 7, 2023

Commits on Jan 21, 2023

  1. Initial Mess

    LensPlaysGames committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    0d41365 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. Configuration menu
    Copy the full SHA
    fe4610d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f4d462 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a013f3 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2023

  1. [Bugfix] Fix error in format string

    I forgot we have special ways to do that now
    LensPlaysGames committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    5831094 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2023

  1. Configuration menu
    Copy the full SHA
    055931c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    08f8d36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2578acc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    89337ae View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9fa9485 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3457d53 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2023

  1. Configuration menu
    Copy the full SHA
    b5b3183 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a94037 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    61f28a8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    98ae71e View commit details
    Browse the repository at this point in the history
  5. [Codegen] Handle subscript operator all at once, instead of split

    I'd say it's much easier to see how subscript is handled when it isn't
    split between two different places :Þ
    LensPlaysGames committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    f06972a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa23eae View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c9be95c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    61d343d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1ad6dbf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d82cd3d View commit details
    Browse the repository at this point in the history
  11. [Codegen/IR] Make variable allocation instructions pointers to type

    This feels like too much bodge; I'm sure there is some refactor that
    will make this more elegant, but this gets the same amount of tests
    passing and failing, as well as the same tests.
    LensPlaysGames committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    9b30942 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    20e42a0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3ad2392 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e7d77a7 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. Configuration menu
    Copy the full SHA
    b4af7c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8013c43 View commit details
    Browse the repository at this point in the history
  3. [Codegen/x86_64] Add t_pointer primitive type

    This is most useful when you just need the sizeof a pointer, for example.
    LensPlaysGames committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    a836f0b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9d23bd2 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    55e1ec0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e339100 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c4570d View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. Configuration menu
    Copy the full SHA
    a94f836 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    933ed59 View commit details
    Browse the repository at this point in the history
  3. [Codegen] Very basic codegen of string literals

    They're still all zeroes, but we're closer!!
    LensPlaysGames committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    312d4e7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ac386a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ab4eac2 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. [AST] Make ast_print_node publicly available

    Also remove unused bitfield; we can add one if we end up adding a lot
    of bools there, I guess.
    LensPlaysGames committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    4423fee View commit details
    Browse the repository at this point in the history
  2. [Minor] Formatting

    Move an `if` into the surrounding switch with `case`.
    
    Make needless multiline declarations a single line.
    LensPlaysGames committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    c57b388 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab7dcf8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    db2d432 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1bd10b3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    66f7289 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b125c17 View commit details
    Browse the repository at this point in the history
  8. [AST] Remove id system entirely

    With primitives now being implemented as the address of global
    definitions, we can compare pointers instead of needing a unique
    id. Plus, the one case that ids were handling (t_integer_literal and
    t_integer being implicitly equal) was already specifically handled in
    the one place that used the id system.
    LensPlaysGames committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    bee8136 View commit details
    Browse the repository at this point in the history
  9. [Tests] Two tests---one passes, one fails

    This is hopefully some motivation to get codegen of static variable
    initialisation done.
    
    The passing one will ensure we can manipulate arrays
    LensPlaysGames committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    afebae2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e669db3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c9ccbb2 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6615957 View commit details
    Browse the repository at this point in the history
  13. [Codegen/IR] Fix overwrite of rhs of subscript operator

    This was bad due to optimisation expecting an unscaled value in the
    subscripts `rhs`
    LensPlaysGames committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    9b71982 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dc49514 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4e3e0f8 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    ec7b772 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    974bdff View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. Configuration menu
    Copy the full SHA
    32f6a44 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2d090d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b14fa1c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8281a44 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ec35e50 View commit details
    Browse the repository at this point in the history
  6. [Codegen/x86_64] Move further away from variable args...

    Still more todo; it's mostly memory interaction stuff
    LensPlaysGames committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    6574a1d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e830a9f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    339e07c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    84f1e10 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    80749cf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    81aaf8e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a400f57 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4a70c4c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    cd2381a View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f922e21 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2023

  1. Configuration menu
    Copy the full SHA
    13b8210 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    33c195c View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Configuration menu
    Copy the full SHA
    49c9970 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. Configuration menu
    Copy the full SHA
    e594ee5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b95d879 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b7be438 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    49f6762 View commit details
    Browse the repository at this point in the history
  5. [Sema] Move some type_is_* functions up to ast.h from `typechecke…

    …r.c`
    
    There are more to come, I'm sure.
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    6c49cac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7253339 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7b84f66 View commit details
    Browse the repository at this point in the history
  8. [Minor/Sema] This should now work pretty much as expected

    Promise, last one lmao.
    
    Still have to fix assignment source location, eventually
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    771b9b4 View commit details
    Browse the repository at this point in the history
  9. [Minor/Sema] Very minor formatting

    Okay I lied this is the last one, lmao.
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    df8ffb0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5a60f48 View commit details
    Browse the repository at this point in the history
  11. [Sema] Use type_is_* instead of direct comparisons

    This will eventually allow for typedefs to be a drop-in-place feature,
    rather than requiring extensive rewriting
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    cc09b8b View commit details
    Browse the repository at this point in the history
  12. [Codegen] Improve codegen of subscript variable reference

    This will now allow `ir_static_reference` to take in a direct
    `IRStaticVariable`, when necessary, instead of just a name span.
    
    Still not sure how to go about handling the local version of this, to
    be honest. Maybe a `copy`?
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    836f99b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    acd725c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f3fab2d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    a8241fa View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6c027c7 View commit details
    Browse the repository at this point in the history
  17. [Codegen/x86_64] Fix clobber values of does_clobber for shift instr…

    …uctions
    
    ```
    femit_reg_to_reg(context, I_MOV, inst->rhs->result, REG_RCX);
    femit_reg(context, I_SAR, inst->lhs->result);
    femit_reg_to_reg(context, I_MOV, inst->lhs->result, inst->result);
    ```
    
    This clobbers left, not the right.
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    c7f87aa View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    88715b4 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1104d93 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    b222c7f View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    6411d36 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    40b4430 View commit details
    Browse the repository at this point in the history
  23. [Codegen] Rename var to the more correct var_decl

    Also add error for unhandled IR instruction types, just in case.
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    f1f876c View commit details
    Browse the repository at this point in the history
  24. [Sema] Get rid of is_* wrappers, where possible

    There are still some we need to transfer over, like `is_integer` and
    such... We'll get there.
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    8282edc View commit details
    Browse the repository at this point in the history
  25. [Codegen/IR] Fix assigned type of IR_LOAD instructions

    This is sort of a bodge, but is work towards the final destination.
    LensPlaysGames committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    3a9c115 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    79c22b1 View commit details
    Browse the repository at this point in the history