1. 17 Feb, 2026 3 commits
    • Roman Alifanov's avatar
      Refactor stdlib.py to use declarative method definitions · c3bf25cc
      Roman Alifanov authored
      - Import method definitions from methods.py for consistency
      - Define bash implementations in STRING_IMPLS, ARRAY_IMPLS, DICT_IMPLS
      - Generate stdlib functions from these definitions
      - Use context manager (with self.indented()) for cleaner code
      - Reduce code duplication and improve maintainability
      c3bf25cc
    • Roman Alifanov's avatar
      Improve parameter passing for arrays, dicts and class instances · 0e7f2d60
      Roman Alifanov authored
      - Add proper type tracking for function and method parameters
      - DCE now tracks array-returning methods (keys, split, slice)
      - Fix split/slice to return arrays via __CT_RET_ARR
      - Add foreach support for inline split expressions
      - Detect object parameters by unknown method calls
      - Add comprehensive tests for parameter passing
      
      New test classes:
      - TestFunctionParameterPassing (11 tests)
      - TestClassInstancePassing (4 tests)
      0e7f2d60
    • Roman Alifanov's avatar
      Fix critical codegen bugs for complex expressions · a9fe7b9d
      Roman Alifanov authored
      - String interpolation with operators: {a == b} now generates proper
        bash comparison instead of invalid ${a == b}
      - Double method call in conditions: CSE precompute now correctly reuses
        temp variable for CallExpr to avoid calling method twice
      - arr.push() with method call: detect side effects and call method
        separately to avoid subshell state isolation
      - charAt() with newline: use printf X marker to preserve trailing newlines
      - this.field.method() and obj.field.method(): handle nested MemberAccess
        in return statements and assignments
      - Namespace vs variable collision: check if identifier is known variable
        before treating as namespace
      - return func() with arrays: use _generate_call_arg for proper nameref
      a9fe7b9d
  2. 16 Feb, 2026 20 commits