Commit Graph

497 Commits

Author SHA1 Message Date
Stanislav Malyshev
57b12285de fix compare 2003-07-27 16:43:05 +00:00
Stanislav Malyshev
7b1bbc85bc use zend_binary_strncasecmp 2003-07-27 16:39:35 +00:00
Stanislav Malyshev
9fa2d52310 make clone and throw coexist peacefully 2003-07-27 13:20:31 +00:00
Stanislav Malyshev
5724c7a66c fix leaks with class constants (bug #24699) 2003-07-27 12:03:54 +00:00
Stanislav Malyshev
78f8ca6e55 make __clone call case insensitive, just as other calls are 2003-07-27 11:42:21 +00:00
Zeev Suraski
55097d1dcf Fix another HANDLE_NUMERIC bug. Looks like you opened Pandora's box, Sterling ;) 2003-07-24 13:14:57 +00:00
Zeev Suraski
7928e763d2 Remove useless code 2003-07-24 12:51:07 +00:00
Zeev Suraski
03b6af07eb Support references in foreach()
Syntax:
  foreach ($arr as &$val)
  foreach ($arr as $key => &$val)
2003-07-24 12:38:33 +00:00
Stanislav Malyshev
237116aa27 Remove namespace leftovers 2003-07-23 08:58:46 +00:00
Zeev Suraski
e10dbc607c Fix bug in the verification of interface-function implementation 2003-07-16 09:13:47 +00:00
Zeev Suraski
3a898f6d4e More cleanup for assign-op handling of objects 2003-07-16 08:57:08 +00:00
Zeev Suraski
134338522f Rework zend_do_declare_property and related code into one code base 2003-07-07 16:22:56 +00:00
Zeev Suraski
938c0fbc19 Initial support for overloading of array syntax for objects (very initial) 2003-07-07 09:00:36 +00:00
Marcus Boerger
d7e14ad8a3 Allow final private methods
#
# Declaring a method private and final would only be an error for an abstract
# class. But at the moment the method is defined and it's modifiers are checked
# we do not know whether or not we have an abstract class. It could already be
# abstract but it also become abstract later.
#
# Since i made the mistake in first place i remove the check now.
#
# Providing the correct test would slow down the compiler becuase we'd have to
# iterate through all methods on all abstract classes and check for this. I
# guess we can live without. Or does anybody wants this to be implemented ?
2003-07-03 16:45:37 +00:00
Stanislav Malyshev
8f0234160a enable Classname() constructor to be called via parent::__constructor() 2003-07-03 12:03:11 +00:00
Andi Gutmans
02c7aacf83 - Nuke CG(in_clone_method) 2003-07-02 16:52:07 +00:00
Sterling Hughes
778d8c8bf1 nuke "main" as a reserved keyword 2003-06-30 20:24:26 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
Marcus Boerger
60c7abac61 Add final classes 2003-06-21 21:56:06 +00:00
Stanislav Malyshev
8cd9792375 Fix bug #23384 - static class::constant constants should now
work in static & array expressions.
2003-06-15 13:58:50 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Zeev Suraski
8d2a4e04ae Fix bogus implicit declarations of properties (squash bug #23671) 2003-06-09 13:51:53 +00:00
Zeev Suraski
d329ce93f2 Nicer handling of protected/private members in print_r() 2003-06-08 18:53:58 +00:00
Stanislav Malyshev
f7f5a5ea6b MEGA-patch: namespaces are R.I.P. 2003-06-02 12:13:11 +00:00
Sterling Hughes
5bb29cfaeb revert the function call caching patch until a new solution is decided
upon.
2003-05-31 18:31:28 +00:00
Marcus Boerger
21d32c2430 Fix ~ operator in class constants. 2003-05-29 19:27:11 +00:00
Marcus Boerger
472cc5b9f3 Faster interface inheritance & faster inheritance checks 2003-05-29 19:00:40 +00:00
Wez Furlong
15fd642525 Fix Bug #23285 (Potential Stack Overflow in zendlex). 2003-05-29 09:01:55 +00:00
Sterling Hughes
88b2f89eee Cache function call lookups with loops (store in a temporary variable on the
result opline).
Assuming lazy concensus on message that GeorgeS sent to the list last week
2003-05-28 20:42:40 +00:00
Stanislav Malyshev
462eff3497 fix __clone 2003-05-19 17:12:56 +00:00
Marcus Boerger
d3693d9214 Inheritance fix
# here we  go again, sorry for the mess and thanks to edin for reverting it
2003-05-08 15:04:43 +00:00
Edin Kadribasic
7a0efe828a Reverting Marcus' incomplete patch which broke the build. 2003-05-07 22:19:43 +00:00
Marcus Boerger
764eaa5b8b Inheritance fixes 2003-05-07 00:54:38 +00:00
Marcus Boerger
9d251cde97 Don't inherit twice what is needed only once 2003-05-04 18:56:35 +00:00
Sterling Hughes
b4262dcf17 Add check for final properties 2003-04-20 14:52:40 +00:00
Sebastian Bergmann
dccdb2f549 Fix warnings. 2003-04-11 17:30:42 +00:00
Sterling Hughes
c013f78274 satisfy andi's switch fetish ;-) 2003-04-10 20:08:02 +00:00
Sebastian Bergmann
974f406eda Fix ZTS build. Fix warning. 2003-04-10 17:02:31 +00:00
Sterling Hughes
0191ba5de1 allow expressions within constants, so the following is possible
class foo {
	const a = 1<<0;
	const b = 1<<1;
	const c = a | b;
}

this makes const a compile-time expression.  all other operators are
unaffected.
2003-04-10 15:43:47 +00:00
Andrei Zmievski
91eff553e3 Initialize all relevant zend_class_entry fields to avoid accidental
crashes.
2003-04-03 14:44:41 +00:00
Andrei Zmievski
bdd3b6042c Implement a different way to catch documentation comments. 2003-04-02 16:51:49 +00:00
Andrei Zmievski
e6255b06b1 Revert portions of the doc comment patch. There should be no parser
errors now.
2003-04-02 16:13:12 +00:00
Andrei Zmievski
62f9eb8006 Split ZEND_NAMESPACE into user and internal namespaces. Hope this is
okay with engine folks.
2003-04-01 19:37:04 +00:00
Andrei Zmievski
5657b83691 Multi-purpose patch:
- The fields of zend_namespace were not completely initialized which
   led to a variety of problems.
 - The occurrence of class/interface/namespace definition is now
   captured.
 - Functions/classes/interfaces/namespaces can be preceded by doc
   comments which are stored for use by extensions.
2003-03-31 20:42:01 +00:00
Zeev Suraski
96231c3ab5 Add missing initialization 2003-03-29 19:20:35 +00:00
Zeev Suraski
20860feef1 Fix crash 2003-03-29 11:27:17 +00:00
Zeev Suraski
5097be302e Initial support for enforcing prototype of abstract/interface method implementations 2003-03-29 11:19:38 +00:00
Ilia Alshanetsky
018d851129 Fixed bug #22900 (declaration of namespaces with same name results in leaks). 2003-03-26 17:06:08 +00:00
Andi Gutmans
85d2c35bfa - Temporarily fix problem with inheriting from an internal class. This might
- need some rework in the future (thanks to Marcus)
2003-03-25 20:36:26 +00:00
Zeev Suraski
0aef71ff89 Another fix for implicit public, perhaps it was not such a good idea :I 2003-03-23 08:14:41 +00:00
Andrei Zmievski
39d5a63803 - Keep track of starting/ending line numbers for user functions.
- Store last parsed doc comment in a compiler global for future use.
2003-03-19 21:17:47 +00:00
Zeev Suraski
40326f6adf - Fix situation where a derived class declares a public (or implicit public)
with the same name as a private in the parent
- Optimize 'static binding' of private properties a bit
2003-03-18 16:30:23 +00:00
Zeev Suraski
fa7dc03edb Fix a crash bug in the implicit public declaration 2003-03-12 09:38:19 +00:00
Zeev Suraski
3e7cf8e15e Clean redundant code 2003-03-10 07:20:43 +00:00
foobar
f8fc50ed6d Fixed some leaks. Patch by Moriyoshi 2003-03-10 03:04:02 +00:00
Zeev Suraski
0eae231254 Fix handling of ::foo 2003-03-09 22:17:15 +00:00
Zeev Suraski
3012bdc332 Cleanup 2003-03-09 22:02:37 +00:00
Zeev Suraski
8bc88d8df4 Fix parsing rules of namespaces/classes 2003-03-09 20:53:57 +00:00
Zeev Suraski
8e1917bdbe Fix :: handling 2003-03-09 17:06:52 +00:00
Zeev Suraski
805f98065d Fix warnings 2003-03-06 23:45:50 +00:00
Zeev Suraski
0338111950 Require abstract classes to be explicitly declared 'abstract', in order to
avoid making developers traverse the entire class/interface hierarchy
before they can figure out whether a class is instantiable
(ok, so it makes sense :)
2003-03-06 22:53:23 +00:00
Zeev Suraski
44347cf64b Change opcode name 2003-03-06 14:42:36 +00:00
Zeev Suraski
ff76511a08 Add class type hints 2003-03-06 14:31:17 +00:00
Zeev Suraski
812d91d08c Fix auto globals 2003-03-05 21:36:30 +00:00
Zeev Suraski
6ad2420d2d Implement $obj::static_func() 2003-03-05 13:25:33 +00:00
Zeev Suraski
26dd8492ed Add support for interfaces 2003-03-05 11:14:44 +00:00
Zeev Suraski
d5ada68654 Remove legacy code 2003-03-04 13:52:03 +00:00
Zeev Suraski
e0c3e2cf93 Remove redundant code 2003-03-04 13:36:16 +00:00
Zeev Suraski
98b990e336 Improve infrastructure 2003-03-02 13:33:31 +00:00
Zeev Suraski
f7b7800479 Add infrastructure for JIT initialization of auto globals 2003-03-02 10:04:53 +00:00
Zeev Suraski
805637b06d Fix mem leak 2003-03-01 19:08:41 +00:00
Andi Gutmans
1a7c0d52dc - Make __construct() have higher priority than class name functions
- for constructors.
- Fix problem with the engine allowing final/abstract for the same method.
- Both patches are by Marcus Börger.
2003-03-01 14:57:49 +00:00
Zeev Suraski
5793784c93 Get the bits right - final/private fix 2003-02-25 10:03:26 +00:00
Stanislav Malyshev
3cf20f86db fix exception handling 2003-02-24 13:35:47 +00:00
Zeev Suraski
535aa63293 Add 'final' 2003-02-24 12:05:58 +00:00
Zeev Suraski
731a55ad52 Move abstract inheritance logic to the right spot 2003-02-23 13:58:48 +00:00
Zeev Suraski
bb956372a5 Fixed abstract handling in inheritence 2003-02-23 12:51:40 +00:00
Stanislav Malyshev
e645f20d07 Allow namespaces to have a number of parts. I.e., now you can do:
namespace foo {
	function abc() {}
}
...
namespace foo {
	functio def() {}
}
2003-02-20 19:01:53 +00:00
Zeev Suraski
955636af69 Avoid using a C++ reserved word 2003-02-18 17:18:28 +00:00
Stanislav Malyshev
3e45b23799 add support for ::foo syntax meaning "global one" 2003-02-16 13:27:33 +00:00
Stanislav Malyshev
c9b2ec7be7 remove debug prints 2003-02-16 12:04:41 +00:00
Sebastian Bergmann
6d300baf84 ZTS fixes 2003-02-16 11:34:49 +00:00
Stanislav Malyshev
a4c3b2ce80 Namespace patch. Big changes:
1. Nested classes are gone.
2. New syntax for namespaces:
namespace foo {
	class X { ... }
	function bar { ... }
	var x = 1;
	const ZZ = 2;
}
3. Namespaced symbol access: $x = new foo::X; - etc.
For now, namespaces are case insensitive, just like classes.
Also, there can be no global class and namespace with the same name
(to avoid ambiguities in :: resolution).
2003-02-16 11:12:43 +00:00
Zeev Suraski
3c2a1255cd Fix declaration of class members that don't have an explicit access modifier 2003-02-12 16:28:34 +00:00
Zeev Suraski
beaf84ea17 Fix require() handling - that's an old bug! 2003-02-11 15:41:46 +00:00
Zeev Suraski
2814504143 Improve parser handling of 'abstract' 2003-02-11 09:48:37 +00:00
Zeev Suraski
f196e11f42 Fix zend_initialize_class_data() 2003-02-10 16:46:05 +00:00
Zeev Suraski
c17c7a2bfa Centralize class initialization 2003-02-10 16:11:24 +00:00
Zeev Suraski
6317e26576 - Treat $this->foo inside class X as an implicit 'public $foo' if X::$foo
is not explicitly declared
- Forbid multiple declaration of the same variable
2003-02-10 12:46:58 +00:00
Zeev Suraski
5e12de9510 Add missing destructors 2003-02-10 11:03:22 +00:00
Zeev Suraski
b39b33c4c5 Fix the 2nd buglet in the error message :) 2003-02-06 00:39:58 +00:00
Zeev Suraski
17439aa9c4 Rework static class properties - now supports access restrictions 2003-02-05 13:35:52 +00:00
Zeev Suraski
ef77e582f5 Fix buglet in error message 2003-02-05 07:46:13 +00:00
Zeev Suraski
471947b188 Reimplement PPP properties 2003-02-04 12:12:34 +00:00
Andi Gutmans
87f4472afb - Fix warning 2003-02-02 05:20:31 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Stanislav Malyshev
123d8f782f fix memory leak 2003-01-29 14:25:53 +00:00
Zeev Suraski
49fd225238 Fix a ticks related crash 2003-01-28 11:34:24 +00:00
Stanislav Malyshev
3a4ace13b4 Replace MAKE_VAR opcode with special 'data' opcode
This opcode is not executeable but only holds data for opcodes
that need more than two arguments (presently only ASSIGN_OBJ and the ilk but
in the future also ASSIGN_DIM)
2003-01-27 15:13:01 +00:00
Stanislav Malyshev
dce8267f35 Restore for now old statics behaviour (so that indirect $$var references would work again). Comprehensive fix will follow later. 2003-01-19 17:25:39 +00:00