summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2004-02-04 17:10:44 +0000
committerZeev Suraski <zeev@php.net>2004-02-04 17:10:44 +0000
commit52b5f3fea1300cb5c6e41d701851f4f80086fbac (patch)
treeec904776c38d54db4065a17db2ac3ad16f0273df
parent1f68c98aba880411b4f8d07b619d882bdee0339e (diff)
downloadphp-git-52b5f3fea1300cb5c6e41d701851f4f80086fbac.tar.gz
Handle additional cases
-rw-r--r--Zend/zend_compile.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 022ed12a2d..368e88db4c 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2035,7 +2035,9 @@ ZEND_API zend_class_entry *do_bind_class(zend_op *opline, HashTable *class_table
}
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 @@ void zend_do_early_binding(TSRMLS_D)
{
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 @@ void zend_do_early_binding(TSRMLS_D)
}
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 @@ void zend_do_early_binding(TSRMLS_D)
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;