Commit Graph

273 Commits

Author SHA1 Message Date
Pierre Joye
b908c70fa1 - silent compilation warnings (no MFH yet) 2009-06-15 14:06:30 +00:00
Matt Wilmas
b412586e4f Changed error messages to use "cannot" instead of "can not" (meaning "also can") 2009-06-07 15:45:46 +00:00
Arnaud Le Blanc
76c919552b better fix for #48409 , #48428 , #48228
# (again, sorry)
2009-06-05 11:21:16 +00:00
Matt Wilmas
8aa9727037 Restored double->long conversion behavior to that of PHP 5.2 (on most platforms) and prior:
* Out-of-range numbers overflow/preserve least significant bits (no LONG_MAX/MIN limit)
 * See bug #42868 (presumably-rare platform with different results in 5.2)
 * On 32-bit platforms with 64-bit long type, a zend_long64 cast has been added,
    otherwise it's the same as 5.2
 * Use this conversion method everywhere instead of some plain (long) casts

Added 'L' parameter parsing specifier to ensure a LONG_MAX/MIN limit:
 * Essentially what 5.3's new conversion was doing in most cases
 * Functions with "limit" or "length" type params could be updated to use this,
    and prevent confusing overflow behavior with huge numbers (*also* in 5.2)
  - See bug #47854, for example; or even #42868 again

# Test updates coming
2009-06-04 18:18:47 +00:00
Arnaud Le Blanc
07f2ac9f0a better fix for #48409 , #48428 , #48228 2009-06-01 15:07:27 +00:00
Arnaud Le Blanc
4b10620024 Fix aliasing issue (fixes #48409 , #48428 , #48228) 2009-05-30 16:30:39 +00:00
Arnaud Le Blanc
10a5707781 zend_vm_gen 2009-04-24 15:48:22 +00:00
Dmitry Stogov
f3a3d2fe8a Improved specialization (IS_CONST can't be IS_OBJECT) 2009-04-08 13:19:53 +00:00
Felipe Pena
8ecf8ede1f - Removed:
- UG(unicode) checks
       - pcre_cache_entry.unicode_mode
- Changed:
       - ZEND_STR_TYPE -> IS_UNICODE
       - convert_to_text -> convert_to_unicode
       - convert_to_text_ex -> convert_to_unicode_ex

(Felipe, Steph)
2009-03-26 20:02:53 +00:00
Dmitry Stogov
91ca700dd9 Fixed bug #47771 (Exception during object construction from arg call calls object's destructor) 2009-03-26 10:17:47 +00:00
Dmitry Stogov
de2d640dba Removed unnecassary checks 2009-03-18 18:48:52 +00:00
Dmitry Stogov
dbb1f2d46d Improved speed of conditional jump instructions by checking for most useful case (conditional expression) 2009-03-18 14:17:38 +00:00
Dmitry Stogov
ac1ccb1331 Fixed bug #47704 (crashes on some "bad" operations with string offsets)
Removed unnecessary checks
2009-03-18 12:52:58 +00:00
Dmitry Stogov
4d616e7474 Clenaup deprecated namespace code 2009-03-10 10:01:28 +00:00
Dmitry Stogov
b5c6e15ab8 Removed wrong warning message 2009-01-20 13:22:26 +00:00
Dmitry Stogov
b1de1d4e77 Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object) 2009-01-15 08:49:11 +00:00
Felipe Pena
1e5aff9522 - Fixed bug #47054 (BC break in static functions called as dynamic) 2009-01-10 19:14:27 +00:00
Felipe Pena
4ed88343cc - Fixed bug #46701 (Creating associative array with long values in the key fails on 32bit linux)
Patch by Shire
2009-01-05 19:47:13 +00:00
Marcus Boerger
ef26541980 - Fix SEGV if get_method() returns a non bound function 2009-01-01 15:27:33 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Stanislav Malyshev
636b2c9a6f MF5: Merge namespaces changes 2008-12-04 20:12:30 +00:00
Dmitry Stogov
e5454b359a Fixed bug #46409 (__invoke method called outside of object context when using array_map) 2008-11-27 19:02:45 +00:00
Etienne Kneuss
8251921307 Fix #46241 (stacked error_handlers, error_handling in general) 2008-11-19 01:59:07 +00:00
Felipe Pena
0d4b0f20f9 - Fixed bug #46238 (Segmentation fault on static call with empty string method) 2008-10-06 00:35:20 +00:00
Felipe Pena
2985b4f9e3 - Removed some TSRMLS_FETCH()s 2008-08-15 19:45:25 +00:00
Etienne Kneuss
6423606a63 Handlerify get_closure 2008-08-14 21:26:05 +00:00
Marcus Boerger
75b08f4adf - Improved exception linking 2008-08-14 10:06:39 +00:00
Dmitry Stogov
f83076cf4b Fixed bug #45805 (Crach on throwing exception from error handler) 2008-08-13 07:22:40 +00:00
Marcus Boerger
2b1b167538 - Fix warning 2008-08-10 22:45:47 +00:00
Antony Dovgal
a270199067 fix bug reported by Henrique
add test
2008-08-10 21:23:21 +00:00
Marcus Boerger
034d2e5916 - Turns out the easy solution for correct error_handling doesn't work. So
we need to provide save/replace/restore functions right away. It also
  to save/restore in the vm.
2008-08-08 17:10:49 +00:00
Dmitry Stogov
ef5f3cfdf2 . Added support for using static HEREDOCs to initialize static variables and class members or constants. (Matt)
. Improved syntax highlighting and consistency for variables in double-quoted strings and literal text in HEREDOCs and backticks. (Matt)
. Optimized interpolated strings to use one less opcode. (Matt)
2008-07-26 15:31:38 +00:00
Dmitry Stogov
60daaf792f Fixed crashes and memory leak for objects with NULL write_property/has_property/unset_property handlers 2008-07-26 14:09:05 +00:00
Dmitry Stogov
bdf7981e28 Fixed is_callable/call_user_func mess that had done different things for very similar arguments e.g. array("A","B") and "A::B" 2008-07-26 13:14:56 +00:00
Dmitry Stogov
fd2c7c2105 Fixed bug #45178 (memory corruption on assignment result of "new" by reference) 2008-07-24 11:48:30 +00:00
Dmitry Stogov
72dfe66661 LSB parent/self forwarding 2008-07-24 10:14:01 +00:00
Dmitry Stogov
8d2e0a7e0f Added closures support 2008-07-08 07:05:04 +00:00
Dmitry Stogov
b8d7c7e91d - Removed direct executor recursion.
- Use fastcall calling convention in executor on x86.
2008-06-11 13:19:14 +00:00
Felipe Pena
737dd4ef6e - MFB: Fixed bug #45089 (__callStatic $name case sensitivity) 2008-06-03 19:01:26 +00:00
Dmitry Stogov
25aaecc64d Fixed bug #44952 (isset() does not checks correctly variable variable) 2008-05-12 09:09:28 +00:00
Dmitry Stogov
37691b0cd0 Use IS_CV for dirrent access to $this variable 2008-05-07 12:04:58 +00:00
Dmitry Stogov
baa15b7780 Fixed possible memory leak 2008-05-06 16:59:24 +00:00
Dmitry Stogov
c1b01f7318 - Use ZEND_FREE() opcode instead of ZEND_SWITCH_FREE(IS_TMP_VAR)
- Fixed bug #44913 (Segfault when using return in combination with nested loops and continue 2)
2008-05-05 11:02:46 +00:00
Dmitry Stogov
96ab33de6e IS_CONST operands are always have is_ref==1 and refcount==2, so we can eliminate
unnecessary checks at specialization/compilation stage
2008-04-30 10:44:24 +00:00
Dmitry Stogov
1d0f893b49 Lazy EG(active_symbol_table) initialization 2008-04-29 08:15:49 +00:00
Dmitry Stogov
00b006ce74 Optimized handlers for ZEND_RECV and ZEND_RECV_INIT opocdes 2008-04-24 15:46:28 +00:00
Dmitry Stogov
903fa24eba Optimized function call helper 2008-04-21 10:15:26 +00:00
Dmitry Stogov
b287ccf508 Optimized ZEND_RETURN opcode to not allocate and copy return value if it is not
used.
2008-04-11 09:43:49 +00:00
Scott MacVicar
e55a0de496 MFB 5.3: Rewrite scanner to be based on re2c instead of flex
There are still changes in regards to parsing of Unicode encoded scripts to come.
2008-03-26 14:23:02 +00:00
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