- Introduce StdVector, StdMap, and StdOrderedMap parameter attributes
- Add explicit std-container contract to ArgInfo entity
- Implement parameter validation and type checking logic
- Add error handling for invalid container parameter usage
- Support container parameter contracts in function signatures
- Generate automatic type conversion at function entry points
- Add compilation tests for std container parameter contracts
- Update documentation with container parameter rules and examples
- Implement compatibility checks between child and parent classes
- Add support for container parameters in trait methods and inheritance
- Add constant initialization code separation with before/after statement handling
- Implement constant finalization logic to prevent metadata replacement during re-parsing
- Create scoped initialization blocks using do-while constructs for temporary variables
- Add codegenFinalized flag to track constant processing state
- Introduce new test case for global nested array constants initialization
- Add incremental declaration test for constant initializer preservation
- Move constant value parsing to dedicated finalizeGlobalConstantValue method
- Update translator to handle scoped constant initialization code generation
- Changed $candidate to $autoloadFile for better readability
- Updated variable references in conditional check
- Maintained same logic for autoload file path construction
- Kept existing rtrim functionality for directory separators
- Preserved array uniqueness check with in_array function
- Replace direct require of TYPEPHP_ROOT_PATH . '/vendor/autoload.php' with resolveComposerAutoloader() function
- Add new resolveComposerAutoloader() function to locate Composer autoloader from multiple candidate paths
- Support both source checkout and packaged SDK environments by checking TYPEPHP_ROOT_PATH and PHP_HOME
- Implement fallback mechanism to search for vendor/autoload.php in different locations
- Add detailed error reporting when autoloader is not found with specific search paths
- Include installation instructions in error output when dependencies are missing
- Exit with error code 1 when autoloader cannot be located
- Update bundled php.ini to use extension_dir = "./ext/" instead of absolute CI runner path
- Add makeWindowsPhpIniPortable function to rewrite extension_dir during packaging
- Preserve enabled extensions and line endings while removing CI-specific path settings
- Include php.exe, php.ini, and ext/php_zip.dll in required archive entries
- Add verification step to ensure packaged PHP runtime works correctly after relocation
- Test
- Add getDeclarationInputFiles method to include stub files in header generation
- Modify incremental compilation to process stub files alongside regular PHP files
- Update build state tracking to handle stub files differently (no translation units)
- Add test coverage for stub declaration generation and dependency invalidation
- Implement MSVC /bigobj flag for large object format support in generated commands
- Generate wrapper callbacks for stub functions and methods bridging to native implementations
- Update source pipeline to handle native/import stub metadata in module entry
- Modify declaration header generation to include stub callback registrations
- Add comprehensive test suite for stub functionality
- Add loadPristineAst method to CompilerBase for independent AST loading
- Introduce PreparedProjectCacheTrait with conservative whole-project caching mechanism
- Implement translation unit splitting for large C++ files with splitLargeTranslationUnit
- Add preprocessing warning count tracking in CompilerDiagnosticTrait
- Enhance gen_stub.php to use cached AST when available instead of reparsing
- Improve incremental compilation checks with splitTranslationUnits validation
- Add comprehensive test coverage for AST caching, prepared project cache, and translation unit splitting
- Optimize precompiled header manager with dependency digest caching and improved invalidation
- Implement file digest memoization for faster native compilation input processing
- Add support for persistent AST cache reuse across compiler processes
- Add CompilerGeneratorFingerprintTest to verify embedded snapshot usage
- Test that compiler snapshots are stable and change with source or options
- Verify ordinary programs and extensions do not register compiler snapshots
- Add separate process attribute for accurate testing conditions
- Test incremental generator fingerprint generation and registration logic
feat(build): implement compiler build fingerprint registration
- Embed immutable source snapshot in self-hosted compiler builds
- Add fallback mechanism for executables built before metadata introduction
- Optimize performance by avoiding expensive source file hashing
- Generate compiled generator fingerprint registration during translation
- Prevent recursive fingerprinting in repeated self-hosted builds
- Register compiler build fingerprint only for binary builds with specific criteria
- Move large array-valued class constant initialization from module_init() to isolated functions
- Generate independent cacheable translation units for request-lifecycle helpers
- Add static zend_class_entry pointers with null initialization for module entry unit
- Preserve arginfo-backed class registration in extension-*.cc while splitting array constants
- Implement proper cleanup of split lifecycle sources during incremental builds
- Cache PHP SDK discovery results to avoid repeated php-config invocations
- Add comprehensive tests for class constant lifecycle splitting behavior
- Verify static class entry declarations do not expose unnecessary linkable symbols
- Add explicit response file path support to compiler backends
- Implement TYPEPHP_COMPILER_EXECUTABLE constant for compiler fingerprinting
- Add exception handling for native source project compilation
- Create dedicated extension header inclusion logic to reduce build invalidations
- Implement small task lane reservation in parallel compilation
- Add DOM extension requirement check for native project support
- Optimize symbol collection with single depth-first AST walk
- Add request array default metadata finalization
- Implement content-based rather than timestamp-based object caching
- Add link cache metadata file management
- Update incremental compilation to preserve timestamps for identical content
- Add comprehensive test coverage for response file and caching features
- Replace sequential indexing with stable ID allocation for persistent entities
- Add StableIdRegistry to maintain consistent IDs across builds
- Implement incremental compilation with dependency tracking
- Add IncrementalBuildState for tracking file dependencies and dirty propagation
- Update anonymous class generation to use stable call site IDs
- Modify type ID allocation to start from 1 and avoid renumbering
- Add literal string ID allocation using stable registry
- Implement global variable usage recording and tracking
- Add dependency symbols for classes, functions, constants, and globals
- Update property and function index allocation to use stable IDs
- Add cache site ID allocation based on call site context
- Implement compilation statistics merging and delta calculation
- Add file writing with content comparison to avoid unnecessary writes
- Implement incremental build cache clearing functionality
- Add metadata restoration for incremental compilation
- Create dependency graph building and dirty file propagation logic
- Implement translation unit emission tracking for incremental builds
- Updated swoole/phpx from ~2.8.1 to ~2.8.2
- Removed ext-dom requirement from composer.json
- Maintained ajaxray/ansikit at ^0.3 version
- Kept other dependency versions unchanged
- Implemented AstCache class with schema versioning and file-based storage
- Added cache validation using source hash, PHP version, and parser version
- Integrated atomic file operations to ensure cache consistency
- Updated CompilerBase to use lazy-initialized AST cache instance
- Replaced direct parser calls with cache-aware load operations in preprocessor
- Modified translator to utilize cached AST instead of reparsing
- Added comprehensive test coverage including cache hit, invalid
- Fixed private method accessibility check to properly return empty string
when method is private and inaccessible
- Updated property signature resolution to preserve method metadata for
nullable object properties
- Modified final class check to require non-nullability for typed property
receiver optimization
- Added test case for nullable typed property preserving by-reference
arguments when non-null
- Added test case for typed property following runtime protected override
or __call target
- Add reflection to access compiler's persistentFuncMap and literalStrings properties
- Retrieve actual function ID and string ID for 'get_class' at runtime
- Replace hardcoded regex values with dynamic IDs from compiler state
- Ensure polymorphic get_class dispatch uses correct persistent function lookup
- Maintain existing assertion logic while making test more robust to compiler changes
- Removed pcntl dependency and related functions from PlatformBase and Windows classes
- Implemented proc_open-based process pool in NativeBuilder for cross-platform parallel compilation
- Updated dispatchParallel to dispatchProcessParallel with new process management logic
- Modified Translator to use process pool instead of pcntl for parallel compilation
- Added fallback to sequential compilation when proc_open is unavailable
- Updated ParallelCompileTest to use process-based tests instead of pcntl mocking
- Bumped version from 0.8.1 to 0.8.2 in project configuration files
* fix(compiler): preserve runtime class dispatch and introspection for polymorphic objects
When an object variable has an upper-bound declared type (e.g. assigned from
a function or method return), SSA marks it as a stable object. However,
stableObjects does not guarantee the concrete runtime class: the instance
may be a subclass at runtime, or null if nullable.
1. FuncCallOptimizer::genGetClassOptimized checked isStableObject($obj->name)
and folded get_class($obj) to the declared type literal string. For
$a = getAnimal() returning a Dog, get_class($a) was incorrectly folded
to "Animal" at compile time.
2. MethodCallTrait::parseStaticCall checked isStableObject($class) and
jumped to _do_call with the declared base class. For $a::who(), this
statically invoked Base::who() instead of dispatching to Dog::who() on
the runtime object.
Require proven exact object instances (exactObjects, populated from direct
new ConcreteClass() definitions) before folding get_class() or devirtualizing
static calls on object variables. Non-exact variables fall back to runtime
class resolution (php::fn::get_class() and php::callStaticMethod()),
matching PHP semantics.
Add unit test coverage verifying exact objects continue to fold/devirtualize
while polymorphic variables retain dynamic runtime dispatch.
* fix(compiler): preserve lexical scope in dynamic static calls and runtime type checks for get_class
- Use php::callScoped with getCallableScopeExpr() for dynamic static calls inside class methods to preserve caller visibility on protected methods
- Fall back to runtime php::call for get_class on non-exact values so nullable objects throw TypeError instead of dereferencing null
- Add behavioral PHPT tests for protected polymorphic static calls and nullable get_class
- Update unit tests for scoped dispatch and runtime introspection
* test(compiler): remove stray top-level main call from PHPT tests
In TypePHP AOT compilation, function main(): void serves as the binary
entrypoint. Top-level function calls outside a function are rejected by
the preprocessor as stray code.
* fix(compiler): resolve function imports before dispatch and policy checks
* test: close PHP section in function import PHPT
* fix(compiler): resolve first-class function aliases
* fix(compiler): preserve called class in direct method calls
* fix(compiler): resolve called-class function targets
* fix(compiler): retain optimized namespace builtins
- Add materializeTrailingDefaults parameter to CallArgumentGenerator for default argument handling
- Implement native object stack slot allocation and promotion analysis
- Add nativeStackPromotions context tracking for non-escaping object allocations
- Generate NativeStackSlot declarations in compiler base code generation
- Update native method call generation to use direct member access patterns
- Add comprehensive native object member name validation and conflict detection
- Implement native destructor state management and finalization chains
- Add test cases for native class member name conflicts and stack promotion scenarios
- Replace nativeDeref calls with nativeRequireObject for improved object access safety
- Introduce CompilationStatistics class to track function, class, type, and dynamic capability usage
- Add statistics collection to CompilerBase for functions, classes, and types during conversion
- Implement NanoExtensionSelector to convert statistics into selective extension component needs
- Add fine-grained feature selection for standard extension components like arrays, strings, filesystem
- Create ComposerNativeComponent class for selective composition of native package parts
- Extend ComposerNativePackage with component metadata parsing and validation
- Update NanoSourceComposer to use statistics-driven selective composition
- Add test coverage for compilation statistics and extension selection scenarios
- Include example code and comprehensive test suite for new
- Replace syscall-based time functions with CLOCK_MONOTONIC using clock_gettime
- Add 100 Hz PIT timer and COM1 serial input interrupt handling via 8259 PIC
- Implement nanosleep syscall with proper duration calculation and interruptible sleep
- Add blocking console reads that wait for IRQ4 input instead of busy polling
- Update clock resolution to 10 ms (100 Hz) for monotonic clock
- Add proper timer tick tracking and interrupt dispatch mechanism
- Enable hardware interrupts in user mode while maintaining syscall protection
- Add sleep function wrapper around nanosleep in
- Add typephp_os_disk_cache_bytes function to return ATA cache size
- Implement C++ terminate function with typephp_os_panic call
- Create new free.cc with php_os_memory_value native function
- Add free.php memory reporting command with pool accounting
- Define free.yml build configuration for the new command
- Update hello.yml with additional compiler flags
- Add syscall declaration to ioctl.c
- Introduce arena_begin variable and typephp_os_memory_total function
- Implement vfprintf function using vprintf
- Add typephp_os_longjmp implementation with proper asm annotation
- Update fprintf to use v
- Increased ATA cache capacity from 16384 to 65536 sectors for 32 MiB direct-mapped cache
- Expanded bootstrap stack from 16 KiB to 256 KiB with proper headroom for identity-map tables
- Updated userspace syscall interface from int 0x80 to native x86-64 SYSCALL instruction
- Raised QEMU memory allocation from 160M to 512M for improved runtime performance
- Increased kernel reserved memory from 40 MiB to 64 MiB with updated linker script assertion
- Added fixed-console ioctl(TIOCGWINSZ) support for VGA dimension reporting
- Enhanced ATA
- Replace int 0x80 with native x86-64 SYSCALL instruction for faster system calls
- Add syscall number 16 for ioctl support with Linux-compatible ABI
- Implement TIOCGWINSZ and TIOCNOTTY terminal ioctls for console size detection
- Add ENOTTY error code definition for inappropriate ioctl operations
- Increase ATA cache capacity from 128 to 16384 entries for better performance
- Change ATA cache from LRU eviction to direct mapping using bitwise AND
- Remove least recently used tracking from ATA cache entries
-
- Move user command sources from user/ to user/cmd/ directory
- Update Makefile to reference user/cmd/ path for compiling .c files
- Restructure user/ directory to separate commands from runtime components
- Add documentation about cmd/ and runtime/ organization in user/README.md
- Update main README.md to reflect new user space structure
- Maintain existing
- Replace global errno variable with __errno_location function
- Add complete strerror implementation for standard error codes
- Implement perror function for error message output
- Move strlen implementation to separate string.c file
- Update getcwd to use new errno macro instead of direct variable
- Mark getcwd as weak symbol to allow overriding
- Remove unimplemented strerror stub from assembly file
- Add 128-bit integer helpers from compiler-rt builtins
- Update third-party dependencies with detailed documentation
- Improve curl download scripts with silent
- Implemented opendir, readdir, closedir, and related directory functions
- Added fcntl system call support with proper flag handling
- Integrated compiler-rt builtins for 128-bit integer operations
- Updated build system to fetch and compile compiler-rt dependencies
- Refactored ls command to use standard POSIX directory APIs
- Added directory file descriptor management in kernel
- Implemented getdents64
- Added Linux-compatible file metadata syscalls (stat, lstat, fstat, newfstatat)
- Implemented access control checks with faccessat and related flag definitions
- Added file persistence operations (fsync, fdatasync, truncate, ftruncate)
- Integrated clock syscalls (gettimeofday, clock_gettime, clock_getres)
- Added process identity queries (getpid, getppid, gettid, getuid, getgid)
- Changed exit mechanism from exit(60) to exit_group(231) for consistency
- Updated crt0.S with Linux x86-64 exit_group ABI compatibility
- Extended fcntl.h with AT_SYMLINK_NOFOLLOW and AT_EACCESS constants
- Added complete syscalls implementation in user/libc.c and runtime/posix.c
- Implemented kernel-side syscall handlers in process.c with proper validation
- Added systest utility to verify file metadata, persistence and identity calls
- Updated Makefile dependencies to track user header changes
- Enhanced README documentation for new
- Configure kernel-only paging with separate user virtual regions
- Add PHP Nano project compilation with link library support
- Implement aligned memory block management for Zend allocator
- Create reusable libtypephp-os.a platform archive for TypePHP userspace
- Add uname system call support and update user-space syscalls
- Increase QEMU memory allocation from 128M to 160M
- Add TNHELLO.ELF as full TypePHP + PHPX
- Remove nm command execution for checking undefined symbols during build
- Add explanatory comment about native objects providing OS ABI to each other
- Update translator to only check undefined symbols in final ELF target
- Clarify that only unresolved imports in final executable cross host boundary
- Maintain auditor checks while removing intermediate object file validation
- Add crt0.S assembly startup code for user mode entry point
- Create hello.php example application with basic system information output
- Add hello.yml build configuration for nano user mode executable
- Implement host.cc with system call interfaces and runtime initialization
- Add linker script for proper user mode memory layout
- Update Makefile with new user base addresses for shell and commands
- Implement posix.c with POSIX compatibility layer using system calls
- Update process.c with new user memory range constants and stack sizes
- Add syscall.S assembly wrapper for Linux system call interface
- Modify vm.c with expanded user address space mapping and cleanup
- Update vmfault.c with correct shell memory address reference
- Add ATA disk cache with LRU eviction strategy and hit/miss statistics
- Introduce disk cache metrics accessible through kernel API
- Update boot sequence to enable long mode and execute-disable page permissions
- Replace custom syscalls with standard POSIX equivalents in user programs
- Add new user utilities including cat, echo and fault testing command
- Enhance FAT16 volume implementation with full path traversal and file operations
- Implement comprehensive filesystem layer supporting nested directories
- Add file operations for reading, writing, creating and deleting files/directories
- Include directory listing and
- Add date command implementation that displays current time in UTC format
- Add pwd command to print current working directory
- Update Makefile to build date and pwd as user programs with shared ELF loading
- Refactor syscall handling to use shared header definitions
- Remove KernelGreeting class from kernel startup sequence
- Update README and ROADMAP documentation for new user commands
- Add test assertions for date and pwd command output in test suite
- Introduce reusable command address space management in process.c
- Add user-accessible page mapping (32-36 MiB) in boot.S with proper permission bits
- Implement ELF64 loader and process management in new process.c module
- Add syscall infrastructure including int 0x80 handler in process-entry.S
- Create userspace programs (sh, ls, cd) with dedicated linker script
- Integrate filesystem path type checking and directory listing functions
- Reserve memory regions for user processes and update kernel memory layout
- Add console input/output support for userspace applications
- Update kernel main loop to start user process after initialization
- Modify Makefile to build and embed userspace ELF images as kernel objects
- Document new userspace capabilities and limitations in README.md
- Implemented low-level ATA PIO driver with read/write/flush operations
- Added FAT16 filesystem layer with directory and file management
- Created bridge between C disk operations and PHP filesystem API
- Integrated disk availability detection and LBA sector access
- Implemented file operations including open, read, write, and close
- Added support for directory creation, file listing and renaming
- Included proper error handling and disk initialization logic
- Include 'std/fs.h' in the list of standard library headers
- Enable filesystem operations support in the translator
- Add file system utility functions access for users
- Add objects section to project.yml for linking precompiled .o/.obj files
- Implement getProjectObjectFiles method to retrieve precompiled objects
- Add c-flags and asm-flags support in CompilerBase
- Extend GCC backend to handle cflags and nativeflags configuration
- Update compiler to include project object files in linking process
- Add freestanding C++ allocation ABI implementation using Zend MM
- Include example TypePHP OS with kernel entry point and hardware stubs
- Add assembly files for boot sequence and kernel entry point
- Implement basic libc compatibility layer for Zend bootstrap
- Add try/catch macro replacement in generated code indentation
- Create bridge between C++ kernel and PHP code
- Add linker script for 64-bit kernel binary generation
- Updated swoole/phpx from ~2.8.0 to ~2.8.1
- Moved swoole/php-nano from require to require-dev with version ^1.0.0
- Updated project version from 0.8.0 to 0.8.1 in project.yml
- Updated file and product versions in project.yml to 0.8.1
- Updated VERSION constant in Translator.php to 0.8.1
- Add native source project compilation workflow with project.xml configuration
- Implement closure reference capture analysis and type degradation for native objects
- Add WASI and nano mode function support checks with comprehensive API exclusions
- Introduce Composer native package discovery and validation system
- Add build scripts for WASI nano program compilation with browser module support
- Implement closure generator enhancements for reference capture handling
- Add CLI usage tests and compiler base API validations
- Integrate php-nano runtime dependencies and native package management
- Add type degradation analysis for closure use variables in generators and functions
- Renamed std::ordered_map to std::orderedMap following camelCase naming convention
- Added new std::object() function to restore concrete object type information
- Updated all test files to use the new orderedMap naming
- Modified parser to recognize orderedmap in assign operations
- Updated documentation to reflect the new naming and function
- Added polyfill implementation for std::object()
- Updated README and changelog with