3.3.0
nix run github:DanielLMcGuire/Phasor/3.3.0Commits: 3.2.0...3.3.0
AUR: paru -S phasor
VSCode: Phasor.phasor-programming-language
https://phasor.pages.dev/downloads?version=3.3.0
Caution
Use of "stdstr" module may cause memory leaks!
As always, this is prerelease software. Functionality is not fully checked, it may only be partial. DO NOT USE in production environments without having ran Phasor's embedded C++ leak tracer (available via cmake -DIS_TRACING_ALLOCATIONS=ON!), and review all non C++ code. Even then Phasor is not officially stable!
Use of phasor-web in this release could lead to arbitrary code execution if ENV is not locked down!
See zorvix.pages.dev/security-issue for info
Version 4.0.0 will release later this month as an officially stable version of Phasor, focusing on areas like scoping, enforced typing, better type inference, stability, and speed. (and also will fix the broken AUR package and VSCODE extension + some other touch-ups)
Added
-
phasor --command/-cflag runs a raw script string directly from the CLI without a file or stdin buffer. -
stdmemstdlib module (memory.cpp) exposesfree(name)to free a named variable from the VM at runtime. -
stdrandstdlib module (random.cpp,core/random.cpp,core/random.hpp) exposesrand_seed(s1, s2),rand_next_range(min, max), andrand_next_float(). Uses a custom xorshift+ PRNG. -
execFuncInt()andexecFuncString()C ABI functions inPhasorRT.hcall a named function from pre-compiled bytecode and return the result cast to an integer or string respectively via new dispatch channels in the VM. -
Rust bindings (
src/Rust/lib.rs) new safe Rust crate wrapping PhasorRT vialibloading, covering all ABI functions with a typedPhasorErrorenum. -
Zig bindings (
src/Zig/phasorrt.zig,build.zig) simple Zig wrapper over PhasorRT with a fullStatestruct and top-levelcompilePHS,compilePUL, andgetVersion. Exposed as a Zig module viabuild.zig. -
phasor.RuntimePython submodule cffi bindings for the PhasorRT library. Documented inphasor-py.3. -
phasor_applescript_bindingsmacOS FFI plugin newapplescript_run()function callable from Phasor scripts on macOS, using simple C bindings -> C FFI API (src/Bindings/macOS/AppleScript.h/.m) using Foundation/NSAppleScript. -
Windows COM / Active Script interface (
NativeRuntime_com.cpp/.hpp) implementsIActiveScriptandIActiveScriptParseasPhasorScriptEngine, registered with CLSID{c5318f33-2d87-4e95-95b7-2928cd57a5d7}andProgIDPhasor. -
src/Extensions/powershell/Phasor/PhasorABI.csPowerShell module ABI extracted from an inlineAdd-Typeinto a standalone C# file. -
C++ Public Runtime Headers new headers (plus Phasor.hpp umbrella) including
PhasorFFI.hpp,PhasorStdLib.hpp,PhasorVM.hpp,PhasorISA.hpp, andValue.hpp. Optionally includes the C ABI header whenNEED_PHASOR_C_ABIis defined. -
EMBEDDEDCMake option strips the build to essentials; automatically impliesIS_SANDBOXED, and skips thethirdpartysubdirectory. -
embedded CMake presets
embedded-relandembedded-dbgbuild presets. -
USE_PCHCMake option (default ON) controls precompiled header support. -
scripts/installer.wxsnew MSI installer. -
assets/LICENSE.rtfRTF license for use in both EXE and MSI installers. -
MSVC debug map files
/MAPadded toCMAKE_EXE_LINKER_FLAGS_DEBUGandCMAKE_SHARED_LINKER_FLAGS_DEBUG. -
Man pages for
phasorrt-zig.3,phasorrt-rs.3,phasorstd_mem.3, andphasorstd_rand.3added. -
CI upgraded to GCC 16 on Linux in both release and nightly workflows.
Removed
-n/--nologoflag removed fromphasorasm,phasordecomp, andphasornative; man pages updated accordingly.OPS_ARE_INCLUDEDinclude guard inOperations.cc.inlreplaced by theCMAKE_PCHguard.- Inline VM constructor/destructor bodies moved out of
VM.hppinto a newVM.cpp.
Changed
-
Version bumped to 3.3.0 across all files (
CMakeLists.txt,flake.nix,.rcfiles, PowerShell module, VSCode extension, Python package, man pages). -
Bytecode instruction format reduced from 5 operands to 3 (
operand1,operand2,operand3). Affects the serializer, deserializer, PythonBytecode.py, and all related man page documentation. -
std*stdlib wildcard now also registersstdmemandstdrandalongside existing modules. -
PRINTandPRINT_Ropcodes now flush stdout after printing (both stack and register variants). -
CodeGenerator::generateExpression()gained aresultNeededparameter. Postfix expressions in statement context passresultNeeded=false, skipping the dead store of the pre-increment value. -
Value::getType()reimplemented asstatic_cast<ValueType>(data.index()), now[[nodiscard]] noexcept. -
BytecodeSerializerandBytecodeDeserializerusestd::unordered_mapinstead ofstd::mapfor variable and function entry maps.calculateCRC32madestaticin both. -
phasor_mainandpulsar_mainexecutables are now only built whenPROJECT_IS_TOP_LEVEL, allowing Phasor to be consumed as a CMake subdirectory. -
InstallConfig.cmakenow installs the entireinclude/directory instead of onlyPhasorFFI.handPhasorRT.h, on all platforms. -
cmake/Version.cmakeSHOULD_APPEND_HASHis now only set when there are commits since the tag, so clean tagged builds no longer get a hash suffix.git statusnow uses--porcelain -unoso untracked files don't mark the tree as dirty. -
phasor_applescript_bindingsmacOS shared library added to the CMake build with Objective-C enabled and linked against Foundation. -
NativeRuntime_comadded to the DLL source list on Windows. -
VSCode extension
jitPath/jitArgsconfig keys renamed tomainExePath/mainExeArgs. -
NSIS installer now registers
phasor-help.exein App Paths and registers the COM Phasor Script Engine (CLSID) forphasorrt.dll; uninstaller removes both. -
CI macOS and Windows/Linux builds now pass
-DNATIVE=ONand buildReleaseinstead ofRelWithDebInfo. -
Asset renames:
Repl.ico→assembler.ico,CppCompiler.ico→compiler.ico,logo.png→logo-large.png,ScriptingRuntime.ico→pulsar.ico,BinaryRuntime.ico→vm.ico.
Fixed bugs
cmake/Version.cmakehash suffix was appended to clean tagged builds;SHOULD_APPEND_HASHis now only set when commits exist since the tag.git status --porcelain -unountracked files no longer incorrectly mark the working tree as dirty.- Postfix expression statement no longer emits a dead
STORE_VAR+POPpair when the result is unused. IS_XSCARLETTtypo corrected inCMakePresets.jsonandcmake/Preprocessor.cmake(wasIS_XSCARLET).MAN2PDF_any.pymissing working directorycd /databefore invoking the shell script, needed for the next one:MAN2PDF_linux.shfindpath corrected from/datato./for proper relative operation; also added aDone.completion message.MAX_REGISTERSincreased (Fix #8) across all platform tiers:PLATFORM_LEGACY_GAME4→8,PLATFORM_DESKTOP_GAME/PLATFORM_MODERN_GAME8→16,PLATFORM_DESKTOP_STANDARD16→24.
Existing bugs
- #9, floating point numbers might not work correctly
- #12, Escape sequences longer than one char will not work properly
New bugs
free()not named correctly: free() was incorrectly named the placeholder name (stdmem()), not critical, for now usevariable = null