Changes for version 0.990151 - 2026-03-25
- New Features
- SPVM::Builder::Ninja: Implement a Ninja-compatible build system that tracks build states using command hashes (SHA1) and file content to ensure robust incremental builds.
- SPVM::Builder::Ninja: Implement exclusive file locking (flock) for the Ninja log to support safe parallel builds (make -j).
- SPVM::Builder::Ninja: Implement hash-based output directory structure for object files to ensure strict build isolation and prevent artifact pollution.
- SPVM::Builder::Ninja: Add in-memory caching for dependent file hashes to significantly accelerate build processes.
- SPVM::Builder::Util: Add normalize_path utility to provide consistent relative path representation relative to the build directory.
- SPVM::Builder::CC: Add cc_version and ld_version fields to detect toolchain updates and trigger automatic rebuilds.
- SPVM::Builder::Config: Add get_base_dir method to SPVM::Builder::Config::Base for centralized input directory resolution.
- SPVM::Builder::CompileInfo: Add dependent_files field to manage per-source dependencies.
- Incompatible Changes
- SPVM::Builder: Remove the optimize field. Optimization flags are now managed through SPVM::Builder::Util or Config classes.
- SPVM::Builder::CC: Remove the explicit output_file parameter from compile_source_file; the output path is now internally resolved based on command hashes.
- SPVM::Builder::Config: Remove native_include_dir and native_src_dir fields in favor of dynamic resolution from the configuration file's location.
- SPVM::Builder::Util: Remove need_generate_by_content and get_possible_dependent_files, delegating all build decisions to the Ninja-based system.
- SPVM: Changes to API initialization timing. SPVM_BUILD_DIR and API initialization are now handled in SPVM::Builder::import and SPVM::import instead of BEGIN blocks.
- Changes
- SPVM::Builder::Ninja: Improve path normalization logic to resolve absolute paths before calculating relative paths, preventing incorrect deep relative paths.
- SPVM::Builder::Ninja: Improve dependency scanning by using File::Find's default behavior for duplicate symlinks, avoiding fatal errors.
- SPVM::Builder::Ninja: Exclude the output option from command hashes to resolve circular dependencies in dynamic output naming.
- SPVM::Builder::Ninja: Ensure deterministic command hashes by removing duplicate dependent files and sorting them by name.
- SPVM::Builder::Ninja: Implement automatic log recompaction with a threshold similar to the original Ninja, ensuring log performance.
- SPVM::Builder::Ninja: Add command_version to the build hash to ensure rebuilds when the toolchain (compiler/linker) is updated.
- SPVM::Builder::Ninja: Use Time::HiRes to support millisecond precision for timestamps in the Ninja log.
- SPVM::Builder::Ninja: Ensure the log directory is created (mkpath) before any file operations in prepare and recompact methods.
- SPVM::Builder::CC: Refactor compile_source_file to move command hash generation before the rebuild check for better consistency.
- SPVM::Builder::CC: Postpone output file path determination until after before_compile callbacks to allow dynamic configuration changes.
- SPVM::Builder::CC: Extract native class and resource compilation into separate methods (compile_native_class and compile_resources) for better maintainability.
- SPVM::Builder::CC: Delegate recursive header directory traversal to SPVM::Builder::Ninja to simplify dependency collection.
- SPVM::Builder::CC: Fix a regression where 'make' unnecessarily rebuilt by removing the spvm_version.h utime hack and using force => 1.
- SPVM::Builder::CC: Refactor bootstrap and runtime source paths to ensure consistent object file generation during executable builds.
- SPVM::Builder::CC: Replace the term input_file with dependent_file across source and config management to clarify relationships.
- SPVM::Builder::Exe: Use load_config to unify configuration loading logic.
- SPVM::Builder::Config::Global: Centralize CMake-compatible build type rules and move them from Exe::MSVC to the parent class.
- SPVM::Global: Implement caching for the SPVM::Builder instance to improve performance during runtime dynamic loading.
- Build: Add .PHONY to dynamic library targets and suppress redundant Perl command echoing in the Makefile.
- Internal Changes
- SPVM::Builder: Refactor manual accessors to use SPVM::Builder::Accessor across Builder, Ninja, and CC classes for better maintainability.
- SPVM::Builder::Ninja: Optimize log writing by keeping the file handle open and using manual flush instead of autoflush.
- SPVM::Builder::Ninja: Rename log methods and internal fields (e.g., log_entries_h to entries_h) for simplicity and clarity.
- SPVM::Builder::CompileInfo: Remove the obsolete no_generate field and rename input_file to source_file.
- SPVM::Builder::LinkInfo: Remove the obsolete no_generate field.
- Test: Update test scripts to use default imports to ensure API initialization and update expectations for hashed object paths using glob patterns.
Documentation
Executing SPVM programs
Generating Excutable File
Class Dependencies Analyzer
Generating SPVM Distribution
A tool to list non-core CPAN dependencies recursively.
Modules
The SPVM Language
Address
Array Utilities
SPVM object
SPVM Array
SPVM Class
SPVM string
A Boolean value as An Object
Build Dynamic Libraries for SPVM Distribution
Builder APIs
Compilation and Link of Native Class
Compiler Information
Config for Compiling and Linking Native Classes
Config for Compiling and Linking Native Classes
Configuration for Dynamic Link Libraries
Configuration for Executable Files
Excutable File Config
Config for Linking Native Classes
Config Builder
Utility for Analyzing Class Dependencies
Creating Executable File
Library Information for A Linker
Linker Information
Basic Type Native APIs
Class File Native APIs
Compiler Native APIs
Runtime Environment
Method Native APIs
Runtime
Runtime Stack
Object File Information
Resource
Script Information
Builder Utilities
Builder Utility APIs
A byte Value as An Object
Dynamic byte Arrays
Callback interface
A Callback Interface for grep Method
A Callback Interface for grep_byte Method
A Callback Interface for grep_double Method
A Callback Interface for grep_float Method
A Callback Interface for grep_int Method
A Callback Interface for grep_long Method
A Callback Interface for grep_short Method
A Callback for The map Method
A Callback for The map_expand Method
Information about a Caller
Interface Type to Clone Object
Interface Type for the Callback to Clone a Object
Command Line Information
Comparable Interface
Interface Type for Object Comparation Callback
Interface Type for double Comparation Callback
Interface Type for float Comparation Callback
Interface Type for int Comparation Callback
Interface Type for long Comparation Callback
Interface Type for String Comparation Callback
double Complex Type
float Complex Type
Countable Interface
SPVM Documents
Environment Variables
SPVM Language Specification
Classes in the SPVM Language
Exception Handling in the SPVM Language
Garbage Collection in the SPVM Language
Operators in the SPVM Language
Statements in the SPVM Language
Syntax Parsing in the SPVM Language
System Setting in the SPVM Language
Tokenization in the SPVM Language
Types in the SPVM Language
SPVM Standard Modules
Native APIs
Allocator Native APIs
Argument Native APIs
Basic Type Native APIs
Class File Native APIs
Class Variable Native APIs
Compiler Native APIs
Field Native APIs
Internal Native APIs
Method Native APIs
Mutex Native APIs
Runtime Native APIs
String Buffer Native APIs
Type Native APIs
Native Classes
Resource
A double value as An Object
Dynamic double Arrays
EqualityCheckable Interface
Interface Type for Object Equality Checking Callback
a callback implementation of EqualityChecker to check if the memory addresses of the two objects are equal.
Error
Compilation Errors
Field Not Specified Errors
Method Call Not Permitted Error
Not Supported Error
System Error
Invalid UTF8 Errors
SPVM Exchange API
Class Object
Error Code
A float value as An Object
Dynamic float Arrays
SPVM Starndard Functions
Format Utilities
SPVM Global Instance
Hash (Associative Array)
Hash entry
Immutable byte Array
Immutable double Array
Immutable float Array
Immutable int Array
Immutable long Array
Immutable short Array
Immutable string array
An int value as An Object
Dynamic int Arrays
Dynamic Object Array
A long value as An Object
Dynamic long Arrays
Getting the current native environment, stack, runtime, compiler.
Native APIs
Information of Arguments
Information of Basic Types
Information of Class Files
Information of Class Variables
Native::Compiler
Constant Values in Native APIs
Runtime Environment
Information of Fields
Information of Methods
Method Call
Native::Runtime
Call Native::Stack
Pack and Unpack Operations
A Specifier for a pack/unpack Template.
Point
Point 3D
List with O(1) deque
SPVM information
Executing Callback at End of Scope
A short Value as An Object
Dynamic short Arrays
Sorting Functions
String Buffers
Dynamic string array
Stringable Interface
Interface Type for Stringing Callback
Mutex
Provides
in lib/SPVM/Builder/Accessor.pm
in lib/SPVM/Builder/Config/Exe/MSVC.pm
in lib/SPVM/Builder/Ninja.pm
in lib/SPVM/Dist.pm
Examples
- examples/doc/tutorial/basic/lib/SPVM/MyMath.spvm
- examples/doc/tutorial/basic/sum.pl
- examples/doc/tutorial/precompile/lib/SPVM/MyMath.spvm
- examples/doc/tutorial/precompile/sum_precompile.pl
- examples/native/bind_clib/bind_clib.pl
- examples/native/bind_clib/lib/SPVM/BindCLib.c
- examples/native/bind_clib/lib/SPVM/BindCLib.config
- examples/native/bind_clib/lib/SPVM/BindCLib.native/include/bind_clib.h
- examples/native/bind_clib/lib/SPVM/BindCLib.native/src/bind_clib.c
- examples/native/bind_clib/lib/SPVM/BindCLib.spvm
- examples/native/cuda_add/cuda_add.pl
- examples/native/cuda_add/lib/SPVM/MyAdd.config
- examples/native/cuda_add/lib/SPVM/MyAdd.cu
- examples/native/cuda_add/lib/SPVM/MyAdd.native/include/cuda_array_culc.h
- examples/native/cuda_add/lib/SPVM/MyAdd.native/src/cuda_array_culc.cu
- examples/native/cuda_add/lib/SPVM/MyAdd.spvm
- examples/native/eigen/README
- examples/native/gsl/lib/SPVM/MyGSL.c
- examples/native/gsl/lib/SPVM/MyGSL.config
- examples/native/gsl/lib/SPVM/MyGSL.spvm
- examples/native/gsl/mygsl.pl
- examples/native/opencv/resize/lib/SPVM/MyOpenCVResize.config
- examples/native/opencv/resize/lib/SPVM/MyOpenCVResize.cpp
- examples/native/opencv/resize/lib/SPVM/MyOpenCVResize.spvm
- examples/native/opencv/resize/linux-pengin-output.png
- examples/native/opencv/resize/linux-pengin.png
- examples/native/opencv/resize/opencv_resize.pl
- examples/native/openmp/lib/SPVM/MyOpenMP.c
- examples/native/openmp/lib/SPVM/MyOpenMP.config
- examples/native/openmp/lib/SPVM/MyOpenMP.spvm
- examples/native/openmp/openmp.pl
- examples/native/zlib/lib/SPVM/MyZlib.c
- examples/native/zlib/lib/SPVM/MyZlib.config
- examples/native/zlib/lib/SPVM/MyZlib.spvm
- examples/native/zlib/zlib.pl
- examples/spvmcc/basic/README.txt
- examples/spvmcc/basic/SPVM/MyApp.spvm
- examples/spvmcc/basic/myapp