cvs: ZendEngine2 / zend_compile.c
| From: | Andi Gutmans | Date: | Sat, 29 Jun 2002 08:42:17 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-219@lists.php.net to get a copy of this message | ||
andi Sat Jun 29 04:42:17 2002 EDT
Modified files:
/ZendEngine2 zend_compile.c
Log:
- Change E_ERROR -> E_COMPILE_ERROR where needed.
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.288 ZendEngine2/zend_compile.c:1.289
--- ZendEngine2/zend_compile.c:1.288 Sat Jun 29 04:38:24 2002
+++ ZendEngine2/zend_compile.c Sat Jun 29 04:42:17 2002
@@ -243,7 +243,7 @@
opline->opcode = ZEND_ASSIGN_BW_XOR_OBJ;
break;
default:
- zend_error(E_ERROR, "Unknown binary op opcode %d", op);
+ zend_error(E_COMPILE_ERROR, "Unknown binary op opcode %d", op);
}
opline->op2 = last_op->op2;
@@ -632,10 +632,10 @@
zend_uint type = variable->u.EA.type;
if (type & ZEND_PARSED_METHOD_CALL) {
- zend_error(E_ERROR, "Can't use method return value in write context");
+ zend_error(E_COMPILE_ERROR, "Can't use method return value in write context");
}
if (type == ZEND_PARSED_FUNCTION_CALL) {
- zend_error(E_ERROR, "Can't use function return value in write context");
+ zend_error(E_COMPILE_ERROR, "Can't use function return value in write context");
}
}
@@ -717,11 +717,6 @@
zend_op *opline, *opline_ptr;
int num_of_created_opcodes = 0;
- /*
- if (zend_variable_buffer_empty(TSRMLS_C) && (type == BP_VAR_W || type == BP_VAR_RW)) {
- zend_error(E_ERROR, "Method can't be used as l-value");
- }
- */
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
le = fetch_list_ptr->head;
@@ -1186,7 +1181,7 @@
if (is_method && function_name && function_name->u.constant.value.lval ==
ZEND_CLONE) {
if (argument_list->u.constant.value.lval > 0) {
- zend_error(E_ERROR, "Can't pass arguments to __clone()");
+ zend_error(E_COMPILE_ERROR, "Can't pass arguments to __clone()");
}
/* FIXME: throw_list */
zend_stack_del_top(&CG(function_call_stack));
@@ -1411,7 +1406,7 @@
opline->op2.u.opline_num = *catch_opline;
break;
default:
- zend_error(E_ERROR, "Bad opcode in throw list");
+ zend_error(E_COMPILE_ERROR, "Bad opcode in throw list");
break;
}
}
@@ -1554,7 +1549,7 @@
new_class_entry->parent = NULL;
if (zend_hash_update(class_table, new_class_entry->name, name_length+1, &new_class_entry,
sizeof(zend_class_entry *), NULL) == FAILURE) {
- zend_error(E_ERROR, "Can't create class. Fatal error, please report!");
+ zend_error(E_COMPILE_ERROR, "Can't create class. Fatal error, please report!");
}
}
@@ -1593,7 +1588,7 @@
new_ce->refcount++;
if (zend_hash_add(&ce->class_table, last, strlen(last)+1, &new_ce,
sizeof(zend_class_entry *), NULL) == FAILURE) {
new_ce->refcount--;
- zend_error(E_ERROR, "Cannot redeclare class %s", last);
+ zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", last);
return FAILURE;
}
return SUCCESS;
@@ -2096,7 +2091,7 @@
if (CG(active_class_entry)) {
if (runtime_inheritance) {
- zend_error(E_ERROR, "Only first level classes can inherit from undefined classes");
+ zend_error(E_COMPILE_ERROR, "Only first level classes can inherit from undefined
classes");
}
zend_hash_update(&CG(active_class_entry)->class_table, new_class_entry->name,
new_class_entry->name_length+1, &new_class_entry, sizeof(zend_class_entry *), NULL);
CG(active_class_entry) = new_class_entry;