summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.h
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-05-15 15:47:24 +0000
committerZeev Suraski <zeev@php.net>1999-05-15 15:47:24 +0000
commitb0bfa458b5c30a2992eb3f433d9e57b32195e3fb (patch)
tree0abf2dafddf9d636aefe460db52766af220b2c9d /Zend/zend_compile.h
parentd2c16bf5bd084dce9893061f9d878c379aba3ce1 (diff)
downloadphp-git-b0bfa458b5c30a2992eb3f433d9e57b32195e3fb.tar.gz
* Fix all hash checks that checked Bucket.arKey for NULL, when it was changed
to char[1], these checks should have been changed to Bucket.nKeyLength==0 * Support runtime declaration of functions. I ended up changing the grammar to catch top level functions vs. nested functions. The reason is simple - if we don't have functions properly declared at compile-time, function calls cannot be resolved at compile time, and have to be resolved at runtime, which ends up being much much slower (without the optimizer, that is). It's no biggy though, the grammar change isn't that bad.
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r--Zend/zend_compile.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 8002c66ce1..1a1f46dfcd 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -257,6 +257,8 @@ void do_begin_dynamic_function_call(znode *function_name CLS_DC);
void do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method CLS_DC);
void do_return(znode *expr CLS_DC);
+void do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table);
+void do_early_binding(CLS_D);
void do_pass_param(znode *param, int op, int offset CLS_DC);
@@ -476,12 +478,14 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_FETCH_DIM_TMP_VAR 89
#define ZEND_FETCH_CONSTANT 90
-#define ZEND_INIT_GLOBALS 91
+#define ZEND_DECLARE_FUNCTION_OR_CLASS 91
-#define ZEND_EXT_STMT 92
-#define ZEND_EXT_FCALL_BEGIN 93
-#define ZEND_EXT_FCALL_END 94
-#define ZEND_EXT_NOP 95
+#define ZEND_INIT_GLOBALS 92
+
+#define ZEND_EXT_STMT 93
+#define ZEND_EXT_FCALL_BEGIN 94
+#define ZEND_EXT_FCALL_END 95
+#define ZEND_EXT_NOP 96
/* end of block */
@@ -524,4 +528,7 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_HANDLE_FP 2
#define ZEND_HANDLE_ISTREAM 3
+#define ZEND_DECLARE_CLASS 1
+#define ZEND_DECLARE_FUNCTION 2
+
#endif /* _COMPILE_H */