History log of /PHP-8.2/Zend/Optimizer/pass1.c (Results 1 – 22 of 22)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 3b62d660 04-Aug-2022 sji

Implement constants in traits (#8888)

RFC: https://wiki.php.net/rfc/constants_in_traits

# 4543cd32 30-Dec-2021 Nikita Popov

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negat

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negative effect. It also adds additional
complexity for optimizations.

Drop JMPZNZ in favor of JMPZ+JMP or JMPNZ+JMP.

Closes GH-7857.

show more ...

# 1050edae 26-Dec-2021 Nikita Popov

Extract special function evaluation from pass1

Pass1 handles a number of special functions that can be evaluated
under some circumstances. Move the core logic into a separate
helper,

Extract special function evaluation from pass1

Pass1 handles a number of special functions that can be evaluated
under some circumstances. Move the core logic into a separate
helper, as I believe that SCCP should reuse this.

show more ...

# 924e8756 26-Dec-2021 Nikita Popov

Minor code cleanup in pass1

Move literal destruction into helper and use a common result
variable to make code more compact.

# 206d80e1 25-Dec-2021 Nikita Popov

Reuse get_class_entry_from_op1() helper

Export and reuse this helper in places that fetch a class entry
from op1.

# 2cf93032 25-Dec-2021 Nikita Popov

Sink op_array scope case into get_class_entry()

This handles references to the current class through its name
rather than self (and for cases where is is not linked yet and
thus not

Sink op_array scope case into get_class_entry()

This handles references to the current class through its name
rather than self (and for cases where is is not linked yet and
thus not covered by the context lookup). Rather than handling this
only for FETCH_CLASS_CONSTANT optimization, integrate this into
the generic get_class_entry() utility.

show more ...

# 046096f2 25-Dec-2021 Nikita Popov

Remove outdated FETCH_CLASS handling in FETCH_CLASS_CONSTANT optimization

Nowadays self::X is represented using an UNUSED operand with
FETCH_CLASS_SELF flag rather than a separate FETCH_

Remove outdated FETCH_CLASS handling in FETCH_CLASS_CONSTANT optimization

Nowadays self::X is represented using an UNUSED operand with
FETCH_CLASS_SELF flag rather than a separate FETCH_CLASS instruction.
The code already handles the new pattern.

show more ...

# f6dce4a8 25-Dec-2021 Nikita Popov

Extract common replacement login in pass1

The replace const or replace with QM_ASSIGN pattern is common to
all constant folding, extract it into a function.

# 08840484 25-Dec-2021 Nikita Popov

Don't exclude arrays from constant collection

These are supported as constants nowadays, so we can drop the
string check.

Also fix a potential leak, though I believe this doesn'

Don't exclude arrays from constant collection

These are supported as constants nowadays, so we can drop the
string check.

Also fix a potential leak, though I believe this doesn't matter in
current usage, as it will effectively be suppressed during persist.

show more ...

# 09e991f3 06-Dec-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Don't convert assign op operand types in opcache


# cf377eef 06-Dec-2021 Nikita Popov

Don't convert assign op operand types in opcache

This is the same change as 56b18d478ed9e40afd66860e82017d5c2017eac1
but for ASSIGN_OP. Changing the operand type may change the error

Don't convert assign op operand types in opcache

This is the same change as 56b18d478ed9e40afd66860e82017d5c2017eac1
but for ASSIGN_OP. Changing the operand type may change the error
message and can result in different behavior with operator overloading.

As with the other patch, if there is strong interest this could be
added to the DFA pass instead, with an appropriate type check.

show more ...

# 1845b712 18-Nov-2021 Nikita Popov

Remove commented code in pass1

This has been disabled for a long time, and the whole optimization
is no longer relevant given changes in PHP 8.1

# fea9b5cf 20-Sep-2021 George Peter Banyard

Use zend_string_equals_literal() macro

# a4e20680 10-Aug-2021 Nikita Popov

Use zend_string_equals_literal_ci()

# 0d9269de 18-Jun-2021 Nikita Popov

Extract helper for fetching class entry in optimizer

This code is repeated a few time. Two occurrences additionally
contained checks for user classes in CG(class_table) with the
same

Extract helper for fetching class entry in optimizer

This code is repeated a few time. Two occurrences additionally
contained checks for user classes in CG(class_table) with the
same file name, but as far as I know these should always be in
the script class_table, so I'm omitting the check here.

show more ...

# b6958bb8 31-May-2021 George Peter Banyard

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

show more ...

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

# fd1d5ec2 28-Apr-2021 Nikita Popov

Add ZEND_CLASS_CONST_FLAGS() macro

And drop Z_ACCESS_FLAGS(). We no longer store *only* access flags
in these.

# 6cd0b48c 19-Apr-2021 Matt Brown

Implement never return type

The never type can be used to indicate that a function never
returns, for example because it always unwinds.

RFC: https://wiki.php.net/rfc/noreturn_t

Implement never return type

The never type can be used to indicate that a function never
returns, for example because it always unwinds.

RFC: https://wiki.php.net/rfc/noreturn_type

Closes GH-6761.

show more ...

# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...

# 09efad61 08-Apr-2021 George Peter Banyard

Use zend_string_equals_(literal_)ci() API more often

Also drive-by usage of zend_ini_parse_bool()

Closes GH-6844

# 83be073a 26-Jan-2021 Nikita Popov

Move optimizer into core

This only moves the files, adjusts the build system, exports APIs
and does minor fixups to make sure the code builds.

This does not yet try to make the

Move optimizer into core

This only moves the files, adjusts the build system, exports APIs
and does minor fixups to make sure the code builds.

This does not yet try to make the optimizer usable independently
of opcache.

Closes GH-6642.

show more ...