Commit Graph

861 Commits

Author SHA1 Message Date
Dmitry Stogov
ea9305c543 Implemented concept of "delayed early binding" that allows opcode caches to perform class declaration (early and/or run-time binding) in exactly the same order as vanila php.
The following pseudo-code explains how it should be used in opcode cache.

function cache_compile_file($filename) {
        if (!is_cached($filename)) {
                ...
                orig_compiler_options = CG(compiler_optins);
                CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES |
                                        ZEND_COMPILE_DELAYED_BINDING;
                $op_array = orig_compile_file($filename);
                CG(compiler_options) = orig_copiler_options;
                ...
        } else {
                $op_array = restore_from_cache($filename);
        }
        zend_do_delayed_early_binding($op_array);
}
2008-03-18 08:36:49 +00:00
Felipe Pena
2c7b9a55cb Fix build 2008-03-18 00:37:35 +00:00
Antony Dovgal
abbd1e8ece fix #39127i (Old-style constructor fallbacks produce strange results) 2008-03-17 14:53:43 +00:00
Dmitry Stogov
32073866e9 Code simplification 2008-03-12 10:40:13 +00:00
Dmitry Stogov
b8debfd876 Optimized ZEND_FETCH_CLASS + ZEND_ADD_INTERFACE into single ZEND_ADD_INTERFACE opcode 2008-03-12 10:32:39 +00:00
Dmitry Stogov
6fae346fb4 Fixed bug #44414 (Incomplete reporting about abstract methods) 2008-03-12 09:46:57 +00:00
Felipe Pena
3cbc824eb7 Better readability (USTR_BYTES) 2008-03-07 00:51:02 +00:00
Robin Fernandes
0188a097cc Remove inconsistent behaviour when a protected static prop is overridden by public static prop (details: http://turl.ca/phhhf ). 2008-03-03 14:24:11 +00:00
Johannes Schlüter
e3c4c2496c - Allow implementation of abstract methods with optional parameters (Christian
Schneider)
2008-03-01 13:53:10 +00:00
Marcus Boerger
93b6edcf06 - Felipe just told me we forgot this one 2008-02-23 21:24:18 +00:00
Marcus Boerger
6b58678c63 - Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus) 2008-02-23 17:03:53 +00:00
Dmitry Stogov
478cbe5892 Fixed bug #44184 (Double free of loop-variable on exception) 2008-02-20 12:06:29 +00:00
Dmitry Stogov
87a8f72f49 Added NOWDOC 2008-02-12 09:28:30 +00:00
Stanislav Malyshev
c38d56e371 MFB __DIR_ constant support 2008-02-12 01:02:06 +00:00
Antony Dovgal
392d250c32 fix typo and bug #43646 2008-01-29 00:06:42 +00:00
Dmitry Stogov
b9dcdd409d Additional executor specialization 2008-01-23 17:56:15 +00:00
Dmitry Stogov
27d1e925e2 Changed exception handling. Now each op_array doesn't contain ZEND_HANDLE_EXCEPTION opcode in the end 2008-01-21 19:41:41 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Dmitry Stogov
9da3b7cf8e Fixed bug #38469 (unexpected creation of cycle, json tests failed, leaks memory) 2007-12-28 13:22:17 +00:00
Dmitry Stogov
35111ba922 Initialize operand type 2007-12-28 09:47:56 +00:00
Dmitry Stogov
5e649f9e8d Use proper result type 2007-12-27 13:52:29 +00:00
Dmitry Stogov
579defac82 Allowed import of global classes "use ::GlobalClassName;" (Gregory) 2007-12-13 10:02:26 +00:00
Dmitry Stogov
d47c88feb2 Allowed multiple namespaces per file (Gregory) 2007-12-13 08:58:28 +00:00
Dmitry Stogov
31f6f1583e Fixed bug #43344 (Wrong error message for undefined namespace constant) 2007-12-07 17:12:22 +00:00
Dmitry Stogov
7cac634fc4 Fixed uninitialized value 2007-12-04 12:36:20 +00:00
Dmitry Stogov
4de1707062 Fixed bug #43332 (self and parent as type hint in namespace) 2007-12-03 14:15:55 +00:00
Dmitry Stogov
975a66da79 Fixed bug #43318
The "const" statement is still allowed outside of namespaces but arrays are disabled.
2007-11-22 10:46:44 +00:00
Dmitry Stogov
32ff00efce Speed-up of ZEND_DO_FCALL and ZEND_INIT_FCALL_BY_NAME by lowercasing and calculating hash values at compile time. 2007-11-22 09:03:11 +00:00
Dmitry Stogov
2a84434ea3 Added support for "namespace::" prefix that is resolved to current namespace name. 2007-11-20 08:53:17 +00:00
Antony Dovgal
9c7296f165 disallow multiple access modifiers and 'abstract abstract' methods
add tests
2007-11-13 16:51:22 +00:00
Dmitry Stogov
b6963efdda better error messages 2007-11-12 17:53:36 +00:00
Antony Dovgal
0c07db4420 fix error message (reported by Felipe Nascimento) 2007-11-12 16:55:28 +00:00
Dmitry Stogov
c74918f5d5 Fixed bug #43183 ("use" of the same class in difference scripts results in a fatal error) 2007-11-12 15:52:11 +00:00
Dmitry Stogov
cdbeea7e2e Fixed type-hint compatibility check in namespaces 2007-11-09 13:35:22 +00:00
Dmitry Stogov
aea2368bda Fixed implementation of internal interfaces in namespaces 2007-11-09 12:16:55 +00:00
Dmitry Stogov
e860d95d24 T_IMPORT -> T_USE 2007-11-06 07:29:41 +00:00
Dmitry Stogov
860fd6fd2b Reimplemented support for namespaces in indexes id constant arrays (removed zval.idx_type) 2007-11-02 10:11:59 +00:00
Dmitry Stogov
a069a415e5 Fixed bug #43027 (Declare cause fatal error) 2007-11-01 11:59:15 +00:00
Dmitry Stogov
a53eb396b3 Fixed variations of bug #35163 2007-10-23 12:52:51 +00:00
Dmitry Stogov
d892fd3da4 Fixed bug #35163 (Array elements can lose references) 2007-10-23 09:55:25 +00:00
Dmitry Stogov
8cae2e56e4 Fixed bug #42859 (import always conflicts with internal classes). (cellog@php.net, Dmitry) 2007-10-17 10:01:37 +00:00
Yiduo (David) Wang
95da0dc570 Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:15:07 +00:00
Dmitry Stogov
19d7fed62d Fixed bug #42819 (namespaces in indexes of constant arrays) 2007-10-02 08:27:19 +00:00
Dmitry Stogov
d9d9a97454 Late Static Binding make no sense in compile-time constants. 2007-10-01 11:25:26 +00:00
Dmitry Stogov
8d8d86eb7a Fixed bug #42802 (Namespace not supported in typehints) 2007-10-01 10:37:36 +00:00
Dmitry Stogov
189ac4f201 Late Static Binding (Dmitry, Etienne Kneuss) 2007-09-26 07:16:33 +00:00
Dmitry Stogov
45c6b4db99 Bug #42541 (Check for namespace decl. on first line doesn't work when extended info is on) 2007-09-05 07:24:52 +00:00
Rui Hirokawa
3d8139f1dd fixed compilation error on Visual C++ 2005 2007-08-25 23:28:10 +00:00
Dmitry Stogov
611abb17fc Namespace constants 2007-08-24 13:50:52 +00:00
Dmitry Stogov
046b878b5b Fixed name resolution
namespace A;
    B::foo(); // 1. this is function "foo" from namespace "B"
              // 2. this is static method "foo" of class "B" from namespace "A"
              // 3. this is static methos "boo" of internal class "B"
  namespace A;
    A::foo(); // 1. this is function "foo" from namespace "A"
              // 2. this is static method "foo" of class "A" from namespace "A"
              // 3. this is static methos "foo" of internal class "A"
2007-08-22 07:39:37 +00:00
Dmitry Stogov
4fb5eadb77 typo 2007-08-22 06:17:12 +00:00
Dmitry Stogov
c7d82c75c9 Added namespace related optimizations and comments 2007-08-20 09:48:41 +00:00
Dmitry Stogov
6e3a76898e Namespaces: improved run-time speed 2007-08-17 12:05:19 +00:00
Dmitry Stogov
c04dc1699b Namespace support for name ambiguity between namespace and class name 2007-07-27 13:41:36 +00:00
Dmitry Stogov
9703e90904 Support for namespaces in compile-time constant reference 2007-07-27 09:04:12 +00:00
Dmitry Stogov
995c130320 Added warning for useless import statement 2007-07-26 08:57:52 +00:00
Dmitry Stogov
c4b5d9e572 Disabling declaration of class which name conflicts with import. 2007-07-26 08:32:52 +00:00
Sara Golemon
b1bc911cee Add support got zend_class_entry->get_static_method() and matching __callStatic() userspace method @doc 2007-07-21 05:27:07 +00:00
Dmitry Stogov
26dcf2f57f Fixed erong compilation for static call to constructor 2007-07-13 08:19:51 +00:00
Dmitry Stogov
1f413bbc37 Namespaces 2007-07-12 09:23:48 +00:00
Antony Dovgal
4adec955f9 fix folding and ws 2007-07-10 15:06:58 +00:00
Stanislav Malyshev
e9658dfc4d remove unused vars 2007-06-28 20:27:35 +00:00
Stanislav Malyshev
981ce312fc Fix HALT constant handling in unicode mode 2007-06-28 20:19:58 +00:00
Stanislav Malyshev
2ab4eededb MF5 __HALT_COMPILER fix:
Remove limitation of __HALT_COMPILER() that allowed only one instance
per request.

# Patch by Gregory Beaver
2007-06-28 00:01:58 +00:00
Dmitry Stogov
5dc51fecf8 Improved compilation of heredocs and interpolated strings. (Matt) 2007-05-18 13:12:47 +00:00
Antony Dovgal
ca43e24f55 fix #41351 (Invalid opcode with foreach ($a[] as $b)) 2007-05-11 09:38:52 +00:00
Dmitry Stogov
04ebde9741 ws 2007-05-04 16:53:09 +00:00
Dmitry Stogov
7228f2307b Fixed altering $this via argument named "this" 2007-05-02 13:22:15 +00:00
Dmitry Stogov
2908322c14 WIN64 support 2007-04-16 09:43:53 +00:00
Dmitry Stogov
1989ca7903 Removed undocumnted and incomplete support for strings in list() operator 2007-04-03 06:33:00 +00:00
Dmitry Stogov
a26ddf2573 Fixed bug #40899 (memory leak when nesting list()) 2007-03-23 12:46:38 +00:00
Antony Dovgal
43c8316d2d fix #40784 (Case sensivity in constructor's fallback) 2007-03-12 13:07:39 +00:00
Marcus Boerger
80c2f1f92c - Improved version of ternary shortcut 2007-03-08 17:30:28 +00:00
Dmitry Stogov
d7df9badf6 Added runtime JIT auto-globals fetching and caching 2007-02-16 19:36:45 +00:00
Dmitry Stogov
cb5ae2b82c Fixed bug #40236 (php -a function allocation eats memory) 2007-02-15 10:42:52 +00:00
Antony Dovgal
427f94a5d4 fix isset() & unset() with CV-superglobals
see #40311
2007-02-02 09:24:13 +00:00
Dmitry Stogov
5a695e9f32 Fixed possible crash because of dereference of NULL 2007-02-01 15:24:10 +00:00
Sara Golemon
57da96bb42 Resolve autoglobals as global-fetch CVs when possible 2007-01-20 20:36:55 +00:00
Dmitry Stogov
f6387758c6 - Fixed bug #35106 (nested foreach fails when array variable has a reference).
- Fixed bug #36214 (__get method works properly only when conditional operator is used).
- Fixed bug #39449 (Overloaded array properties do not work correctly).
- Fixed bug #39990 (Cannot "foreach" over overloaded properties).
2007-01-10 15:59:56 +00:00
Dmitry Stogov
a318af9992 Fixed bug #40002 (Try/Catch performs poorly) 2007-01-09 15:06:15 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Ilia Alshanetsky
68181b4430 MFB: Fix a possible memory leak 2006-12-21 02:11:12 +00:00
Sara Golemon
16cd1e762c Bugfix# 39435: 'foo' instanceof bar gives invalid opcode error 2006-12-12 23:09:01 +00:00
Dmitry Stogov
3d5825bb3d Fixed bug #39721 (Runtime inheritance causes data corruption) 2006-12-05 19:04:51 +00:00
Antony Dovgal
07cbe3317a remove duplicating line 2006-12-05 12:55:38 +00:00
Dmitry Stogov
57d22421db Unicode support.
Now the real UG(unicode) value is available during MINIT calls.
2006-11-17 10:48:53 +00:00
Andrei Zmievski
75c272440e Turn doc comments into zstr strings with corresponding adjustments. 2006-10-27 21:22:05 +00:00
Andrei Zmievski
6d38ea2988 Optimize ZEND_U_CASE_EQUAL() and move it to the header file. 2006-10-16 21:13:13 +00:00
Dmitry Stogov
e8ddcf1077 Speedup array/HashTable copying. (Matt W) 2006-10-03 11:10:54 +00:00
Dmitry Stogov
7aeb4421b7 Fixed bugs #34065 and #38623 (throw in foreach/switch causes memory leaks) 2006-09-19 21:36:00 +00:00
Dmitry Stogov
128548a5c0 Disabled autoconversion of hash keys (from string to unicode) for PHP arrays 2006-09-19 10:38:31 +00:00
Dmitry Stogov
5574651edb Fixed bug #38772 (inconsistent overriding of methods in different visibility contexts) 2006-09-12 11:01:31 +00:00
Marcus Boerger
058bdbf708 - Fix off by one copy'n'paste error 2006-07-25 00:01:40 +00:00
Marcus Boerger
48b438f898 - Yet another rproblematic case with mangled properties 2006-07-24 22:34:44 +00:00
Marcus Boerger
617a18fc40 - Fix for #34505 and repated (improved version of what is in 5.2, 5.1) 2006-07-24 17:51:41 +00:00
Dmitry Stogov
6687f0377b New memory manager 2006-07-18 09:08:06 +00:00
Stefan Esser
08e355e39e Added hook for compile_string() 2006-06-13 12:56:20 +00:00
Marcus Boerger
646a613ebf - Fix issue with interfaces being inherited multiple times 2006-06-07 09:23:58 +00:00
Marcus Boerger
f2a8d8cb83 - Fix issue with interfaces being inherited multiple times 2006-06-07 09:20:02 +00:00
Antony Dovgal
35949de5b1 revert by Andi's request 2006-06-06 14:16:53 +00:00