Skip to content

Commit 834b074

Browse files
committed
Revert "Add todos for constant autoloading lookups"
This reverts commit f599fb8.
1 parent f599fb8 commit 834b074

File tree

5 files changed

+0
-6
lines changed

5 files changed

+0
-6
lines changed

Zend/zend_builtin_functions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ ZEND_FUNCTION(define)
523523

524524
/* {{{ Check whether a constant exists
525525
Warning: This function is special-cased by zend_compile.c and so is usually bypassed */
526-
// TODO Update this and compiler
527526
ZEND_FUNCTION(defined)
528527
{
529528
zend_string *name;

Zend/zend_constants.c

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

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

304303
static zend_constant *zend_get_constant_impl(zend_string *name)
305304
{
306-
// TODO Use lookup
307305
zend_constant *c = zend_hash_find_ptr(EG(zend_constants), name);
308306
if (c) {
309307
return c;

Zend/zend_execute.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4599,7 +4599,6 @@ static zend_always_inline zend_result _zend_quick_get_constant(
45994599
zend_constant *c = NULL;
46004600

46014601
/* null/true/false are resolved during compilation, so don't check for them here. */
4602-
// TODO Create a constant_lookup
46034602
zv = zend_hash_find_known_hash(EG(zend_constants), Z_STR_P(key));
46044603
if (zv) {
46054604
c = (zend_constant*)Z_PTR_P(zv);

Zend/zend_vm_def.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5839,7 +5839,6 @@ ZEND_VM_HOT_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED|CONST_FETCH, CONST, CACHE_SL
58395839
}
58405840

58415841
SAVE_OPLINE();
5842-
// TODO Constant lookup
58435842
zend_quick_get_constant(RT_CONSTANT(opline, opline->op2) + 1, opline->op1.num OPLINE_CC EXECUTE_DATA_CC);
58445843
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
58455844
}

Zend/zend_vm_execute.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33226,7 +33226,6 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPE
3322633226
}
3322733227

3322833228
SAVE_OPLINE();
33229-
// TODO Constant lookup
3323033229
zend_quick_get_constant(RT_CONSTANT(opline, opline->op2) + 1, opline->op1.num OPLINE_CC EXECUTE_DATA_CC);
3323133230
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
3323233231
}

0 commit comments

Comments
 (0)