codecin 5.8.2__tar.gz → 5.9.0__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.
- {codecin-5.8.2 → codecin-5.9.0}/CHANGELOG.md +79 -0
- {codecin-5.8.2/codecin.egg-info → codecin-5.9.0}/PKG-INFO +122 -234
- {codecin-5.8.2 → codecin-5.9.0}/README.md +121 -233
- {codecin-5.8.2 → codecin-5.9.0}/codecin/__init__.py +1 -1
- {codecin-5.8.2 → codecin-5.9.0}/codecin/aot.py +39 -13
- {codecin-5.8.2 → codecin-5.9.0}/codecin/cin.py +26 -3
- {codecin-5.8.2 → codecin-5.9.0}/codecin/cli.py +13 -55
- {codecin-5.8.2 → codecin-5.9.0}/codecin/config.py +12 -26
- codecin-5.9.0/codecin/cpu.py +273 -0
- codecin-5.9.0/codecin/crom.py +275 -0
- codecin-5.9.0/codecin/disasm.py +145 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/environment.py +4 -4
- {codecin-5.8.2 → codecin-5.9.0}/codecin/errors.py +1 -5
- {codecin-5.8.2 → codecin-5.9.0}/codecin/isa.py +28 -2
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/codec.cin +2 -2
- codecin-5.9.0/codecin/lib/ffi.cin +163 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/gui.cin +1 -1
- codecin-5.9.0/codecin/lib/net.cin +171 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/path.cin +1 -1
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/text.cin +1 -1
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/token.cin +1 -1
- codecin-5.9.0/codecin/memory.py +306 -0
- codecin-5.9.0/codecin/native/aot/aot.go +110 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/aot/stub_main.go.txt +5 -4
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/compiler/codegen.go +23 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/compiler/syscalls.go +18 -0
- codecin-5.9.0/codecin/native/engine/ffi_nocgo.go +20 -0
- codecin-5.9.0/codecin/native/engine/ffi_registry.go +69 -0
- codecin-5.9.0/codecin/native/engine/ffi_unix.go +109 -0
- codecin-5.9.0/codecin/native/engine/ffi_windows.go +117 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/hostnet.go +50 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/isa_gen.go +181 -1
- codecin-5.9.0/codecin/native/engine/netsock.go +321 -0
- codecin-5.9.0/codecin/native/engine/ops_ext.go +515 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/version_gen.go +1 -1
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/vm.go +285 -40
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/main.go +196 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native.py +72 -40
- {codecin-5.8.2 → codecin-5.9.0}/codecin/stats.py +2 -7
- {codecin-5.8.2 → codecin-5.9.0}/codecin/stdlib.py +4 -5
- {codecin-5.8.2 → codecin-5.9.0}/codecin/version.py +4 -18
- {codecin-5.8.2 → codecin-5.9.0/codecin.egg-info}/PKG-INFO +122 -234
- {codecin-5.8.2 → codecin-5.9.0}/codecin.egg-info/SOURCES.txt +10 -12
- {codecin-5.8.2 → codecin-5.9.0}/script/gen_native_isa.py +7 -1
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_aggregate_and_const.py +11 -59
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_all_libs_together.py +8 -12
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_aot.py +1 -34
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_assembler_ext.py +1 -13
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cin_host.py +3 -48
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cin_host_ext.py +7 -60
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cin_new_features.py +4 -24
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cin_syntax.py +2 -24
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cin_syntax_ext.py +12 -28
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cin_system.py +5 -11
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_cli.py +10 -25
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_compiler_errors.py +0 -8
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_environment.py +3 -7
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_examples.py +0 -3
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_features_ab.py +0 -14
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_features_import.py +1 -20
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_features_importloc.py +0 -5
- codecin-5.9.0/tests/test_ffi_net.py +426 -0
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_gui.py +14 -28
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_index_subscript_type.py +6 -20
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_isa_single_source.py +0 -7
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_issue_regress.py +19 -72
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_keyboard.py +12 -31
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_bigint.py +18 -37
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_bitset.py +2 -6
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_codec.py +6 -22
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_combin.py +4 -12
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_compat.py +20 -57
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_csv.py +4 -11
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_dp.py +2 -6
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_fmt.py +4 -11
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_frac.py +12 -25
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_graph.py +4 -12
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_heap.py +4 -12
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_path.py +5 -15
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_set.py +2 -6
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_text.py +12 -25
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_token.py +8 -17
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_tree.py +2 -6
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_lib_unionfind.py +2 -6
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_libs.py +3 -15
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_libs_ext.py +0 -8
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_literals_and_bom.py +3 -16
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_native_hardening.py +8 -21
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_native_lib_lookup.py +0 -4
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_nested_subscript_codegen.py +3 -12
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_no_go_cli.py +0 -4
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_p0_fixes.py +31 -78
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_packaging.py +0 -9
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_paths_consistency.py +0 -1
- codecin-5.9.0/tests/test_sparse_memory.py +167 -0
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_struct_value_semantics.py +12 -82
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_switch_semantics.py +6 -22
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_version.py +2 -36
- {codecin-5.8.2 → codecin-5.9.0}/tests/test_workflows.py +0 -13
- codecin-5.8.2/codecin/cache.py +0 -71
- codecin-5.8.2/codecin/cpu.py +0 -1717
- codecin-5.8.2/codecin/crom.py +0 -222
- codecin-5.8.2/codecin/debugger.py +0 -691
- codecin-5.8.2/codecin/disasm.py +0 -86
- codecin-5.8.2/codecin/jit.py +0 -276
- codecin-5.8.2/codecin/memory.py +0 -370
- codecin-5.8.2/codecin/native/aot/aot.go +0 -59
- codecin-5.8.2/tests/test_cache.py +0 -40
- codecin-5.8.2/tests/test_cpu_interpreted.py +0 -89
- codecin-5.8.2/tests/test_debugger.py +0 -82
- codecin-5.8.2/tests/test_features_crom_mmu.py +0 -82
- codecin-5.8.2/tests/test_features_mmu.py +0 -123
- codecin-5.8.2/tests/test_features_remote.py +0 -152
- codecin-5.8.2/tests/test_isa_dispatch.py +0 -68
- codecin-5.8.2/tests/test_memory_protection.py +0 -62
- codecin-5.8.2/tests/test_three_paths.py +0 -86
- {codecin-5.8.2 → codecin-5.9.0}/LICENSE +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/MANIFEST.in +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/assembler.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/console.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/array.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/bigint.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/bits.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/bitset.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/combin.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/conv.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/cppstd.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/cstd.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/csv.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/dp.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/fmt.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/frac.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/gostd.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/graph.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/hash.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/heap.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/io.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/json.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/key.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/math.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/matrix.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/queue.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/rand.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/set.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/sort.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/stat.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/str.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/termux.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/test.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/time.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/tree.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/unionfind.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/validate.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/lib/vec.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/logger.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/build.ps1 +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/build.sh +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/compiler/compile_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/compiler/parser.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/compiler/tokenizer.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/compiler/types.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/args.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/audio.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/audio_other.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/audio_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/audio_windows.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/canvas.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/console_other.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/console_windows.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/crom.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/encode.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/engine_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/gui.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/gui_stub.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/gui_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/gui_windows.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/gui_x11.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/host_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/hostcrypto.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/hostdesktop.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_other.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_stub.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_termios_darwin.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_termios_linux.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_windows.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/keyboard_windows_test.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/mem_other.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/mem_windows.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/stdin.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/stdin_other.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/stdin_windows.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/system.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/engine/termux.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/go.mod +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/native/ir/ir.go +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin/registers.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin.egg-info/dependency_links.txt +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin.egg-info/entry_points.txt +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin.egg-info/requires.txt +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/codecin.egg-info/top_level.txt +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/args_demo.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/asm_constants.asm +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/bitwise_builtins.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/control_flow.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/enum_range_for.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/gui_demo.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/literals_types.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/local_audio.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/modules_demo.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/stdlib_demo.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/examples/system_interaction.cin +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vim/ftdetect/codecin.vim +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vim/syntax/cin.vim +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vim/syntax/codecinasm.vim +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/.vscodeignore +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/README.md +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/build.bat +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/language-configuration.json +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/package.json +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/snippets/cin.json +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/misc/vscode-cin/syntaxes/cin.tmLanguage.json +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/pyproject.toml +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/script/bump_version.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/script/check_paths.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/script/gen_isa_docs.py +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/setup.cfg +0 -0
- {codecin-5.8.2 → codecin-5.9.0}/setup.py +0 -0
|
@@ -5,6 +5,85 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [5.9.0] - 2026-10-05
|
|
9
|
+
|
|
10
|
+
一次「单引擎 + 大内存 + 系统能力」的架构发布:**纯 Python 解释器与 JIT
|
|
11
|
+
被移除**,全部程序统一由 Go 原生引擎执行;内存默认从 64 KB 提升到
|
|
12
|
+
**1 GiB(稀疏分页, 按需提交)**;新增 **FFI 动态库调用**与**完整网络**
|
|
13
|
+
(HTTP 扩展 / TCP / UDP / DNS)系统调用。持久化格式升级为段式
|
|
14
|
+
(CROM v4 / BIN v3),只保存实际使用的内存页。
|
|
15
|
+
|
|
16
|
+
### 变更 (Changed)
|
|
17
|
+
|
|
18
|
+
#### 删除 Python 解释器与 JIT (native-only)
|
|
19
|
+
- **`jit.py` / `debugger.py` / `cache.py` 整体删除**,`CPU` 重构为
|
|
20
|
+
native-only 执行编排:编译/装载 (.cin/.asm/.pl/.bin/.crom) + 结果回传。
|
|
21
|
+
动态库缺失时抛 `CPUSimulatorError` 并附重建指引(不再有解释器回退)。
|
|
22
|
+
- 引擎 ABI 升级为 **v2**(`codecin_run_v2`):一次调用回传寄存器/向量/
|
|
23
|
+
NZCV/脏内存段/输出,Python 侧无逐条解释开销。
|
|
24
|
+
- 相关 CLI 选项与配置项(`use_native` / JIT 统计 / 调试器等)随之移除,
|
|
25
|
+
`--stats` 只保留原生引擎数据。
|
|
26
|
+
- 新 ABI 下原生库版本不匹配(缺 `codecin_run_v2` 导出)会被识别并提示
|
|
27
|
+
重建,而非静默失败。
|
|
28
|
+
|
|
29
|
+
#### 内存默认 64 KB -> 1 GiB (动态分配)
|
|
30
|
+
- **逻辑 1 GiB, 4 KiB 稀疏分页**:Python 侧 `FastMemory` 重写为按需分配页
|
|
31
|
+
的稀疏字典,`resident_bytes` 只统计已触碰页——1 GiB 地址空间常驻内存
|
|
32
|
+
只有实际写入的几 KB。
|
|
33
|
+
- Go 引擎侧配合 `make([]byte, memSize)`(OS 懒提交)+ **脏页位图**:执行
|
|
34
|
+
结束只回传被写过的 4 KiB 页(段式),整程序执行后写回稀疏内存。
|
|
35
|
+
- 大数组/大缓冲不再需要 `--mem-size`:默认即可 `int a[1000000]`。
|
|
36
|
+
|
|
37
|
+
#### 持久化格式: 段式 CROM v4 / BIN v3
|
|
38
|
+
- CROM v4(16 B 头 + zlib 可选压缩段表)与 BIN v3(50 B 头 + 段表 +
|
|
39
|
+
bytecode)只保存已分配页;`.pytest_tmp` 内 1 GiB 镜像实测仅数 KB。
|
|
40
|
+
- 旧 BIN v2(34 B 头)仍可读;反汇编器(`disasm.py`)同步支持两种头。
|
|
41
|
+
|
|
42
|
+
### 新增 (Added)
|
|
43
|
+
|
|
44
|
+
#### FFI: 动态库调用 (SYS 140-144)
|
|
45
|
+
- `ffi_load(path)` / `ffi_find(handle, symbol)` / `ffi_call(fn, argbuf, n)` /
|
|
46
|
+
`ffi_callf(fn, argbuf, n)` / `lib_close(handle)`:Windows
|
|
47
|
+
(LoadLibrary/GetProcAddress) 与 Unix (dlopen/dlsym) 双实现,最多 8 个
|
|
48
|
+
int64/IEEE754 位参数(浮点经 Windows x64 XMM0-3 / SysV XMM0-7 正确传参)。
|
|
49
|
+
- 标准库 `lib/ffi.cin`:`ffi_call0..ffi_call8` / `ffi_callf1..ffi_callf4`
|
|
50
|
+
便捷封装(局部数组作参数缓冲)。
|
|
51
|
+
- 无效句柄/参数越界报明确错误信息;`dlopen`/`dlsym` 失败返回 0 不抛异常。
|
|
52
|
+
|
|
53
|
+
#### 网络: HTTP 扩展 / TCP / UDP / DNS (SYS 145-157)
|
|
54
|
+
- **HTTP**:`http_req(method, url, headers, body)`(自定义方法与
|
|
55
|
+
`Key: Value\n` 头)+ `http_code()` 状态码查询;既有 `http_get`/`http_post`
|
|
56
|
+
同样记录状态码。15 s 超时,响应体上限 8 MiB。
|
|
57
|
+
- **TCP**:`tcp_dial` / `tcp_send` / `tcp_recv` / `tcp_close` /
|
|
58
|
+
`tcp_listen` / `tcp_accept`(10 s 连接超时;收发上限 4/8 MiB)。
|
|
59
|
+
- **UDP**:`udp_open` / `udp_sendto` / `udp_recvfrom`(源地址回填
|
|
60
|
+
"ip:port")/ `udp_close`。
|
|
61
|
+
- **DNS**:`dns_lookup(host)` 返回 IP 字符串(偏好 IPv4 —— Windows 下
|
|
62
|
+
`localhost` 常先返回 ::1,对端只听 IPv4 时不再丢包)。
|
|
63
|
+
- 主机名参数统一支持(`tcp_dial("example.com", 80)`、
|
|
64
|
+
`udp_sendto(fd, "localhost", ...)`)。
|
|
65
|
+
- 标准库 `lib/net.cin`:字符串收发(`tcp_send_str`/`tcp_recv_line`/
|
|
66
|
+
`udp_send_str` 等)、`http_get_headers`/`http_post_headers`/`http_ok`、
|
|
67
|
+
`tcp_roundtrip`/`tcp_server`、`dns_resolve`/`dns_ok`。
|
|
68
|
+
|
|
69
|
+
### 修复 (Fixed)
|
|
70
|
+
- **`http_get`/`http_post` 不记录状态码**:`http_code()` 此前对这两个内建
|
|
71
|
+
恒返回 0(只有 `http_req` 更新 `lastHTTPSt`),现在三者语义一致。
|
|
72
|
+
- **FFI 浮点传参走错寄存器**:C 桥此前把函数指针声明为整型参数,Windows
|
|
73
|
+
x64/SysV 下目标函数从 XMM 读到垃圾——`ffi_callf2(pow, 3.0, 4.0)` 实际算出
|
|
74
|
+
`pow(x, 0) = 1`。现按 double 类型传参(位模式经 memcpy 保持不变)。
|
|
75
|
+
- `udp_sendto` 主机名解析只取第一个地址(可能为 IPv6),现偏好 IPv4。
|
|
76
|
+
|
|
77
|
+
### 移除 (Removed)
|
|
78
|
+
- `codecin/jit.py`、`codecin/debugger.py`、`codecin/cache.py` 及对应测试
|
|
79
|
+
(9 个废弃测试文件删除;`use_native` 参数化全部收敛为单路径)。
|
|
80
|
+
- `PageFaultError`(并入 `MemoryAccessError`)。
|
|
81
|
+
- 沙箱语义不变:`--sandbox` 下仅放行 ALLOCFRAME/TIMEUS/TIMENS,
|
|
82
|
+
其余宿主 SYS(网络/FFI/音频/画布等)报
|
|
83
|
+
`Host capability disabled in sandbox mode`。
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
8
87
|
## [5.8.2] - 2026-10-04
|
|
9
88
|
|
|
10
89
|
一次以「真实压测程序暴露的错误信息与栈安全」为主线的修复发布。核心结论:
|