Commit Graph

295 Commits

Author SHA1 Message Date
Andi Gutmans
ec04c922aa - Shouldn't be needed 1999-10-09 20:37:08 +00:00
Andi Gutmans
37159e7863 - God damn this sucked. I hopefully fixed the problems with classes although
we might need to clean stuff up a bit.
1999-10-09 20:29:36 +00:00
Andi Gutmans
5fed1466ef - Reverse my patch 1999-10-07 04:38:03 +00:00
Andi Gutmans
e3d0c91dbb - Fixed memory leak with this pointer. It was somtimes initialized with refcount
of 2 instead of 1.
- Also fixed a place where object.ptr_ptr is set to pointing to a zval* instead
  of zval**. I don't think this is ever used so we might be able to remove it
  altogether.
1999-10-06 17:45:15 +00:00
Thies C. Arntzen
c6b91f789d fix for using resources as array indices 1999-10-06 15:09:26 +00:00
Andi Gutmans
1c0f136405 - Hooray. This might actually work. (I hope) 1999-10-03 20:06:21 +00:00
Andi Gutmans
56834ff66a - Another locking fix. 1999-10-02 18:02:10 +00:00
Andi Gutmans
e40667440d - Fixed locking problem when fetching string offsets 1999-10-02 16:40:25 +00:00
Zeev Suraski
77ddd3a35b Fix the leak reported on the PHP 3 list (isset() on string offsets) 1999-10-02 15:56:49 +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
03d354dcf9 - For Andrei. Implement references in array() initializations 1999-10-01 10:00:05 +00:00
Andi Gutmans
06d04d15a8 - Fix SEND_VAR problem after fetch'ing a variable and not knowing the fetch type 1999-09-29 17:18:36 +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
Andi Gutmans
1ac04fe9f4 - Try to fix the leak Rasmus reported. It's pretty sucky code so I'm really
not sure this fix is OK.I can't remember all of what we did there.
1999-09-18 22:07:12 +00:00
Thies C. Arntzen
aa5102490a make SUNs c89 happy 1999-09-17 13:57:24 +00:00
Zeev Suraski
567b3cef6b - Fix bug #2318 1999-09-17 02:06:12 +00:00
Andi Gutmans
67daaa7aac - Fix for floating point array offsets. Same behaviour as in PHP 3.0. We
casted to (long).
1999-09-08 20:38:08 +00:00
Stig S. Bakken
009025e00d * header file cleanup
* fixed --enable-thread-safety build for UNIX

I don't have a Win32 environment available, could someone please try
compiling on Win32 to see if I got all the header file stuff right there?
1999-09-06 16:14:08 +00:00
Andi Gutmans
48a8b14a47 - Fixed a specific memory leak linked to locking. 1999-08-23 19:02:28 +00:00
Zeev Suraski
96fd258d07 Fix #2070 1999-08-17 21:36:30 +00:00
Andi Gutmans
a08dc937c7 - Oopsie 1999-08-15 19:38:10 +00:00
Andi Gutmans
b5f5e9a6d1 - Optimize the execute stack a bit. 1999-08-15 19:29:39 +00:00
Andi Gutmans
11781bdaa8 - Thies's crash fix. 1999-08-09 16:39:13 +00:00
Zeev Suraski
720d32f581 Fix a few leaks 1999-08-07 23:04:01 +00:00
Zeev Suraski
4f2dd59e24 *** empty log message *** 1999-08-06 11:12:08 +00:00
Andi Gutmans
bbe27ffae9 - Initialize extended value's and put the fetch_type in it's own variable
name.
1999-08-03 18:54:49 +00:00
Andi Gutmans
e9e7bc6db3 - Add ptr_stack_n_{push,pop} in order to speed up function calls a bit.
There seems to be no reason for stack->top in the ptr_stack except for
  when realloc()'in the stack. I think I'll remove it.
1999-07-30 11:55:53 +00:00
Andi Gutmans
741ca16711 - Fixed various inheritance problems & Andrey's leak 1999-07-28 17:59:55 +00:00
Andi Gutmans
348b2f0730 - Add missing lock 1999-07-27 18:35:22 +00:00
Andi Gutmans
88322d2ea0 - Fix up the new operator a bit more. 1999-07-27 17:30:16 +00:00
Zeev Suraski
9d0d2e5a69 Set reference count and is_ref values for new objects 1999-07-27 00:14:34 +00:00
Zeev Suraski
41308d4b43 Fix a bug in inheritence from classes defined in include files, that are
inherited from require()'d files
1999-07-26 21:18:35 +00:00
Andi Gutmans
7af5579e3f - Oops I erased this by mistake 1999-07-26 19:35:57 +00:00
Andi Gutmans
7d77a63342 - Should be a complete fix now. This break away code should maybe be made
somewhat generic
1999-07-26 19:32:13 +00:00
Andi Gutmans
fe0fbdc5b6 - Temporary fix for "this". Have to fix it tomorrow. 1999-07-26 19:24:54 +00:00
Andi Gutmans
221c80d26d - Fix compile error. Weird that Visual didn't catch this one. 1999-07-26 18:56:54 +00:00
Andi Gutmans
8f51f72dc6 - Fix the new operator incompatibility.
- I commented PHP_FUNCTION(strtotime) in datetime.c because it stopped
  win32 from compiling. This needs to be fixed!!!
- Check out libzend to compile the tree now.
1999-07-26 16:57:06 +00:00
Zeev Suraski
1b6fae101a Thoroughly fix the SWITCH problem. No RETURN handling yet. 1999-07-24 11:24:19 +00:00
Zeev Suraski
028cf1a368 Fix bug #1812 1999-07-23 18:41:58 +00:00
Andi Gutmans
acb9cae36d - Include alloca.h when need and available. 1999-07-20 18:26:56 +00:00
Zeev Suraski
8d1de13aef 0.91 update 1999-07-19 20:02:12 +00:00
Andi Gutmans
e78fc33c35 * Fix Zend version
* Fix a method call bug
1999-07-19 19:58:44 +00:00
Zeev Suraski
b5b1117760 License update 1999-07-16 14:58:16 +00:00
Andi Gutmans
da648c0fb1 Fix a lock issue 1999-07-15 19:59:18 +00:00
Andi Gutmans
4dc22e32b6 - Fixed a purify warning 1999-07-12 18:07:01 +00:00
Andi Gutmans
44947bf563 Ok, so we do have to lock in there 1999-07-10 18:46:20 +00:00
Andi Gutmans
fb7a4b6486 Fix assignments of reference variables 1999-07-10 16:56: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
82563bde60 Final tweaks 1999-07-10 10:55:55 +00:00
Zeev Suraski
03d33b2f88 More locking work 1999-07-10 09:29:02 +00:00
Zeev Suraski
6fcf8aa12c *** empty log message *** 1999-07-09 21:00:24 +00:00
Zeev Suraski
0fadd053fa More stuff 1999-07-09 20:57:29 +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
baa75917c8 Support isset()/empty() for string offsets 1999-07-03 18:03:02 +00:00
Zeev Suraski
963a004481 * Use to_string() instead of __print()
* Support boolean casts ((bool) and (boolean))
1999-06-11 11:17:43 +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
95c9e3014a * Fix cases where you assign an array element to the parent array (the array was
being erased before the assignment, so the element was being smashed).
1999-06-09 21:39:12 +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
Andi Gutmans
04b2c1d422 * Fix a by-name call/method call bug
* Clean and optimize the whole function call process
1999-06-08 18:33:31 +00:00
Zeev Suraski
8b2fe60467 - Fixed Karl's bug report. It's not really a thorough fix, we really need to rethink the INIT_FCALL/DO_FCALL issue.
- Fixed numerous AiCount problems
1999-06-05 18:47:36 +00:00
Zeev Suraski
1b4b5c4a88 New $GLOBALS init 1999-06-04 13:09:24 +00:00
Andi Gutmans
1225d0307b - We weren't counting newlines in heredocs. The only place which is still questionable
is when there's a \ followed by a newline but it seems we have a parse error in this
case anyways.
- Fixed the alloca() macros so that the alloca() #define in win32 mode won't clash
with the real win32 alloca().
1999-06-03 21:06:03 +00:00
Andi Gutmans
c4b7426ec1 - Make execute() use less stack in thread-safe win32 due to Microsoft's shitty 256kb stack. 1999-06-01 18:47:53 +00:00
Andi Gutmans
52ec64359c Fixes 1999-05-31 18:33:12 +00:00
Zeev Suraski
b7ee45e13c Correct fix 1999-05-29 12:00:32 +00:00
Zeev Suraski
24a21ca2e1 Fix a leak 1999-05-29 11:01:50 +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
3b5972ed4a Fix the AiCount issue with objects 1999-05-27 03:11:08 +00:00
Zeev Suraski
ee7032f069 Sigh, another leak bites the dust. FREE_OP missing in case of a SEND_VAR. 1999-05-22 18:02:30 +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
9cb2cf1393 Optimize allocations into uninitialized_zval assignments 1999-05-20 20:00:59 +00:00
Zeev Suraski
b0bfa458b5 * 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.
1999-05-15 15:47:24 +00:00
Zeev Suraski
5a5806e02a Cleanups, remove old ts code 1999-04-24 00:12:55 +00:00
Zeev Suraski
551fe7780b Make token names uniform, they all begin with T_ now. 1999-04-22 23:08:42 +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
dd03a7a2f3 Support =unset as arguments 1999-04-19 16:28:05 +00:00
Zeev Suraski
1ae9891e7e AiCount needs to be decreased here 1999-04-18 19:55:42 +00:00
Andi Gutmans
b32b2831d8 - one more place which seems to have needed fixing. I don't have time to look
more into it. I hope we don't have anymore places which need fixing.
1999-04-15 17:43:16 +00:00
Zeev Suraski
76ceb9ad44 Better detection 1999-04-13 22:09:59 +00:00
Zeev Suraski
7c2155c1ad Move Ai stuff before get_zval_*(), like Andi suggested. Fixes Sascha's huge
memory leak
1999-04-13 20:50:31 +00:00
Andi Gutmans
e1e2226b92 - Fix various memory leaks. 1999-04-13 19:28:03 +00:00
Andi Gutmans
d86ed8207c Refcount bugfix 1999-04-13 17:49:14 +00:00
Zeev Suraski
1dff49ec83 Minor optimization 1999-04-12 20:49:02 +00:00
Zeev Suraski
714f450a00 This should take care of "this" for user-defined functions. It wasn't yet working
for built-in functions anyway, this one is coming soon.
1999-04-12 19:40:48 +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
b06c5731fc Minor fixes:
missing zval_copy_ctor()
	messed up AiCount fix
1999-04-12 17:59:36 +00:00
Zeev Suraski
17bdb70823 $GLOBALS support 1999-04-08 20:21:36 +00:00
Zeev Suraski
135da4b4fc Fix static assignment 1999-04-08 00:18:29 +00:00
Andi Gutmans
573b46022c Zend Library 1999-04-07 18:10:10 +00:00