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

🐞️ Bugfix: Binary Operators support for non-Integer types #52

Open
wants to merge 6 commits into
base: vardec_varass_dependency
Choose a base branch
from

Commits on May 19, 2024

  1. TypeChecker

    - Disallow the operands of ANY binary operator expression to both be pointer types
    deavmi committed May 19, 2024
    Configuration menu
    Copy the full SHA
    3a10a1a View commit details
    Browse the repository at this point in the history
  2. DGen

    - When transforming a `CastedValueInstructionA` ensure that we wrap the expression being-casted in `(<expr>)` (parenthesis) because otherwise C is unhappy and in cases, like binary operator expressions, it will cause the C compiler to attempt casting the left-hand operand not the resultant of the binary operator expression
    - When doing an emit for `BinaryOperatorExpression`, ignore the case whereby ether left or right-hand side operand s a pointer type and ONLY when) the operatr is `SymbolType.EQUALS`
    deavmi committed May 19, 2024
    Configuration menu
    Copy the full SHA
    52ff503 View commit details
    Browse the repository at this point in the history
  3. TypeChecker

    - Do allow `SymbolType.EQUALS` with two pointer operands
    - Removed false assertion in exhaustive case
    - If thebinary operator is `SymbolType.EQUALS` then set `chosenType` to `ubyte`
    deavmi committed May 19, 2024
    Configuration menu
    Copy the full SHA
    5026a05 View commit details
    Browse the repository at this point in the history
  4. Test cases

    - Added `simple_binops_ptr_bad.t` and `simple_binbops_ptr.t`
    deavmi committed May 19, 2024
    Configuration menu
    Copy the full SHA
    aa5d97f View commit details
    Browse the repository at this point in the history
  5. Pipelines

    - Added `simple_binops_ptr_bad.t` for the typechecking case
    - Added `simple_binopts_ptr.t` for emit case
    deavmi committed May 19, 2024
    Configuration menu
    Copy the full SHA
    fb203d6 View commit details
    Browse the repository at this point in the history
  6. Compiler (unittests)

    - Added `source/tlang/testing/typecheck/simple_binops_ptr_bad.t`
    - Added `source/tlang/testing/simple_binops_ptr.t`
    deavmi committed May 19, 2024
    Configuration menu
    Copy the full SHA
    b4fc4df View commit details
    Browse the repository at this point in the history