History log of /PHP-8.1/Zend/zend_compile.h (Results 26 – 50 of 980)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# cc3e03c5 25-Jan-2021 Nikita Popov

Fix parsing of semi-reserved tokens at offset > 4 GB

To avoid increasing the size of parser stack elements by storing
size_t offset and length, this instead only stores the start
off

Fix parsing of semi-reserved tokens at offset > 4 GB

To avoid increasing the size of parser stack elements by storing
size_t offset and length, this instead only stores the start
offset (or rather pointer now) and determines the length of the
identifier in zend_lex_tstring.

show more ...

# 3370b5fd 21-Jan-2021 Nikita Popov

Accept zend_string in zend_prepare_string_for_scanning

# b3bbb8fe 19-Jan-2021 Dmitry Stogov

Mark classes cached by opcache by ZEND_ACC_CACHED flag and prevent useless copying and desrpoying of immutable data.

# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...

# 2772751b 27-Sep-2020 Nikita Popov

Make constexpr compilation robust against multiple compilation

Instead of setting the old AST type to zero, replace the AST with
the compiled constexpr AST zval. This requires passing in

Make constexpr compilation robust against multiple compilation

Instead of setting the old AST type to zero, replace the AST with
the compiled constexpr AST zval. This requires passing in a
zend_ast** instead of a zend_ast*.

This allows compiling ASTs containing constexprs multiple times
-- the second time, the existing compiled representation will be
resused.

This means we no longer need to copy the attributes AST for
promoted properties.

show more ...

# 3228d685 15-Sep-2020 Dmitry Stogov

Renumber ZEND_ACC_... constants

# f5dbebd8 07-Sep-2020 Nikita Popov

Accept zend_string instead of zval in zend_compile_string

# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...

Revision tags: php-7.3.18RC1, php-7.2.30, php-7.3.17
# d92229d8 06-Apr-2020 Nikita Popov

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument nam

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

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

Closes GH-5357.

show more ...

# 9bf11983 24-May-2020 Ilija Tovilo

Implement nullsafe ?-> operator

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

Closes GH-5619.

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

# 653e4ea1 14-May-2020 Nikita Popov

Add flag to forbid dynamic property creation on internal classes

While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-c

Add flag to forbid dynamic property creation on internal classes

While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-clonable
(unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES
flag, that also forbids the creation of dynamic properties on these objects.
This is a subset of #3931 and targeted at internal usage only
(though may be extended to userland at some point in the future).

It's already possible to achieve this (what the removed
WeakRef/WeakMap code does), but there's some caveats: First, this
simple approach is only possible if the class has no declared
properties, otherwise it's necessary to special-case those
properties. Second, it's easy to make it overly strict, e.g. by
forbidding isset($obj->prop) as well. And finally, it requires a
lot of boilerplate code for each class.

Closes GH-5572.

show more ...

# b03cafd1 05-Jun-2020 Nikita Popov

Fix bug #77966: Cannot alias a method named "namespace"

This is a bit tricky: In this cases we have "namespace as", which
means that we will only recognize "namespace" as an identifier w

Fix bug #77966: Cannot alias a method named "namespace"

This is a bit tricky: In this cases we have "namespace as", which
means that we will only recognize "namespace" as an identifier when
the lookahead token is already at the "as". This means that
zend_lex_tstring picks up the wrong identifier.

We solve this by actually assigning the identifier as the semantic
value on the parser stack -- as in almost all cases we will not
actually need the identifier, this is just an (offset, size)
reference, not a copy of the string.

Additionally, we need to teach the lexer feedback mechanism used
by tokenizer TOKEN_PARSE mode to apply feedback to something
other than the very last token. To that purpose we pass through
the token text and check the tokens in reverse order to find the
right one.

Closes GH-5668.

show more ...

# 88355dd3 07-Jun-2020 twosee

Constify char * arguments of APIs

Closes GH-5676.

Revision tags: php-7.3.17RC1
# 064b4644 24-Mar-2020 Nikita Popov

Implement "Constructor Promotion" RFC

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

Closes GH-5291.

# a7908c2d 24-May-2020 Benjamin Eberlei

Add Attributes

Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>

# 19e886d9 24-Apr-2020 Nikita Popov

Avoid throw expression leaks

Mark "throw" used in expression context with a flag, and don't
treat it as a BB terminator in that case. This prevents us from
optimizing away the follow

Avoid throw expression leaks

Mark "throw" used in expression context with a flag, and don't
treat it as a BB terminator in that case. This prevents us from
optimizing away the following opcodes as unreachable, which may
result in live ranges being dropped incorrectly.

Close GH-5450.

show more ...

# 08c5c69e 17-Apr-2020 Nikita Popov

Remove ZEND_ACC_DTOR flag

This is only used in reflection, where doing a simple string check
is acceptable.

I'm also dropping the "dtor" printing in the reflection dump.
Dto

Remove ZEND_ACC_DTOR flag

This is only used in reflection, where doing a simple string check
is acceptable.

I'm also dropping the "dtor" printing in the reflection dump.
Dtors are just one of many magic methods, I don't think there's
a point in explicitly highlighting them, when the name is already
unambiguous.

show more ...

# bac5137e 14-Apr-2020 Nikita Popov

Add zend_create_member_string() API

This is a recurring pattern.

# 3709e74b 06-Apr-2020 Máté Kocsis

Store default parameter values of internal functions in arg info

Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal function

Store default parameter values of internal functions in arg info

Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

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

show more ...

# 1ed132e2 01-Apr-2020 Nikita Popov

Unify checks for binary operator errors for ct eval

Move everything into one function and share it with opcache.
This fixes some discrepancies.

Revision tags: php-7.3.18, php-7.3.16, php-7.3.16RC1
# 819a872c 27-Feb-2020 Nikita Popov

Avoid more null arithmetic

# 1949a26a 27-Feb-2020 Nikita Popov

Remove more null arithmetic UB

Introduce an EX_NUM_TO_VAR macro to mirror EX_VAR_TO_NUM and
replace usages of the ZEND_CALL_VAR_NUM(NULL) pattern.

# 0427ef91 27-Feb-2020 Nikita Popov

Avoid null arithmetic UB in EX_VAR_TO_NUM

# 53e527ad 06-Feb-2020 Nikita Popov

Remove ZEND_ACC_IMPLEMENT_INTERFACES flag

This is equivalent to checking ce->num_interfaces. The only subtle
moment is during inheritance, where num_interface may change when
parent

Remove ZEND_ACC_IMPLEMENT_INTERFACES flag

This is equivalent to checking ce->num_interfaces. The only subtle
moment is during inheritance, where num_interface may change when
parent interfaces are inherited. The check in zend_do_link_class
thus uses "interfaces", not "ce->num_interfaces".

show more ...

# f57f0920 06-Feb-2020 Nikita Popov

Remove ZEND_ACC_IMPLEMENTS_TRAITS flag

This is equivalent to checking ce->num_traits.

12345678910>>...40