cpyte 4.7.3__tar.gz → 4.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. {cpyte-4.7.3/source/cpyte.egg-info → cpyte-4.7.4}/PKG-INFO +1 -1
  2. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/__init__.py +1 -1
  3. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/semantic_analasis.py +6 -3
  4. {cpyte-4.7.3 → cpyte-4.7.4/source/cpyte.egg-info}/PKG-INFO +1 -1
  5. {cpyte-4.7.3 → cpyte-4.7.4}/MANIFEST.in +0 -0
  6. {cpyte-4.7.3 → cpyte-4.7.4}/pyproject.toml +0 -0
  7. {cpyte-4.7.3 → cpyte-4.7.4}/readme.md +0 -0
  8. {cpyte-4.7.3 → cpyte-4.7.4}/setup.cfg +0 -0
  9. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/__main__.py +0 -0
  10. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/_bignum_bc.py +0 -0
  11. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/_runtime_bc.py +0 -0
  12. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/astparse.py +0 -0
  13. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/bignum.c +0 -0
  14. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/bignum_protos.h +0 -0
  15. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/bytecoding.py +0 -0
  16. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/clib.py +0 -0
  17. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/compiling.py +0 -0
  18. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/elf2sef.py +0 -0
  19. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/extension_hooks.py +0 -0
  20. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/floats_runtime.c +0 -0
  21. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/formatter.py +0 -0
  22. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/gc_runtime.c +0 -0
  23. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/gc_runtime_addition.c +0 -0
  24. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/generate_bc.py +0 -0
  25. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/lexar.py +0 -0
  26. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/linker.py +0 -0
  27. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/lsp_server.py +0 -0
  28. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/mainpie.py +0 -0
  29. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/mksef.py +0 -0
  30. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/opreof_opt.py +0 -0
  31. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/opreof_pipeline.py +0 -0
  32. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/optimizations.py +0 -0
  33. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/package_manifest.py +0 -0
  34. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/runpy_runtime.c +0 -0
  35. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/runtime.c +0 -0
  36. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/runtime_scorpion.c +0 -0
  37. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/scorpion_abi.py +0 -0
  38. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/sef.py +0 -0
  39. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/ugc.h +0 -0
  40. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/ui.py +0 -0
  41. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/update_check.py +0 -0
  42. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/winjit_patch.py +0 -0
  43. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/winjit_stubs.c +0 -0
  44. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/SOURCES.txt +0 -0
  45. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/dependency_links.txt +0 -0
  46. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/entry_points.txt +0 -0
  47. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/requires.txt +0 -0
  48. {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/top_level.txt +0 -0
  49. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_bignum_jit.py +0 -0
  50. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_compiler_regressions.py +0 -0
  51. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_fuzz_del_has.py +0 -0
  52. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_opreof_proofs.py +0 -0
  53. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_scorpion_abi.py +0 -0
  54. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_scorpion_dl.py +0 -0
  55. {cpyte-4.7.3 → cpyte-4.7.4}/test/test_sef_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cpyte
3
- Version: 4.7.3
3
+ Version: 4.7.4
4
4
  Summary: The Cpyte programming language compiler
5
5
  Author: Hoang Duy Tung
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- __version__ = "4.7.3"
1
+ __version__ = "4.7.4"
2
2
 
3
3
  # ---------------------------------------------------------------------------
4
4
  # Public library API.
@@ -1583,7 +1583,10 @@ class SemanticAnalyzer:
1583
1583
  # Bitwise operations are unsupported for signed `big` but are
1584
1584
  # provided for unsigned `ubig` (which has no sign bit), so
1585
1585
  # AND/OR/XOR/shift operate over the full magnitude.
1586
- valid_int_types = ("int", "int64", "uint64", "size_t", "ubig")
1586
+ # Narrow unsigned words (uint8/16/32) lower to i8/i16/i32
1587
+ # and are every bit as valid for bitwise ops as `int`;
1588
+ # excluding them made `uint32 a = x ^ y` a false E0001.
1589
+ valid_int_types = self._INT_TYPES + ("ubig",)
1587
1590
  if left_t == "big" or right_t == "big":
1588
1591
  self.error(
1589
1592
  f"bitwise operator `{node.op.name}` not supported for `big` operands",
@@ -1610,7 +1613,7 @@ class SemanticAnalyzer:
1610
1613
  node.inferred_type = "int"
1611
1614
  return "int"
1612
1615
  # PERCENT
1613
- valid_int_types = ("int", "int64", "uint64", "big", "ubig", "size_t")
1616
+ valid_int_types = self._INT_TYPES + ("big", "ubig")
1614
1617
  if (left_t is not None and left_t not in valid_int_types) or (
1615
1618
  right_t is not None and right_t not in valid_int_types
1616
1619
  ):
@@ -1761,7 +1764,7 @@ class SemanticAnalyzer:
1761
1764
  note="unary minus expects numeric type",
1762
1765
  )
1763
1766
  if node.op.name == "TILDE":
1764
- valid_types = ("int", "int64", "uint64", "size_t")
1767
+ valid_types = self._INT_TYPES
1765
1768
  if operand_t is not None and operand_t not in valid_types:
1766
1769
  self.error(
1767
1770
  f"bitwise NOT (`~`) not supported for `{operand_t}`",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cpyte
3
- Version: 4.7.3
3
+ Version: 4.7.4
4
4
  Summary: The Cpyte programming language compiler
5
5
  Author: Hoang Duy Tung
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes