1. Apr 25, 2021
  2. Apr 24, 2021
  3. Mar 09, 2021
  4. Mar 08, 2021
  5. Mar 07, 2021
    • Matthew Fernandez's avatar
      fix loop underflow check · d69c6b51
      Matthew Fernandez authored
      The underflow check discussed in the prior commit was being done on raw values,
      which in many cases involves converting a signed comparison to an unsigned
      comparison. Additionally the comparison operator was incorrect in this reverse
      iteration case.
      
      Github: closes #211 “for loop underflow check incorrect?”
      d69c6b51
    • Matthew Fernandez's avatar
      fix: detection of whether negative loop iteration will overflow · 27a9f27f
      Matthew Fernandez authored
      Rumur emits code to detect whether the final iteration of a for loop would cause
      numeric overflow, resulting in an infinite loop or undefined behaviour in C, and
      safely handles this situation. However, in the case of a reverse iteration
      (negative step) we were incorrectly checking against the “lower bound” of the
      loop which actually ends up being the upper bound in a reverse iteration. E.g.
      
        for i := 0 to -127 by 10 do
          …
        end;
      
      In the above loop, the bound we need to check against for overflow is -127 which
      is conceptually the lower bound, but during code generation is actually in the
      `ub` variable.
      
      Note that this is only part of the changes required for #211, because this is
      only the condition of whether we *could* overflow. The test for whether we are
      about to *actually* overflow is also broken.
      
      Github: related to #211 “for loop underflow check incorrect?”
      27a9f27f
    • Matthew Fernandez's avatar
      fix: suppress -Wconstant-conversion warning · 9c898780
      Matthew Fernandez authored
      When Rumur infers a narrow signed type (e.g. int8_t) can be used to represent
      scalars, the initialisation sequence used in for loops resulted in implicit
      promotion to int and then implicit conversion back to the value type. This is
      all intentional and not incorrect, but it appeared to the compiler as if the
      generated code did not intend this final implicit conversion. By introducing
      some casts, we squash this compiler warning.
      
      The upcoming for-step-neg-overflow.m test case will demonstrate how to provoke
      this situation.
      9c898780
  6. Mar 05, 2021
  7. Mar 04, 2021
  8. Mar 01, 2021
  9. Feb 28, 2021
  10. Feb 05, 2021
  11. Jan 30, 2021
    • Matthew Fernandez's avatar
      better syntax errors · 7cf378f9
      Matthew Fernandez authored
      The Bison-generated parser is now aware of the actual characters behind a token
      name it has. So instead of syntax errors like "unexpected RSH" you get
      "unexpected >>".
      7cf378f9
  12. Jan 07, 2021
  13. Dec 21, 2020
  14. Dec 20, 2020