From b0af9ac7331e3efa0dcee4f43b2ba8b1e4e52f2f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 16 Feb 2018 21:25:49 +0100 Subject: Avoid live range references in opcodes Don't store the live range of the freed variable for FREE_ON_RETURN frees, instead look it up at runtime. As this is an extremely unlikely codepath (in particular, it requires a loop variable with a throwing destructor), saving the runtime lookup of the live range is not worth the extra complexity this adds everywhere else. --- sapi/phpdbg/phpdbg_opcode.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sapi/phpdbg/phpdbg_opcode.c') diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index d066674b90..b14a1c23e2 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -77,10 +77,6 @@ char *phpdbg_decode_input_op( if (op.num != (uint32_t)-1) { spprintf(&result, 0, "try-catch(%" PRIu32 ")", op.num); } - } else if (ZEND_VM_OP_LIVE_RANGE == (flags & ZEND_VM_OP_MASK)) { - if (opline->extended_value & ZEND_FREE_ON_RETURN) { - spprintf(&result, 0, "live-range(%" PRIu32 ")", op.num); - } } else if (ZEND_VM_OP_THIS == (flags & ZEND_VM_OP_MASK)) { result = estrdup("THIS"); } else if (ZEND_VM_OP_NEXT == (flags & ZEND_VM_OP_MASK)) { -- cgit v1.2.1