Commit Graph

480 Commits

Author SHA1 Message Date
Marcus Boerger
be8287e55c Partly revert and reintroduce hash table entries for the ctor.
# Obviously not the brightest idea i had today.
2003-09-03 21:21:18 +00:00
Marcus Boerger
5569d7fae9 Nuke unused variable, too 2003-09-03 20:28:13 +00:00
Marcus Boerger
61b96d1fe2 - Inheritance applies to __clone() too.
- No need to add additional functions for the constructor.
  The handler uses the pointer as intended and doesn't look the the name.
2003-09-03 20:26:01 +00:00
Marcus Boerger
91ff8d67e7 Cannot turn a static property into a non static one and vice versa 2003-09-03 19:28:46 +00:00
Marcus Boerger
7bbbd5035d Fix handling of static properties initialized to arrays 2003-09-03 18:01:22 +00:00
Marcus Boerger
1d21d48e8a Add missing error messages when violating static property inheritance rules. 2003-09-03 16:34:35 +00:00
Marcus Boerger
1b39a5aa2c Fix static properties.
#
# There's only an errormessage missing which i'll wommit as soon as i find out
# how to do it best. But besides that damn message everything works now and all
# inheritance rules apply.
#
2003-09-03 16:13:40 +00:00
Marcus Boerger
1d3d396fea Allow redeclareing a protected property as public.
#
# The only known thing left at this moment is that the protected static members
# of a base class is different then the redeclared public property. I tried
# to remove both new and old static properties in the derived class and copy
# the base property with the new name. But for reasons i have to check later
# that didn't result in the expected behavior. Anyway we would need a warning
# if someone tries to change the value of a static property in a derived class.
#
2003-09-03 10:58:55 +00:00
Zeev Suraski
93f0ee5fda Revert bogus patch
One must *never* use E_CORE_* error levels!
2003-09-03 08:39:43 +00:00
Marcus Boerger
d1b74000ad Fix error messages 2003-09-02 23:12:37 +00:00
Marcus Boerger
469b746b4d Fix error level 2003-09-02 13:28:34 +00:00
Marcus Boerger
0f3374615b Currently we cannot support static ctor/dtor 2003-09-02 13:26:25 +00:00
Zeev Suraski
aaa1cdca31 Fix a problem in implicit public properties and inheritance 2003-08-29 08:51:43 +00:00
Sascha Schumann
2e36578cfd Add format attribute to a number of functions
Kill a few warnings
2003-08-28 16:41:20 +00:00
Marcus Boerger
19ec7a09fc - Provide appropriate way to destroy internal zval's.
- Allow internal zval's of type string and disallow complex types.
- Define the default string for extensions at class level instead of ctor.
2003-08-24 17:32:47 +00:00
Zeev Suraski
a9107e2be1 Use pemalloc() 2003-08-24 16:17:45 +00:00
Marcus Boerger
baaa4c903d Internal classes can now have default properties. 2003-08-23 19:37:39 +00:00
Marcus Boerger
fbda310a41 - Flag ctor/dtor methods
- Use this to prevent memleaks when an exception gets thrown in ctors.
# I added the dtor flags for consistency, atm a compareable check in
# isn't necessary for destruction. But anyway i'll use this for the
# Relection API too.
2003-08-23 15:38:58 +00:00
Zeev Suraski
b5786d4220 ws 2003-08-18 20:43:09 +00:00
Marcus Boerger
9c68f33b51 Implement a TBD: JMP to the end of foreach 2003-08-17 12:17:34 +00:00
Marcus Boerger
f2d4e4ca48 WS 2003-08-17 12:16:10 +00:00
Masaki Fujimoto
ab9dcec292 - added script encoding support to Zend Engine 2.
this enables ZE2 to gracefully parse scripts written in UTF-8 (with BOM),
  UTF-16, UTF-32, Shift_JIS, ISO-2022-JP etc... (when configured with
  '--enable-zend-multibyte' and '--enable-mbstring')
2003-08-11 05:24:42 +00:00
Marcus Boerger
2bbf4ad261 Bugfix #24637 __destruct not called 2003-08-10 23:59:35 +00:00
Moriyoshi Koizumi
fe489dcb4f Fix segfault when a referenced parameter is specified with typehint.
Result of the node will never be used because verify_instanceof handler has
been eliminated.
2003-08-09 19:29:38 +00:00
Stanislav Malyshev
b6ff804cfe fix leaks: bug #24831 2003-08-04 10:40:05 +00:00
Zeev Suraski
1959133fb3 Simplify code using XOR 2003-08-04 07:53:09 +00:00
Marcus Boerger
538aad24e3 Fix test and add missing initialization 2003-08-03 22:03:52 +00:00
Zeev Suraski
f8bbafd604 ntroduce infrastructure for supplying information about arguments,
including:

- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance

Both user and builtin functions share the same data structures.

To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:

ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
    ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
    ZEND_ARG_PASS_INFO(0)
    ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();

and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.

The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.

The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
Zeev Suraski
9d7122fb53 Generalize fetch_class 2003-08-03 08:21:08 +00:00
Zeev Suraski
accd6b623b Finish the array overloading patch 2003-07-31 09:06:11 +00:00
Zeev Suraski
68fa4e50f8 Get rid of an opcode 2003-07-30 17:49:27 +00:00
Zeev Suraski
f41f62c2ff Support overloading of $foo["bar"] += "baz" 2003-07-30 17:40:54 +00:00
Zeev Suraski
c0b46739ca Improve array overloading - support unset($foo["bar"]) 2003-07-30 17:12:06 +00:00
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