Commit Graph

116 Commits

Author SHA1 Message Date
Zeev Suraski
e6ba28b680 Fix an elusive bug 2000-01-22 17:02:48 +00:00
Zeev Suraski
62114c1806 Destructors no longer return ints, the low level problem it was intended to solve is long gone now... 2000-01-17 17:33:37 +00:00
Zeev Suraski
ee08b81aab - Make zend_hash_apply() (and friends) reentrant and much, much quicker
- Introduce zend_hash_graceful_destroy(), which allows the destructor functions to
  use zend_hash_apply() and/or zend_hash_graceful_destroy()
- Switch to zend_hash_graceful_destroy() in the resource list shutdowns
2000-01-16 20:59:03 +00:00
Zeev Suraski
caaeb9ff12 Fix a bug in call_user_function_ex() 2000-01-15 22:52:24 +00:00
Andi Gutmans
bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Zeev Suraski
f2d703e916 - Nuke undefined_variable_string
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Zeev Suraski
b7a5b3c309 - Generalize the fast cache mechanism
- Add the HashTable struct to the fast cache mechanism
1999-12-27 19:07:33 +00:00
Zeev Suraski
235386b245 Change ALLOC_ZVAL() semantics 1999-12-26 21:21:33 +00:00
Andi Gutmans
62b2087a84 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend use
them.
1999-12-24 15:22:11 +00:00
Andrei Zmievski
80bab9d939 We're using ZVAL's now. 1999-12-21 17:14:31 +00:00
Zeev Suraski
223c674c2a - Made things work again (Thies, everybody - please check the latest CVS and see if you're
still getting any problems)
- Changed the interface of call_user_function_ex() to support returning of references
1999-12-19 18:54:40 +00:00
Andi Gutmans
213d0e2fb2 - More fixes related to the return references patch
- eval_string() and call_user_function_ex() still don't work.
- The libzend tree is untested and might not be stabl yet.
1999-12-19 06:39:17 +00:00
Zeev Suraski
ced9cee10c - Implement return by reference:
- In function declaration instead of the return statement
  - In the assignment phase
- Implement ability to turn off support for call-time pass by reference
1999-12-15 20:15:32 +00:00
Sascha Schumann
70df2d7478 Fix some warnings 1999-12-05 16:23:45 +00:00
Andi Gutmans
5463dd5b38 - Add use support (behaves like require, but will not use the same file twice)
- Add import support (behaves like include, but requires parentheses;  will not
  use the same file twice; Currently, it is not yet properly implemented, and
  only behaves like include)
1999-11-30 20:15:04 +00:00
Zeev Suraski
6358c6631b - Optimize class instanciation
- Fix constant instanciation for array elements inside objects
1999-11-21 18:11:10 +00:00
Andi Gutmans
3cd140cdef - Weird that this compiled for me. 1999-11-16 20:31:29 +00:00
Andi Gutmans
1c0f136405 - Hooray. This might actually work. (I hope) 1999-10-03 20:06:21 +00:00
Andi Gutmans
86357a9c27 - Move is_ref back to being an unsigned char and not a bit field. 1999-10-01 23:31:39 +00:00
Andi Gutmans
4dd47ffbc1 - Remove locking support completely 1999-10-01 23:26:00 +00:00
Andi Gutmans
59d5462a6a - Stop using the locking mechanism and start using refcount.
Now we know when we need to free but we still need to support it
1999-09-28 17:37:14 +00:00
Andi Gutmans
b56fd4602f - First part of the patch which makes reads use ptr and not ptr_ptr. 1999-09-28 16:03:09 +00:00
Andi Gutmans
4fff0386ac - Changed Ts{}.var to Ts{}.var.ptr_ptr. 1999-09-26 05:45:18 +00:00
Thies C. Arntzen
20ee106672 no // in the sources please 1999-09-17 12:16:21 +00:00
Zeev Suraski
023cb6474b Fix a crash bug in case of aborted execution 1999-08-27 21:21:04 +00:00
Zeev Suraski
aa8b27ba1d Better debug macros 1999-08-27 19:17:19 +00:00
Andi Gutmans
02822cbc33 - Damn. It wasn't a correct fix. This should do it.
When the zval ** are equal we don't want to assign_ref, in any other case
  I can think of we do want to assign_ref.
1999-08-26 07:33:53 +00:00
Andi Gutmans
2c88f2950c - Fix leak when global is used in the global scope. 1999-08-26 07:26:15 +00:00
Zeev Suraski
50bfff5502 Fix #2012 1999-08-17 22:31:45 +00:00
Zeev Suraski
720d32f581 Fix a few leaks 1999-08-07 23:04:01 +00:00
Zeev Suraski
0487650536 Fix a bug in call_user_func_ex() 1999-08-06 21:43:49 +00:00
Zeev Suraski
f95edc016b Introduce call_user_func_ex() 1999-08-06 15:24:10 +00:00
Andi Gutmans
741ca16711 - Fixed various inheritance problems & Andrey's leak 1999-07-28 17:59:55 +00:00
Andi Gutmans
bf8c6dbd99 - Get rid of C++ comments 1999-07-20 13:01:30 +00:00
Zeev Suraski
8d1de13aef 0.91 update 1999-07-19 20:02:12 +00:00
Andi Gutmans
e3daad2d67 - Should fix the memory leak when returning from the main scope. 1999-07-18 17:33:51 +00:00
Zeev Suraski
b5b1117760 License update 1999-07-16 14:58:16 +00:00
Sascha Schumann
138dd94c8d disable zend_handle_sigsegv 1999-07-15 12:17:34 +00:00
Zeev Suraski
dc933fc50b Woops, fix. 1999-07-10 12:44:56 +00:00
Zeev Suraski
909590ba7b Put the garbage in the garbage bin 1999-07-10 11:47:16 +00:00
Zeev Suraski
cccd2445ee Get rid of AiCount completely 1999-07-10 11:45:23 +00:00
Zeev Suraski
2a6da7814c Step 4:
Move to a 7-bit counter (not fully implemented yet)
1999-07-09 20:43:59 +00:00
Zeev Suraski
6ec1acbe32 Phase 3:
Use a single bit to mark IS_REF variables
1999-07-09 18:19:48 +00:00
Zeev Suraski
5f62c347c7 Step 2:
Rename is_ref to EA
1999-07-09 17:44:41 +00:00
Zeev Suraski
81d901b14d Step 1 in nuking the garbage collector:
- Change the hash destructor to return int
- Don't kill the bucket on hash_destroy if the destructor returns 0
1999-07-09 17:24:47 +00:00
Zeev Suraski
81f5522210 Fix the mess in SIGSEGV handling, hopefully 1999-07-09 07:35:13 +00:00
Zeev Suraski
da9faa2c3a * Make the output handling of variables much, much cooler.
Uses zend_make_printable_zval() instead of convert_to_string() now:

$foo = true;
print "\$foo is $foo";
will now print
$foo is true
(instead of "$foo is 1", earlier).

Also, with objects, it automatically tries to call __print() and use it as a printing
function.

For example:

class foo {
  function __print() { return "Foo Object"; }
};

$foo = new foo;
print $foo;

will print "Foo Object".
1999-06-11 10:44:26 +00:00
Zeev Suraski
b484f40c31 * Fix foreach() that receives a non array argument
* Clean up some C++ comments
1999-06-09 21:02:59 +00:00
Zeev Suraski
cf757f7c89 Fix that GLOBALS leak. We were explicitly adding GLOBALS to the main symbol table,
but there's no reason to do it (INIT_GLOBALS takes care of it if necessary.)
1999-06-04 12:22:19 +00:00
Andi Gutmans
52ec64359c Fixes 1999-05-31 18:33:12 +00:00
Sascha Schumann
88029643d0 * fix some casts
* introduce unary_op_type - cleaner than casting data voids to function ptrs
1999-05-30 13:28:56 +00:00
Zeev Suraski
cf4a2c3bfc That got fucked up when we went back to using uninitialized_zval 1999-05-29 23:37:26 +00:00
Zeev Suraski
7068d4a201 *** empty log message *** 1999-05-29 11:02:37 +00:00
Zeev Suraski
741b816136 * Support getThis() for internal functions.
* Fix 'new object or die' and AiCount issue thoroughly (earlier fix didn't
  work with the optimizer).
* Add new macros for standardized definition of classes.
* Only report AiCount problems if shutdown was not silent.
1999-05-28 12:06:59 +00:00
Zeev Suraski
033858e13d Avoid crashing if an error occurs before we open the first file. 1999-05-25 22:55:13 +00:00
Zeev Suraski
1250c43a39 * Add struct name to all typedef's so that they can be debugged with MSVC
* Fix an AiCount bug - list(...) = $var was using $var multiple times, and thus
causing AiCount to be decreased multiple times even though it was increased only
once for $var.  Mark all FETCH_DIM's so that they won't decrease AiCount, and only
decrease AiCount on the last FETCH_DIM.
* Fix a stupid bug - forgot to pass CLS_C to some compiler function.  For some reason
MSVC doesn't report these :I
1999-05-22 16:10:51 +00:00
Zeev Suraski
080105f79f Give more information and save log lines in memory leak reports 1999-05-22 11:20:56 +00:00
Zeev Suraski
2493f68018 * Fix debugger+interactive mode bug
* Recognize whether an extension is with debug information or not
1999-04-27 11:00:59 +00:00
Zeev Suraski
7a87fcbbda Thread safety patch. We're still not quite there but it compiles again, and
more logic has been implemented.
1999-04-21 03:49:09 +00:00
Andi Gutmans
e1e2226b92 - Fix various memory leaks. 1999-04-13 19:28:03 +00:00
Andi Gutmans
3fcc6511f6 * Optimize argument_stack top lookup
* Fix a nasty bug in zend_ptr_stack_clean()
1999-04-13 17:03:10 +00:00
Zeev Suraski
533f135987 Remove unnecessary stack 1999-04-12 21:50:49 +00:00
Zeev Suraski
15be5f0b4a Destroy the resource list after destroying the symbol table, otherwise the
auto-destructor for resources are run when the resource list is no longer valid
1999-04-12 18:40:18 +00:00
Zeev Suraski
39a7f4c306 This patch is a go. Not fully optimized yet, but working properly.
Prepatch tagged as BEFORE_STACK_PATCH.
1999-04-12 18:29:09 +00:00
Zeev Suraski
d1d96d04c6 Remove an unused variable 1999-04-07 23:09:09 +00:00
Andi Gutmans
573b46022c Zend Library 1999-04-07 18:10:10 +00:00