Skip to content

Commit 8446b56

Browse files
committed
Add todos for constant autoloading lookups
1 parent d102f27 commit 8446b56

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Zend/zend_constants.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ ZEND_API bool zend_verify_const_access(zend_class_constant *c, zend_class_entry
276276
}
277277
/* }}} */
278278

279+
// TODO Add support for auto-loading?
279280
static zend_constant *zend_get_constant_str_impl(const char *name, size_t name_len)
280281
{
281282
zend_constant *c = zend_hash_str_find_ptr(EG(zend_constants), name, name_len);
@@ -302,6 +303,7 @@ ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len)
302303

303304
static zend_constant *zend_get_constant_impl(zend_string *name)
304305
{
306+
// TODO Use lookup
305307
zend_constant *c = zend_hash_find_ptr(EG(zend_constants), name);
306308
if (c) {
307309
return c;

Zend/zend_execute.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4493,6 +4493,7 @@ static zend_always_inline zend_result _zend_quick_get_constant(
44934493
zend_constant *c = NULL;
44944494

44954495
/* null/true/false are resolved during compilation, so don't check for them here. */
4496+
// TODO Create a constant_lookup
44964497
zv = zend_hash_find_known_hash(EG(zend_constants), Z_STR_P(key));
44974498
if (zv) {
44984499
c = (zend_constant*)Z_PTR_P(zv);

0 commit comments

Comments
 (0)