cvs: ZendEngine2 / zend_compile.c

From: Date: Wed, 04 Feb 2004 17:10:45 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2321@lists.php.net to get a copy of this message
zeev Wed Feb 4 12:10:45 2004 EDT Modified files: /ZendEngine2 zend_compile.c Log: Handle additional cases http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.533&r2=1.534&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.533 ZendEngine2/zend_compile.c:1.534 --- ZendEngine2/zend_compile.c:1.533 Wed Feb 4 11:30:14 2004 +++ ZendEngine2/zend_compile.c Wed Feb 4 12:10:44 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.533 2004/02/04 16:30:14 zeev Exp $ */ +/* $Id: zend_compile.c,v 1.534 2004/02/04 17:10:44 zeev Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -2035,7 +2035,9 @@ } return NULL; } else { - zend_verify_abstract_class(ce TSRMLS_CC); + if (!(ce->ce_flags & ZEND_ACC_INTERFACE)) { + zend_verify_abstract_class(ce TSRMLS_CC); + } return ce; } } @@ -2085,6 +2087,7 @@ { zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1]; HashTable *table; + zend_bool is_abstract_class = 0; while (opline->opcode == ZEND_TICKS && opline > CG(active_op_array)->opcodes) { opline--; @@ -2097,10 +2100,16 @@ } table = CG(function_table); break; + case ZEND_DECLARE_CLASS: + case ZEND_DECLARE_INHERITED_CLASS: + is_abstract_class = 1; + /* break missing intentionally */ case ZEND_VERIFY_ABSTRACT_CLASS: { zend_op *verify_abstract_class_op = opline; - opline--; + if (!is_abstract_class) { + opline--; + } if (opline->opcode == ZEND_DECLARE_CLASS) { if (do_bind_class(opline, CG(class_table), 1 TSRMLS_CC) == NULL) { return; @@ -2120,11 +2129,13 @@ return; } table = CG(class_table); - /* clear the verify_abstract_class op */ - init_op(verify_abstract_class_op TSRMLS_CC); - SET_UNUSED(verify_abstract_class_op->op1); - SET_UNUSED(verify_abstract_class_op->op2); - verify_abstract_class_op->opcode = ZEND_NOP; + if (!is_abstract_class) { + /* clear the verify_abstract_class op */ + init_op(verify_abstract_class_op TSRMLS_CC); + SET_UNUSED(verify_abstract_class_op->op1); + SET_UNUSED(verify_abstract_class_op->op2); + verify_abstract_class_op->opcode = ZEND_NOP; + } } break;

« previous php.zend-engine.cvs (#2321) next »