- Remove unnecessary blank line after namespace declaration
- Move literal string getter declaration to proper location after include check
- Remove trailing newlines from enum class and function declarations
- Consolidate cache-related function declarations in proper order
- Renamed typephp_get_method_call_cache to get_method_call_cache
- Renamed typephp_get_function_call_cache to get_function_call_cache
- Renamed typephp_get_function_resolution_cache to get_function_resolution_cache
- Updated all references in compiler base and translator classes
- Modified renderDataDeclarations to accept includeGlobals parameter
- Added renderGlobalDeclarationsForSource to handle per-source global declarations
- Updated extension generation to use new naming convention
- Adjusted test assertions to match new function names
- Added test for toStdList and toStdDict methods validating PHP array conversion with type preservation
- Included tests for late static calls from instance methods retaining receiver on inherited and overridden methods
- Added tests verifying late static calls distinguish parent and child private methods in instance context
- Covered various scenarios including scalar conversions, object arrays, and error handling cases
- Verified proper behavior with numeric keys, class inheritance, and dynamic method calls
- Tested type validation for list and dictionary conversions with multiple data types
- Updated swoole/phpx version constraint in composer.json
- Bumped dependency from ~2.8.2 to ~2.9.0
- Maintains tilde operator for minor version flexibility
- Create test for nested unset behavior with numeric string keys in empty array
- Verify proper removal of numeric string keys when using unset operation
- Confirm expected array structure after unset operations
- Document issue #114 related to numeric string key handling
- Fixed __FUNCTION__ to use short name instead of full namespaced name in method context
- Added conditional logic to prepend namespace only when not in method definition
- Added test case to verify proper behavior of __FUNCTION__ and __METHOD__ constants
- Ensured magic constants return correct values based on their usage context
- Updated parser logic to distinguish between function and method definitions properly
- Implemented parseNestedArrayUnset method to handle chained array dimension unsets
- Added logic to process nested ArrayDimFetch expressions in unset statements
- Created proper dimension parsing and code generation for nested array operations
- Maintained PHP evaluation order for key materialization in nested unsets
- Added comprehensive test coverage for nested unset chain behavior
- Extended compiler tests to verify correct handling of complex unset scenarios
- Added "Start All" button to UI with proper enable/disable logic
- Implemented startAll method to start all non-running tunnels at once
- Added logic to skip already running or transitioning tunnels
- Implemented failure collection and reporting for individual tunnel errors
- Updated README documentation with new feature description
- Added start_all_test.php to
- Support single array parameter initialization for std::array, std::vector, std::map,
std::orderedMap, std::list, and std::dict
- Implement type inference from array initializer expressions with exact type matching
- Add rectangular shape validation for std::array initializers
- Generate appropriate C++ code for value initializers using lambda expressions
- Update documentation to reflect new value initializer capabilities
- Add comprehensive tests for valid and invalid initializer scenarios
- Defer StdFunc/StdArgInfo implementation as documented in design records
- Add acceptsCallable property to ArgInfo entity to track callable type acceptance
- Implement logic to detect when function parameters accept callable types
- Add normalization of bare function callable arguments to string representation
- Create helper methods to check if types contain callable declarations
- Add resolution logic for bare identifier function names in callable context
- Update native class support to set acceptsCallable flag based on type checking
- Modify preprocessor to populate acceptsCallable field during argument parsing
- Remove deprecated typeDeclContainsCallable method and consolidate logic
- Add comprehensive test coverage for bare
- 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