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.
- {cpyte-4.7.3/source/cpyte.egg-info → cpyte-4.7.4}/PKG-INFO +1 -1
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/__init__.py +1 -1
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/semantic_analasis.py +6 -3
- {cpyte-4.7.3 → cpyte-4.7.4/source/cpyte.egg-info}/PKG-INFO +1 -1
- {cpyte-4.7.3 → cpyte-4.7.4}/MANIFEST.in +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/pyproject.toml +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/readme.md +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/setup.cfg +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/__main__.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/_bignum_bc.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/_runtime_bc.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/astparse.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/bignum.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/bignum_protos.h +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/bytecoding.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/clib.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/compiling.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/elf2sef.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/extension_hooks.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/floats_runtime.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/formatter.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/gc_runtime.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/gc_runtime_addition.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/generate_bc.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/lexar.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/linker.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/lsp_server.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/mainpie.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/mksef.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/opreof_opt.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/opreof_pipeline.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/optimizations.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/package_manifest.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/runpy_runtime.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/runtime.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/runtime_scorpion.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/scorpion_abi.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/sef.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/ugc.h +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/ui.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/update_check.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/winjit_patch.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte/winjit_stubs.c +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/SOURCES.txt +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/dependency_links.txt +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/entry_points.txt +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/requires.txt +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/source/cpyte.egg-info/top_level.txt +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_bignum_jit.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_compiler_regressions.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_fuzz_del_has.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_opreof_proofs.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_scorpion_abi.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_scorpion_dl.py +0 -0
- {cpyte-4.7.3 → cpyte-4.7.4}/test/test_sef_tools.py +0 -0
|
@@ -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
|
-
|
|
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 =
|
|
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 =
|
|
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}`",
|
|
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
|
|
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
|