GitPedia
marcobambini

marcobambini/gravity

Gravity Programming Language

9 Releases
Latest: 2mo ago
Gravity v0.9.70.9.7Latest
marcobambinimarcobambini·2mo ago·April 14, 2026
GitHub

**Full Changelog**: https://github.com/marcobambini/gravity/compare/0.9.6...0.9.7

Gravity v0.9.60.9.6
marcobambinimarcobambini·2mo ago·April 14, 2026
GitHub

📋 What's Changed

  • fix(core): move gravity_opt_free after refcount check to prevent double-free by @barchett in https://github.com/marcobambini/gravity/pull/436

New Contributors

  • @barchett made their first contribution in https://github.com/marcobambini/gravity/pull/436
  • Full Changelog: https://github.com/marcobambini/gravity/compare/v0.9.5...0.9.6
Gravity v0.9.5v0.9.5
marcobambinimarcobambini·3mo ago·February 23, 2026
GitHub

📦 Gravity v0.9.5

  • Extensive bug fixes, memory safety improvements, and new documentation.

📦 Compiler

  • Fix off-by-one in lexer PEEK_NEXT/PEEK_NEXT2 boundary checks
  • Fix memory leaks in parser (parse_file_expression, parse_variable_declaration, string interpolation)
  • Fix wrong constant in semacheck2 upvalue limit error message
  • Fix wrong variable name in for-loop register allocation in codegen
  • Fix multiple early-return paths in visit_postfix_expr leaking arrays (replaced with goto cleanup)
  • Fix register clobbering in LOCATION_CLASS_IVAR_OUTER assignment
  • Fix constant folding and NEG optimization checking/writing wrong registers
  • Fix OPCODE_SET_FOUR8bit macro missing opcode field
  • + 2 more

📦 Runtime / VM

  • Fix boolean fast-path comparison incorrectly applied to ordered comparisons (LT, GT, LEQ, GEQ) — now restricted to EQ/NEQ only
  • Fix crash in gravity_vm_setslot/gravity_vm_getslot when no frames exist
  • Fix list_iterator_next out-of-bounds read
  • Fix range_contains not handling reversed ranges
  • Fix function_exec default-arg filling using wrong index formula
  • Fix int_random truncation from gravity_int_t to int
  • Fix string_count broken partial-match logic (rewrite using string_strnstr)
  • Fix string_upper/string_lower off-by-one (iterated one byte past end)
  • + 7 more

📦 Optional Modules

  • Math: fix atan2f for float builds; use POW macro consistently; fix division-by-zero in logx when base=1; fix integer overflow in random; fix pointer bugs in round
  • File: fix memory leaks in buildpath and directory scan; fix wrong nargs in open; fix leaked FILE* on failure; fix crash on negative read size; fix swapped fread/fwrite arguments
  • JSON: rewrite string escaping to properly handle backslashes, quotes, and control characters
  • ENV: add Windows compatibility for environ access

📦 Shared / Data Structures

  • Fix marray_push updating capacity before confirming realloc success
  • Fix marray_resize/marray_resize0 to check realloc result
  • Fix gravity_hash_memsize counting buckets as nodes
  • Improve float hashing precision (%f → %.17g)
  • Add overflow guard to gravity_function_cpool_add

📦 Utilities

  • Fix buffer overflow in debug DUMP_VM macros
  • Fix memory leak in gravity_disassemble
  • Fix escape buffer too small in JSON serializer
  • Fix swapped PathCombineA arguments on Windows
  • Fix file_name_frompath returning NULL when no separator
  • Add NULL check in string_dup
  • Fix signed arithmetic in number_from_bin

📦 CLI

  • Fix memory leaks in unittest_scan and inline execution

📝 Documentation

  • Add comprehensive [ARCHITECTURE.md](ARCHITECTURE.md) covering the full compilation pipeline, VM internals, value system, garbage collector, instruction set, and embedding API
  • Update README.md with Building, Usage, and Project Structure sections; update line counts; enhance Features list

🧪 Tests

  • Add 30 new unit tests covering all major bug fixes
Official 0.9.0 release0.9.0
marcobambinimarcobambini·4mo ago·January 24, 2026
GitHub

📋 Changes

  • Several leaks and bugs fixed
  • New unit tests added
Official 0.8.5 release0.8.5
marcobambinimarcobambini·4y ago·July 22, 2021
GitHub
Official 0.8.3 release0.8.3
marcobambinimarcobambini·4y ago·June 28, 2021
GitHub
Official 0.8.2 release0.8.2
marcobambinimarcobambini·5y ago·June 5, 2021
GitHub
Official 0.8.1 release0.8.1
marcobambinimarcobambini·5y ago·November 16, 2020
GitHub
Official 0.8.0 release0.8.0
marcobambinimarcobambini·5y ago·November 9, 2020
GitHub