Andi Gutmans
8dd639ce22
- Fix bug reported by Sebastian where old constructors didn't work in
...
- nested classes.
2002-07-21 18:50:10 +00:00
Andi Gutmans
0355dc5504
- Remove code which wasn't supposed to go into the patch.
2002-07-17 18:39:26 +00:00
Andi Gutmans
9c52e883f0
- Rejuggle some code.
2002-07-17 18:36:29 +00:00
Andi Gutmans
bc5ea87e28
- Commit patch to support protected member variables (by Timm Friebe w/
...
- some fixes by me).
- You can't access protected variables from outside the object. If you want
- to see a protected member from your ancestors you need to declare the
- member as protected in the class you want to use it in. You can't
- redeclare a protected variable as private nor the other way around.
2002-07-15 18:09:56 +00:00
Andi Gutmans
7b68f5108a
- Nuke delete(). It was a big mistake to introduce it and I finally
...
- understand why Java didn't do so.
- If you still want to control destruction of your object then either make
- sure you kill all references or create a destruction method which you
- call yourself.
2002-07-14 19:23:18 +00:00
Andi Gutmans
57b853c831
- Fix bug when acccessing $this not in class scope.
2002-07-01 15:13:39 +00:00
Andi Gutmans
20d02565df
- Revert previous fix.
2002-06-29 11:24:11 +00:00
Andi Gutmans
6116145f9f
- Change E_ERROR -> E_COMPILE_ERROR where needed.
2002-06-29 08:42:17 +00:00
Andi Gutmans
dd8df52223
- Fix for bug #17882 . We complain if the same method is declared twice.
2002-06-29 08:38:24 +00:00
Andi Gutmans
9c148f0d84
- Fix problem with constructor not being inherited and called correctly.
2002-06-23 15:46:58 +00:00
Andi Gutmans
2d6404d5b0
- Allow overloaded objects to receive the method name in its original
...
- case.
2002-06-05 17:34:56 +00:00
Harald Radi
51e797f1e3
some type cleanup work
2002-04-23 18:06:54 +00:00
Stanislav Malyshev
3b6b13b08a
sync
2002-04-07 15:38:45 +00:00
Derick Rethans
17116438da
- revert patch
2002-03-29 12:34:25 +00:00
Derick Rethans
7394b8fc6f
- MFZE1
2002-03-25 20:37:02 +00:00
Andi Gutmans
c5ad6ae1b8
- More fixes to check for member/function call legality.
2002-03-18 20:27:03 +00:00
Andi Gutmans
46afe61d25
- Start putting error handling where method calls are being used in a
...
- context where only writable variables should be used.
2002-03-17 19:13:46 +00:00
Andi Gutmans
0ce019f715
- Fix issues with $this when using it by itself without indirection such as
...
- $this->foo.
2002-03-15 15:09:46 +00:00
Andi Gutmans
fb6976e46d
- Another couple of indirection fixes.
...
- Make class_entry->refcount be part of the structure and not allocated.
2002-03-12 19:22:29 +00:00
Andi Gutmans
c8c629b3fc
- Fix bug introduced with latest class hash table change.
2002-03-12 18:53:27 +00:00
Stanislav Malyshev
92dd5e611b
- make class tables contain class_entry *, not class_entry
...
- fix isset($this)
2002-03-12 10:08:47 +00:00
Stanislav Malyshev
04ed2b520f
New stuff for objects API:
...
- Better assignment handling
- More flexible operations with zval-containing objects
2002-03-10 13:42:37 +00:00
Andi Gutmans
b90d80b588
- Initial patch to support importing from class scopes (for Stig).
...
- It isn't complete yet but I want to work on it from another machine. It
- shouldn't break anything else so just don't try and use it.
- The following is a teaser of something that already works:
<?php
class MyClass
{
function hello()
{
print "Hello, World\n";
}
class MyClass2
{
function hello()
{
print "Hello, World in MyClass2\n";
}
}
}
import function hello, class MyClass2 from MyClass;
MyClass2::hello();
hello();
?>
2002-03-02 20:38:52 +00:00
Andi Gutmans
90bd4539c7
- Remove use of C++ reserved words namespace/this
2002-03-01 14:27:26 +00:00
Andi Gutmans
d1eea3de9c
- Fix bug in nested try/catch's
...
- Infrastructure for implementing imports of methods.
2002-03-01 14:04:51 +00:00
Andi Gutmans
00e90f2ff3
- Experimental support for private members.
...
<?
class MyClass {
private $Hello = "Hello, World!\n";
function printHello()
{
print $this->Hello;
}
}
class MyClass2 extends MyClass {
function printHello()
{
MyClass::printHello(); /* Should print */
print $this->Hello; /* Shouldn't print out anything */
}
}
$obj = new MyClass();
print $obj->Hello; /* Shouldn't print out anything */
$obj->printHello(); /* Should print */
$obj = new MyClass2();
print $obj->Hello; /* Shouldn't print out anything */
$obj->printHello();
?>
2002-02-21 11:50:44 +00:00
Andrei Zmievski
68a82f14a2
Fix the bug where the declared properties without init values were not
...
entered into the table.
2002-02-14 04:01:53 +00:00
Andi Gutmans
21b04ff2a6
@ Allow a series of consecutive catch() statements (Andi, Zend Engine)
...
<?php
class MyException1 {
}
class MyException2 {
}
try {
throw new MyException2();
} catch (MyException1 $m) {
print "Caught MyException1";
} catch (MyException2 $m) {
print "Caught MyException2";
}
2002-02-13 19:26:07 +00:00
Stanislav Malyshev
6608f07322
Mega-commit: Enter the new object model
...
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +00:00
Andi Gutmans
e366f5dbd8
- Fix problem with the objects_destructor called during shutdown. It was
...
- freeing objects from id 0 instead of id 1. id 0 is not used.
- Change isset/empty opcodes to support static members and the new way of
- doing $this->foobar. Also the opcodes operate now on the hash table
- combined with the variable names so that they can be overloaded by the
- soon to be added overloading patch.
2002-02-04 19:29:56 +00:00
Andi Gutmans
7309a6ed21
- First destructor hell fix. There was a situation where an object's
...
- destructor could be run after its class was already dead. Right now
- object destructors is the first thing whic happens during shutdown in
- order to prevent this problem. It's very likely that destructors will
- cause more grief and we'll have to outline exactly when you should use
- them and what kind of logic you're allowed to do inside of them.
- This bug was reported by sebastian.
2002-01-25 12:55:03 +00:00
Andi Gutmans
2131b019c7
- Improve performance of functions that use $GLOBALS[]
...
- Please check this and make sure it doesn't break anything.
2002-01-20 20:42:15 +00:00
Andi Gutmans
f1e8815c26
- Change exception handling to use the Java-like catch(MyException $exception)
...
- semantics. Example:
<?php
class MyException {
function __construct($exception)
{
$this->exception = $exception;
}
function Display()
{
print "MyException: $this->exception\n";
}
}
class MyExceptionFoo extends MyException {
function __construct($exception)
{
$this->exception = $exception;
}
function Display()
{
print "MyException: $this->exception\n";
}
}
try {
throw new MyExceptionFoo("Hello");
} catch (MyException $exception) {
$exception->Display();
}
?>
2002-01-13 20:21:55 +00:00
Sebastian Bergmann
62dc854bb0
Happy New Year.
2002-01-06 15:21:36 +00:00
Andi Gutmans
e1876cba4d
- Small fix
2002-01-05 20:55:56 +00:00
Andi Gutmans
e56fb1639b
- Allow passing of $this as function arguments.
...
- Fix a bug which I introduced a couple of months ago
2002-01-05 19:59:09 +00:00
Andi Gutmans
a4248dd584
- Significantly improve the performance of method calls and $this->member
...
- lookups.
2002-01-05 15:18:30 +00:00
Andi Gutmans
878f78a6d6
- Nuke C++ comments
2002-01-04 08:07:39 +00:00
Andi Gutmans
6203a250f7
- Separate other kinds of function calls too.
...
- Significantly improve performance of function calls by moving lowercasing
- the function name to compile-time when possible.
2002-01-04 08:05:21 +00:00
Andi Gutmans
0ab9d11225
- Start splitting up different kinds of function calls into different
...
- opcodes.
2002-01-04 06:44:19 +00:00
Andi Gutmans
ae1a702501
- Fix some case insensitivity stuff in respect to classes
2001-12-28 16:36:04 +00:00
Andi Gutmans
9a83837391
- Wasn't adding the lower case version of the class name to the hash
2001-12-28 13:18:19 +00:00
Andi Gutmans
e322abdd63
- Use two underscores for __construct(), __clone and friends...
2001-12-27 16:35:07 +00:00
Andi Gutmans
73b159e056
- Experimental support for destructors. We need to see if destructors
...
- will actually work well in the context of PHP so we should consider this
- as experimental. Possible problems might be that when the constructor is
- run PHP might not be in a stable state.
2001-12-27 14:35:09 +00:00
Andi Gutmans
b3fd2faac0
- Support parent:: again
2001-12-27 13:12:45 +00:00
Andi Gutmans
a5f7a383bf
- Support unified constructor name _construct()
2001-12-27 12:23:03 +00:00
Andi Gutmans
29ea3da2f8
- Pretty much finish _clone() support
2001-12-26 19:54:20 +00:00
Andi Gutmans
2ce4b47657
- Initial support for _clone()
2001-12-26 17:49:22 +00:00
Andi Gutmans
f85c818fe8
- Start fixing the parsing rules so that function and method calls
...
- can't be used in a write context.
2001-12-26 14:46:18 +00:00
Andi Gutmans
9e7c0d67d0
- Add initial capability of defining nested classes as class foo::bar
2001-12-22 15:31:44 +00:00
Andi Gutmans
ac7ed464b5
- Start adding parsed variable checks.
2001-12-16 19:45:49 +00:00
Andi Gutmans
f4b832d277
- Fix crash bug in startup code.
...
- Start work on being able to reference global and local scope
2001-12-13 16:55:04 +00:00
Andi Gutmans
74efc41fc3
- Make classes have scope and function/constant lookups default to the class
2001-12-12 17:38:37 +00:00
Andi Gutmans
4cb97fa3b9
- Rename zend_class_entry.constants -> zend_class_entry.constants_table
2001-12-11 18:46:43 +00:00
Sebastian Bergmann
d863d52a5d
Update headers.
2001-12-11 15:16:21 +00:00
Andi Gutmans
3bfee898db
- More namespaces work.
...
- Nuke memory leak.
2001-12-10 18:57:17 +00:00
Andi Gutmans
42486196ad
- Initial work on changing namespace scope. Only methods & variables
...
- right now.
<?
$hey = "Global hey\n";
class foo {
static $hey = "Namespace hey\n";
function bar()
{
print "in foo::bar()\n";
}
}
function bar()
{
print "in bar()\n";
}
bar();
namespace foo;
bar();
namespace;
bar();
namespace foo;
$bar_indirect = "bar";
$bar_indirect();
namespace;
print $hey;
namespace foo;
print $hey;
$hey = "Namespace hey #2\n";
namespace;
print $hey;
$hey = "Global hey #2\n";
namespace foo;
print $hey;
?>
2001-12-06 17:47:04 +00:00
Andi Gutmans
fe94f59427
- Nuke the namespace work I did. It'll be redone differently.
2001-12-06 17:23:08 +00:00
Andi Gutmans
e858d27888
- Initial support for class constants. There are still a few semantic
...
- issues which need to be looked into but basically it seems to work.
- Example:
<?php
class foo
{
const hey = "hello";
}
print foo::hey;
?>
2001-11-30 16:29:47 +00:00
Andi Gutmans
7cd6ccc0ec
- Support static $var = 0; style initialization of static class
...
- members. For example:
- class foo {
- static $my_static = 5;
-
- }
-
- print foo::$my_static;
2001-11-26 18:05:01 +00:00
Andi Gutmans
0d559f17cd
- Fix crash and leak
2001-11-25 12:29:08 +00:00
Andi Gutmans
4f3eaaa854
- Whitespace
2001-11-25 08:58:59 +00:00
Andi Gutmans
d2da63f629
- Support static members. The following script works:
...
<?
class foo
{
class bar
{
function init_values()
{
for ($i=1; $i<10; $i++) {
foo::bar::$hello[$i] = $i*$i;
}
}
function print_values()
{
for ($i=1; $i<10; $i++) {
print foo::bar::$hello[$i] . "\n";
}
}
}
}
foo::bar::init_values();
foo::bar::print_values();
for ($i=1; $i<10; $i++) {
print $hello[$i]?"Shouldn't be printed\n":"";
}
?>
2001-11-25 08:49:09 +00:00
Andi Gutmans
559d611a86
- MFZE1
2001-11-24 18:27:20 +00:00
Zeev Suraski
08615c6f68
MFZE1
2001-11-15 23:26:52 +00:00
Andi Gutmans
a332f826a7
- Support instantiation of nested class. The following script now should
...
- work:
-<?php
- class foo
- {
- function bar()
- {
- print "bar() in class bar\n";
- }
-
- class barbara
- {
- function bar()
- {
- print "bar() in class foo::barbara\n";
- }
- }
- }
-
- $obj = new foo();
- $obj->bar();
-
- $obj = new foo::barbara();
- $obj->bar();
-
2001-11-04 19:30:49 +00:00
Andi Gutmans
2eccd95ca4
- Add some initializations
2001-11-03 12:19:52 +00:00
Andi Gutmans
b87194e0c6
- Add constructor to the zend_class_entry instead of looking it up each
...
- time by name.
- This will allow the next patch of being able to instantiate nested
- classes such as new foo::bar::barbara();
2001-11-03 11:59:14 +00:00
Andi Gutmans
26578c386d
- Initial support for nested class definitions
2001-10-29 17:19:02 +00:00
Andi Gutmans
2eabb14dc7
- Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch when
...
- the whole CVS tree is work in progress
2001-09-30 17:29:55 +00:00
Zeev Suraski
f88c25b60e
MFZE1
2001-09-16 16:48:38 +00:00
Andi Gutmans
d7536a8a5f
- Shift around the variable parsing code to make it simpler.
2001-09-07 14:46:12 +00:00
Andi Gutmans
619702157b
- Make it compile in thread-safe mode.
2001-08-30 17:27:43 +00:00
Andi Gutmans
560606d210
- Get rid of warning and C++ comments
2001-08-30 15:31:35 +00:00
Andi Gutmans
29f5dbe10b
- Initial support for exceptions.
2001-08-30 15:26:30 +00:00
Zeev Suraski
4340c57ece
MFZE1
2001-08-19 13:39:06 +00:00
Zeev Suraski
4f6c95d17a
Whitespace
2001-08-11 15:56:40 +00:00
Andi Gutmans
73d4931dac
- Need to do some rewriting in the parser instead of this.
2001-08-11 10:47:41 +00:00
Andi Gutmans
8ff094046d
- A couple of fixes
2001-08-10 14:18:38 +00:00
Andi Gutmans
9d11db1200
- Merge new $_GET, $_POST etc. patch from Engine 1 tree
2001-08-08 17:18:16 +00:00
Andi Gutmans
cb1a40f399
- Preliminary patch for method() dereferencing
2001-08-08 15:07:11 +00:00
Andi Gutmans
5af7770a81
- Sync Engine2 CVS with latest Engine CVS
2001-08-07 03:17:33 +00:00
Zeev Suraski
7ade3b30cb
Fix an off by one lineno issue, in case of an implicit ;
2001-08-06 14:36:46 +00:00
Zeev Suraski
d76cf1da18
More TSRMLS_FETCH work
2001-07-31 04:53:54 +00:00
Zeev Suraski
4187439cff
More TSRMLS_FETCH work
2001-07-30 07:43:02 +00:00
Zeev Suraski
b4f3b9d3ce
Redesigned thread safety mechanism - nua nua
2001-07-28 10:51:54 +00:00
Zeev Suraski
2c254ba762
Get rid of ELS_*(), and use TSRMLS_*() instead.
...
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:10:39 +00:00
Andrei Zmievski
fc260e6c98
Fix certain cases where inheritance of base class's overloaded handlers wasn't
...
being done.
2001-07-21 02:35:13 +00:00
Zeev Suraski
d68f53e94e
Unfix, it has too strong effects
2001-07-19 18:33:22 +00:00
Zeev Suraski
ce29cb297e
Catch all cases
2001-07-19 15:53:38 +00:00
Zeev Suraski
01814bb2b8
Fix bug #11970 , strike 2
2001-07-19 14:15:50 +00:00
Zeev Suraski
43ebb86806
Fix bug #10287 - avoid crashing under a bogus usage of list()
2001-07-16 15:48:31 +00:00
Zeev Suraski
fb532ba52b
Fix bug #10467
2001-07-16 11:41:06 +00:00
Zeev Suraski
0c49166197
Fix bug #9884
2001-07-15 16:22:41 +00:00
Zeev Suraski
85b4df53c0
Improved interactive mode - it is now available in all builds, without any significant slowdown
2001-07-15 14:08:58 +00:00
Andi Gutmans
6297cd26e2
- Commit Thies' patch. str.len was too long.
2001-07-10 05:02:50 +00:00
Zeev Suraski
cb0d2775fb
parent::methodname() now works better with runtime classes (fix bug #11589 )
2001-06-21 14:53:05 +00:00
Andi Gutmans
e264a407eb
- Change if() to while() to make sure we skip enough opcodes
2001-05-25 09:46:48 +00:00
Andi Gutmans
90c36273b4
- Fix memory leak
2001-05-25 07:26:48 +00:00
Zeev Suraski
bda9c83a82
Recover from a parse error in include files (before, it could result in a crash under certain circumstances). Fix bug #8663
2001-05-06 19:30:31 +00:00
Zeev Suraski
686eab894c
Hear hear, interactive mode is finally showing some progress:
...
- Support function calls
- Fix crash bug
2001-05-06 15:00:58 +00:00
Zeev Suraski
36ded42156
Make parent:: work in runtime bindings as well
2001-03-07 10:07:25 +00:00
Zeev Suraski
bdacbc4c94
Whitespace fix
2001-03-02 23:56:03 +00:00
Andrei Zmievski
cb00ed2bd3
Don't overwrite existing handlers with parent ones.
2001-02-27 05:18:34 +00:00
Andi Gutmans
d2c9e8074c
- Update copyright year
2001-02-26 05:43:27 +00:00
Andrei Zmievski
50f28f4372
Inherit overloaded handlers.
2001-02-03 04:52:29 +00:00
Zeev Suraski
0e08845eb0
Add free_estring()
2001-01-15 10:52:06 +00:00
Andi Gutmans
43adbdcc72
- Fix leak with useless statements such as "foo";
2000-12-18 13:28:32 +00:00
Stanislav Malyshev
6a356cf5c8
Whitespace fix
2000-12-07 10:36:45 +00:00
Stanislav Malyshev
8ba3eeabd9
Allow var $foo = array(ABC => 1) constructs
...
# It still doesn't work good with constants, but at least doesn't leak now
2000-12-07 10:36:10 +00:00
Andi Gutmans
8d9082563a
- Allow passing references which are returned from functions and new
...
- statements to be passed by reference.
2000-11-27 18:46:23 +00:00
Andi Gutmans
be6ab20415
- Remove code which has been commented out for ages.
2000-11-22 19:53:17 +00:00
Andi Gutmans
b5d5b3a703
- Baby patch towards making the damn pass-by-ref work.
2000-11-20 20:49:42 +00:00
Andi Gutmans
1ccf94066c
- Move SET_UNUSED() to header
2000-11-11 17:59:47 +00:00
Andi Gutmans
5e33cdaef3
- Remove this damn thing once again.
2000-11-10 11:48:12 +00:00
Andi Gutmans
f950a3724c
- Maybe it's OK now? :)
2000-11-09 23:54:18 +00:00
Andi Gutmans
113a5bb8c2
- Undo the previous commit for fixing $obj = new foo().
2000-11-09 23:43:21 +00:00
Andi Gutmans
d9d4824cd3
- Commit experimental patch to fix the problem when doing $a = new foo()
...
and the constructor assigns $this by reference to other symbol table
elements. Thanks to Daniel J. Rodriguez on this one.
2000-11-09 22:11:14 +00:00
Zeev Suraski
f1a9920bcf
Maintain consistency
2000-11-02 19:27:55 +00:00
Andi Gutmans
ce501c78a8
- Replace do_exit() with zend_do_exit().
...
- Problem reported by David Hedbor <david@hedbor.org>
2000-11-02 18:42:54 +00:00
Zeev Suraski
d0fbddcc2b
Fix a corruption bug, when erroneously allowing to send non-variables by reference (several
...
bug-db reports seem to originate in this bug)
2000-10-29 19:16:29 +00:00
Zeev Suraski
7b0d92dd18
Unify the names of these last 3 files...
2000-10-29 14:35:34 +00:00
Andi Gutmans
c13cfa040d
- Constant expressions which are used multiple times need to be copy_ctored
2000-10-19 09:36:53 +00:00
Stanislav Malyshev
2158bbfa7f
Set filename even on recursive include
2000-09-17 08:58:39 +00:00
Andi Gutmans
5348058938
- Forgot to create extended info in include()/require() call
2000-09-11 15:15:57 +00:00
Zeev Suraski
c34f41b7c5
Eliminate run-time leak with eval()'s
2000-08-19 17:50:42 +00:00
Zeev Suraski
7795aca4ca
Fix warning issue (compile errors inside require()'d files were incorrectly supressed)
2000-08-15 16:44:40 +00:00
Andi Gutmans
e46ea8864c
- This patch should hopefully fix situations where a constructor uses
...
- the $this pointer as a reference.
2000-08-14 19:17:26 +00:00
Andi Gutmans
e1a3604103
- Unused results should be marked with EXT_TYPE_UNUSED and not IS_UNUSED
2000-08-14 04:10:02 +00:00
Stanislav Malyshev
5090b1e8d5
Fix zend_fiel_handle handling. Should fix URL include
...
and various opened_path inconsistencies.
2000-08-13 18:00:50 +00:00
Andi Gutmans
e5015ed581
@ Fix problem with nested foreach()'s (Andi, Zend Engine)
2000-08-10 22:08:02 +00:00
Andi Gutmans
a1adc81f30
@ Fix switch which only has a default rule (Andi, Zend Engine)
...
@ Change require_once() to use the same file list as include_once().
@ Patch includes making require() & include() to behave the same when it
@ comes to scoping. require() is now an include() which isn't allowed to fail.
@ require() caused too many memory reallocations which ended up being quite
@ slow for sites that required lots of files. (Andi & Zeev, Zend Engine)
- Fix switch() which only has default rule (bug #5879 ,
2000-08-10 20:42:57 +00:00
Zeev Suraski
c06692e9ec
The patch we promised - redesigned the compilation/execution API:
...
Advantages:
- Smaller memory footprint for the op arrays
- Slightly faster compilation times (due to saved erealloc() calls and faster zend_op
initialization)
- include_once() & require_once() share the same file list
- Consistency between include() and require() - this mostly means that return()
works inside require()'d files just as it does in include() files (it used to
be meaningless in require()'d files, most of the time (see below))
- Made require() consistent with itself. Before, if the argument was not a constant
string, require() took the include() behavior (with return()).
- Removed lots of duplicate code.
Bottom line - require() and include() are very similar now; require() is simply an include()
which isn't allowed to fail. Due to the erealloc() calls for large op arrays, require()
didn't end up being any faster than include() in the Zend engine.
2000-08-09 19:22:35 +00:00
Zeev Suraski
a30cde3de5
Fix a possible issue with runtime inheritence under fairly rare circumstance
...
and optimize a tiny bit
2000-07-26 18:23:30 +00:00
Andi Gutmans
4066a197be
- Beautify Zeev's patch a bit.
2000-07-16 22:33:42 +00:00
Zeev Suraski
808f8ed306
Implement parent::foo()
2000-07-16 16:40:21 +00:00
Zeev Suraski
b4266edb07
Add more extended_info calls
2000-07-15 15:41:20 +00:00
Andi Gutmans
80121ead56
- Make is_method_call() static and remove a couple of old lines
2000-07-06 23:28:05 +00:00
Andi Gutmans
af5d38214b
- One more fix for the latest patch
2000-07-06 22:29:06 +00:00
Andi Gutmans
2787a746f4
- One dumb bug in my latest patch
2000-07-06 22:21:24 +00:00
Andi Gutmans
5f893e68ff
- Complex fix for solving a problem with objects & method calls.
...
- Previous version is tagged PRE_METHOD_CALL_SEPERATE_FIX_PATCH.
- I need to check this fix on a server so if it doesn't work I will revert
- it.
2000-07-06 22:08:22 +00:00
Andi Gutmans
6d6d52551e
- Fix bug #4120
2000-07-03 19:17:57 +00:00
Andi Gutmans
727398b2d4
Add to the API
2000-06-13 19:01:22 +00:00
Zeev Suraski
968d2c5b33
Get rid of <?php_track_vars?>
2000-06-12 16:07:15 +00:00
Andi Gutmans
eb0e694665
- Andrei, this is for you!
...
- Add zend_register_internal_class_ex() which allows you to specify a
- parent to inherit from. You can either specify the parent directly or via
- its name.
2000-06-09 14:40:14 +00:00
Zeev Suraski
98bf43f229
Enable asp_tags/short_tags/allow_call_time_pass_by_reference to work on a per-directory
...
basis as well
2000-06-06 19:13:54 +00:00
Zeev Suraski
1c36e3472f
Change shutdown order to sort out a crash when assigning a resource id to a static.
2000-06-04 22:09:16 +00:00
Zeev Suraski
0b7a9cea88
- Fix Win32 compilation (Use winsock2.h from now on)
...
- Add lambda() support
2000-06-03 01:49:49 +00:00
Zeev Suraski
385d1aa664
Fix a crash bug in certain situations of class redeclarations
2000-05-25 16:26:22 +00:00
Zeev Suraski
9a751419cf
Refined fix
2000-05-11 18:49:45 +00:00
Zeev Suraski
cb35b7e4ed
Fix a memory corruption bug with by-ref function arguments
2000-05-11 18:31:21 +00:00
Thies C. Arntzen
354272315a
make waning readable
2000-05-10 09:40:46 +00:00
Andi Gutmans
30da5fd8fc
Thoroughly initialize IS_UNUSED for proper cleanup
2000-05-08 21:46:48 +00:00
Andi Gutmans
f2471fd50a
- Change the place CAST uses for the op_type
2000-05-03 17:56:44 +00:00
Zeev Suraski
e0a48fe623
Beautify
2000-04-29 01:30:17 +00:00
Zeev Suraski
974671eced
*** empty log message ***
2000-04-27 21:48:47 +00:00
Zeev Suraski
4b6594c5e9
Change to using the #define's
2000-04-27 21:26:17 +00:00
Zeev Suraski
e16c38b3f5
- Forgot to keep the ':' in the class_name
2000-04-24 22:13:08 +00:00
Andi Gutmans
4f15966d1b
- Fix order of JMPZNZ arguments
2000-04-17 17:16:47 +00:00
Zeev Suraski
4cb9a483d2
- Clean up resource lists namespace
...
- Prepare extended resource list destructor APIs (currently unused)
2000-04-15 13:02:22 +00:00
Andi Gutmans
cc0d6ac19c
- Two more places needed changing
2000-04-10 18:24:38 +00:00
Zeev Suraski
232b90454f
Clean up last/size definitions
2000-04-10 18:02:40 +00:00
Andi Gutmans
da3db3d864
- FIx JMPZNZ
2000-04-05 20:55:51 +00:00
Zeev Suraski
523f3cce5f
The previous fix ended up being broken, this one should do it
2000-03-31 15:17:43 +00:00
Andi Gutmans
24302e89e5
- Fix bug
2000-03-31 00:05:41 +00:00
Zeev Suraski
b7cd2bfa8e
- Make the argument order for the stack applies more consistent with other Zend
...
data structures
- Fix a possible corruption problem due to switch() C-level optimization
2000-03-29 22:28:04 +00:00
Zeev Suraski
5dba477467
- Some header dependencies cleanup
...
- Generalize zval_print() and zval_print_r()
2000-03-25 19:10:07 +00:00
Andi Gutmans
6db18997bb
- Nuke hash_*_ptr functions
2000-03-24 11:12:30 +00:00
Zeev Suraski
84569c08fc
-
2000-03-13 18:01:43 +00:00
Zeev Suraski
fe37f4bca9
- Spare a byte :)
2000-03-13 17:59:30 +00:00
Andi Gutmans
7fc5c94478
*** empty log message ***
2000-03-13 15:49:47 +00:00
Andi Gutmans
b5de395367
- Support require_once().
2000-03-10 16:04:16 +00:00
Zeev Suraski
5e55e47f7f
It's official now...
2000-03-06 05:26:39 +00:00
Andi Gutmans
110b670d44
- Fix typos
2000-03-01 17:10:45 +00:00
Zeev Suraski
0ac9536d99
(c) patch
2000-02-19 22:46:42 +00:00
Andi Gutmans
7fa17e8e08
- Put in the infrastructure for the unset() fix. Right now it has the old
...
behavior but I just need time tomorrow to add the correct behavior.
2000-02-14 20:31:01 +00:00
Zeev Suraski
0c470af314
Syntax highlighting was erronously emitting more than one semicolon and/or garbage with heredocs
2000-02-07 18:39:14 +00:00
Andi Gutmans
4b0da428e7
- Support the string offset syntax $a{2} with the regular array opcodes.
...
Will need to write new opcodes sometime but right now it's good enough
to announce the change to this string offset syntax for beta 4.
2000-02-06 20:18:35 +00:00
Andi Gutmans
7f48989be6
- This hopefully fixes the list($a, $a) = array(1,2) crash, i.e. when list
...
by mistake contains the same variable twice.
- BTW, there is no defined order of assignment. The value of $a after the
previous example is undefined, and should not be assumed to be either 1
nor 2.
2000-02-05 20:19:46 +00:00
Zeev Suraski
9f51f154aa
- Stop passing list/plist to internal functions
...
- Add a typedef for the pCopyConstructor function pointer
- Minor hacks
2000-02-05 15:11:24 +00:00
Zeev Suraski
b6197bcf90
Maintain a state of whether we're compiling and/or executing
2000-02-04 14:45:58 +00:00
Zeev Suraski
b3ec6d5d05
- Fix the annoying problem with list(), that surfaced up after our recent cleaning
...
patches
2000-02-02 16:47:43 +00:00
Andi Gutmans
131e3a06fb
- Get rid of remains of garbage.
...
- This should fix Thies' UMR
2000-02-01 16:02:38 +00:00
Zeev Suraski
400f464307
Fix ``'s
2000-01-29 17:49:05 +00:00
Andi Gutmans
7663e4f65e
- Add parser support for string offsets. This added three shift/reduce
...
conflicts but they all seem to be fine.
- Cleaned up the parsing rules a bit and made them much more compact and
elegant.
- Please CVS update and see that I didn't break anything.
2000-01-29 10:16:04 +00:00
Andi Gutmans
336bf35a2c
- Make loop a bit faster.
2000-01-28 22:23:28 +00:00
Andi Gutmans
58a0844b1c
- Make foreach() now copy the array but use the original array. It can
...
still be optimized A LOT but it's only a performance issue and not
a feature issue.
2000-01-24 19:04:07 +00:00
Zeev Suraski
fafbf6d8da
- Implement declare() with declarables framework
...
- Implement ticks - Germany&Norway - 5 points!
2000-01-24 19:00:30 +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
dc0e663241
Allow module startup to be separate from the compiler/executor startup
2000-01-16 19:41:15 +00:00
Zeev Suraski
f2d703e916
- Nuke undefined_variable_string
...
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Andi Gutmans
400ee6caa0
- Fix bug #3073 . continue in do..while() loops should work now
1999-12-31 12:56:48 +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
aec33aa753
Introduce a zval-specific cache - 5-15% speed improvement
1999-12-26 21:56:59 +00:00
Zeev Suraski
235386b245
Change ALLOC_ZVAL() semantics
1999-12-26 21:21:33 +00:00
Zeev Suraski
e28aff2f7a
Optimize
1999-12-24 16:03:44 +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
Zeev Suraski
946df29029
- Use function_add_ref() here too
1999-12-24 14:49:57 +00:00
Zeev Suraski
b996436b4c
Fix a class inheritence leak, when using static varibles in a parent class member function
1999-12-23 19:23:36 +00:00
Zeev Suraski
3b86ea7dc0
This one slipped away
1999-12-23 18:07:52 +00:00
Zeev Suraski
67b4b3a634
- require() of a dynamic expression now has the standard require() semantics
...
- Fixed a memory leak in require() of a dynamic expression
1999-12-23 15:03:25 +00:00
Andi Gutmans
ff737b6090
- Remove unused variable.
1999-12-22 14:38:00 +00:00
Zeev Suraski
f0888ccaef
Fix the highlighting problem. STR_REALLOC() should be used instead of plain erealloc()
...
whenever you're dealing with strings that might be coming back from the engine - there seem
to be a few other places like this in PHP.
1999-12-21 20:30:04 +00:00
Andrei Zmievski
80bab9d939
We're using ZVAL's now.
1999-12-21 17:14:31 +00:00
Zeev Suraski
a2cc070fc2
- Fix @expr
1999-12-20 20:01:19 +00:00
Zeev Suraski
be1bb28355
- Fix the crash Thies was experiencing (returning a function call could cause a crash)
...
- Fix the leak Thies was experiencing (@fcall() leaked)
1999-12-20 16:05:36 +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
Andi Gutmans
7fe808ea02
- By mistake commited this to the branch. It fixes a bug we introduced with
...
the return reference patch.
1999-12-17 08:24:10 +00:00
Andrei Zmievski
c9c6446aa1
- s/inheritence/inheritance/g
...
- Added is_subclass_of() function
1999-12-15 21:26:43 +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
Zeev Suraski
ef596bbafb
Move the #include of zend-parser.h out of zend_compile.h
1999-12-06 20:42:44 +00:00
Sascha Schumann
70df2d7478
Fix some warnings
1999-12-05 16:23:45 +00:00
Zeev Suraski
efc84af940
- Implement get_used_files() and get_imported_files()
1999-12-04 14:26:26 +00:00
Zeev Suraski
9baad80459
- Break the zend->PHP dependency introduced by the .php extension for use(),
...
by providing an API
- Enable Stig's patch for use() extensions (it wasn't refered to by the parser)
- Fix a memory leak in that code
1999-12-04 13:26:57 +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
6be3723f3d
UNIX/non ZTS compile fixes
1999-11-26 23:48:04 +00:00
Zeev Suraski
58153dfed0
- Improve the file handle closing code
1999-11-26 23:45:22 +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
52045afb08
- If a function's return value is unused then don't create a ZEND_FREE
...
opcode but free it after the function call in zend_execute.
1999-11-17 17:21:15 +00:00
Andi Gutmans
b7b614d0b5
- In any case create the free opcode. Need to allow the functions to
...
create a hint.
1999-11-16 18:46:32 +00:00
Andi Gutmans
dbb67ab9dc
- Add support for used_return_value passed to internal functions.
1999-11-16 18:30:06 +00:00
Andi Gutmans
6d988ec694
- Add support for BYREF_FORCE_REST
1999-11-03 19:21:56 +00:00
Andi Gutmans
83c79bb154
- Fix for Thies' leak and Andrei's crash
1999-10-28 15:53:31 +00:00
Andrei Zmievski
62c1407a4d
*** empty log message ***
1999-10-15 13:45:28 +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
228a537bbe
- Fix problem where function parameter fetches were created too late.
1999-09-21 20:00:01 +00:00
Andi Gutmans
babad2694e
- First step in fixing locking problem. Array fetches are now always done last.
...
Later on we will want to delay the write fetches even longer until after their
resulting expression is parsed. The way it is now, will make it very easy
to delay as long as we need.
1999-09-20 15:44:30 +00:00
Andi Gutmans
82c8a9e745
- Indirect references had all of the fetches by mistakenly backpatched.
...
Actually all of the fetches are supposed to be read, except for the last
one.
1999-09-20 14:45:36 +00:00
Zeev Suraski
ca1b3ffbc8
Shut up a warning
1999-09-10 16:16:24 +00:00
Andi Gutmans
22f066e708
- Add foreach() freeing code.
...
- Fix switch() freeing code to only free current function's switch expressions.
- I have a feeling break expr; in a switch where expr > 1 leaks because it
won't free all of the expressions. Fix is probably not trivial.
1999-09-09 14:15:17 +00:00
Zeev Suraski
a3f77686ef
Use \0NameFilenameLineno as key instead of numeric index for runtime defined functions
1999-09-02 21:06:05 +00:00
Andi Gutmans
1bfb1f7958
- Fix when redefining classes at run-time.
1999-08-26 06:47:45 +00:00
Zeev Suraski
96d4220a5d
Fix several class issues
1999-08-14 12:54:17 +00:00
Zeev Suraski
ef5b7e212d
Generate better warnings for class/function redefinitions
1999-08-14 11:50:36 +00:00
Andi Gutmans
28f9dc6e56
- Got rid of the C++ comments.
1999-08-10 15:43:32 +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
07e0885519
Make set_compiled_filename() return a pointer to the allocated file name
1999-08-02 18:40:10 +00:00
Andi Gutmans
739132e58d
- Fixed a leak when doing inheritance. The parent class name wasn't being freed.
...
- Fixed a stack leak. Functions that had late argument binding were set up as
INIT_FCALL_BY_NAME but were using DO_FCALL and not the corresponding
DO_FCALL_BY_NAME.
1999-07-29 12:24:58 +00:00
Andi Gutmans
741ca16711
- Fixed various inheritance problems & Andrey's leak
1999-07-28 17:59:55 +00:00
Zeev Suraski
879bfc7a34
Inherit parent's constructor
1999-07-27 20:34:31 +00:00
Zeev Suraski
c4bc4871ee
Fix runtime inheritence (child functions/members should have higher precedence)
1999-07-27 20:14:58 +00:00
Zeev Suraski
075146773f
*** empty log message ***
1999-07-26 21:31:40 +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
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
0cdb7d6a29
Fix that memory leak... nested function issue remains
1999-07-24 14:38:05 +00:00
Zeev Suraski
9c754da0fc
Fix RETURN & SWITCH memory leak issue
1999-07-24 11:43:21 +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
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
Zeev Suraski
d66fad5fcd
Ignore T_PHP_TRACK_VARS in the parser (handled in the scanner)
1999-07-16 16:42:49 +00:00
Zeev Suraski
b5b1117760
License update
1999-07-16 14:58: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
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
d894cf44d8
Support definition of classes that are derived from classes that are defined in runtime
1999-07-08 16:55:27 +00:00
Zeev Suraski
c471c77c58
Fix Thies's bug report
1999-06-22 20:24:51 +00:00
Zeev Suraski
3eac45ea80
* Fix concatenation of arrays (it was PHP 3.0 style, copying zval's instead
...
of zval *, and it wasn't using reference counting)
* Fix a memory leak in static array()'s with textual indices
1999-06-22 19:05:40 +00:00
Zeev Suraski
d47d83511a
E_ERROR -> E_COMPILE_ERROR in the compiler
1999-06-11 13:40:18 +00:00
Zeev Suraski
54d210427a
Two fixes:
...
* The error generated by a failed class inheritence wasn't properly
displaying the file in which he error occured.
* Inheritence didn't work if the parent class had uppercase letters in it.
1999-06-11 13:37:29 +00:00
Andi Gutmans
7ed4923441
- Fix the static array() initializing
1999-06-09 19:26:54 +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
Andi Gutmans
5b0ae2dff3
Work around a compiler bug - mark variables that are sent to functions that aren't yet
...
defined as FETCH_W (because they might end up being sent by reference)
1999-06-06 17:35:42 +00:00
Zeev Suraski
ed06a70f7f
* Centralized shutdown
...
* Change shutdown order again
1999-06-05 20:00:00 +00:00
Zeev Suraski
89f139d3b0
Call the request_shutdown on modules before destroying symbol tables, so that
...
the session module can be implemented
1999-06-05 19:10:40 +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
52ec64359c
Fixes
1999-05-31 18:33:12 +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
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
87ba08d1d0
Avoid leaking fd's in case of failures
1999-05-22 02:13:01 +00:00
Andi Gutmans
3facf7cb7c
- Updates we did today
1999-05-20 13:04:59 +00:00
Andi Gutmans
d79292d52b
- Fix a small problem with class decelerations.
1999-05-20 09:08:29 +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
473d1d7cf1
* Fix a bug that occured in case of parse errors. We need to restore the lexical state
...
even if the compilation failed.
1999-05-11 17:50:37 +00:00
Zeev Suraski
bc3686c14a
* Fix a problem with constant quoted strings, that was causing Thies's problem
...
* Remove a development-time printf
1999-04-30 10:46:48 +00:00
Zeev Suraski
208e81696f
Another small fix
1999-04-24 17:16:39 +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
a9f9ae7920
Thread safety patch. It works now with 'just in time' resource initialization!
1999-04-21 17:26:37 +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
342c6e0b23
Whatnot:
...
* updated alloc_persist to use critical sections
* changed extension shutdown to two-phase
* updated dependencies
* PR support (don't remember if there was any really)
1999-04-18 15:11:52 +00:00
Andi Gutmans
3d631c4ca0
- Should fix the pass by reference problem. This happened because we moved
...
start from arg 1 now and not arg 0. There might be more places which need fixing
like in the executor but the bug seems OK now.
1999-04-15 17:41:21 +00:00
Andi Gutmans
39f9487ee1
-Tiny patches
1999-04-14 19:53:33 +00:00
Andi Gutmans
e1e2226b92
- Fix various memory leaks.
1999-04-13 19:28:03 +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
b06c5731fc
Minor fixes:
...
missing zval_copy_ctor()
messed up AiCount fix
1999-04-12 17:59:36 +00:00
Zeev Suraski
0a6e9ddd7f
Prevent class redeclarations
1999-04-09 10:59:58 +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