Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php/php-src
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cd8312e
Choose a base ref
...
head repository: php/php-src
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 30f0cf6
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 2, 2026

  1. JIT: Avoid object type check if the object is known to be a type

    Before:
    ```asm
    	mov    %r15,%r14
    	lea    0x50(%r14),%rdi       ; &CV0($o)
    	cmpb   $0x8,0x58(%r14)       ; Check IS_OBJECT
    	jne    not_an_object         ; ...
    	mov    (%rdi),%rax           ; Z_OBJ_P($o)
    	lea    -0x77280f9(%rip),%rcx ; ce to compare against
    	cmp    0x10(%rax),%rcx       ; Z_OBJ_P($o)->ce == ce
    	je     wrong_ce
    	...
    ```
    
    After:
    ```asm
    	mov    %r15,%r14
    	lea    0x50(%r14),%rdi       ; &CV0($o)
    	mov    (%rdi),%rax           ; Z_OBJ_P($o) (known to be an object)
    	lea    -0x77280f9(%rip),%rcx ; ce to compare against
    	cmp    0x10(%rax),%rcx       ; Z_OBJ_P($o)->ce == ce
    	je     wrong_ce
    	...
    ```
    
    This also helps with an `?Foo` type check: it can skip the IS_OBJECT and IS_NULL check.
    
    This also simplifies `zend_jit_verify_arg_type`: the
    `(type == IS_UNKNOWN || type == IS_OBJECT)` check becomes always-true.
    ndossche committed Oct 2, 2026
    Configuration menu
    Copy the full SHA
    30f0cf6 View commit details
    Browse the repository at this point in the history
Loading