}
call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EG(This)), NULL TSRMLS_CC);
+ (zend_function*)new_op_array, 0, 0, EX(called_scope), EX(object), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(opline->op2.zv))) != NULL)) {
ZVAL_DEREF(value);
if (Z_CONSTANT_P(value)) {
- zend_class_entry *old_scope = EG(scope);
-
EG(scope) = ce;
zval_update_constant(value, 1 TSRMLS_CC);
- EG(scope) = old_scope;
+ EG(scope) = EX(scope);
}
if (IS_CONST == IS_CONST) {
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), value);
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
}
call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EG(This)), NULL TSRMLS_CC);
+ (zend_function*)new_op_array, 0, 0, EX(called_scope), EX(object), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
}
call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EG(This)), NULL TSRMLS_CC);
+ (zend_function*)new_op_array, 0, 0, EX(called_scope), EX(object), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(opline->op2.zv))) != NULL)) {
ZVAL_DEREF(value);
if (Z_CONSTANT_P(value)) {
- zend_class_entry *old_scope = EG(scope);
-
EG(scope) = ce;
zval_update_constant(value, 1 TSRMLS_CC);
- EG(scope) = old_scope;
+ EG(scope) = EX(scope);
}
if (IS_VAR == IS_CONST) {
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), value);
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
- if (Z_OBJ(EG(This)) && Z_OBJCE(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ if (EX(object) && zend_get_class_entry(EX(object) TSRMLS_CC) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
}
fbc = ce->constructor;
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EG(This))) {
- if (Z_OBJ_HT(EG(This))->get_class_entry &&
- !instanceof_function(Z_OBJCE(EG(This)), ce TSRMLS_CC)) {
+ if (EX(object)) {
+ object = EX(object);
+ GC_REFCOUNT(object)++;
+ if (object->handlers->get_class_entry &&
+ !instanceof_function(zend_get_class_entry(object TSRMLS_CC), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", fbc->common.scope->name->val, fbc->common.function_name->val);
}
}
- object = Z_OBJ(EG(This));
- GC_REFCOUNT(object)++;
}
}
if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(opline->op2.zv))) != NULL)) {
ZVAL_DEREF(value);
if (Z_CONSTANT_P(value)) {
- zend_class_entry *old_scope = EG(scope);
-
EG(scope) = ce;
zval_update_constant(value, 1 TSRMLS_CC);
- EG(scope) = old_scope;
+ EG(scope) = EX(scope);
}
if (IS_UNUSED == IS_CONST) {
CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), value);
}
call = zend_vm_stack_push_call_frame(
- (zend_function*)new_op_array, 0, 0, EX(called_scope), Z_OBJ(EG(This)), NULL TSRMLS_CC);
+ (zend_function*)new_op_array, 0, 0, EX(called_scope), EX(object), NULL TSRMLS_CC);
if (EX(symbol_table)) {
call->symbol_table = EX(symbol_table);