Commit Graph

40 Commits

Author SHA1 Message Date
e1e6a19f30 Update code formatting.
All checks were successful
The build was successful.
2019-11-18 18:57:10 +01:00
c7b6e76d0d Get rid of unused variables/labels/etc.
All checks were successful
The build was successful.
2019-06-16 00:33:03 +02:00
24c75975e3 Correct the condition.
All checks were successful
The build was successful.
2019-06-05 19:15:47 +02:00
53199cac4e Another fixes to OOP-related error reporting.
All checks were successful
The build was successful.
2019-05-30 20:18:20 +02:00
c206011c95 Rework PH7_ClassExtractAttribute() function. Now it returns a pointer to valid attribute.
All checks were successful
The build was successful.
2019-05-29 20:02:49 +02:00
5e166492d5 Revert 02471b4ccb.
All checks were successful
The build was successful.
2019-05-29 18:46:31 +02:00
02471b4ccb Do not install private methods from parent to subclass.
All checks were successful
The build was successful.
All methods defined in superclass can be access by $this and $parent construct. There is no need to copy private methods, as they cannot be access in $this context.
2019-05-29 13:25:17 +02:00
26333360b0 Fix similar to a25b163af6.
All checks were successful
The build was successful.
2019-05-28 20:04:23 +02:00
e654e42b07 Store class directly in function container.
All checks were successful
The build was successful.
2019-05-22 08:33:56 +02:00
9fd61a207b Store class pointer in attribute during installation.
All checks were successful
The build was successful.
2019-05-21 08:42:45 +02:00
1acbd21caf Store a pointer to class container in each method.
All checks were successful
The build was successful.
2019-05-21 08:40:10 +02:00
a25b163af6 Fix another PH7 conceptual bug. Reverse this logic.
All checks were successful
The build was successful.
2019-05-18 13:42:30 +02:00
77c57674e8 Allow private methods redeclaration.
All checks were successful
The build was successful.
2019-05-17 19:54:32 +02:00
4cc7940216 Correctly identify a member.
All checks were successful
The build was successful.
2019-05-17 09:05:17 +02:00
48ccd7fef0 Copy all attributes from base classes and emit a warning if redeclared in subclass.
All checks were successful
The build was successful.
2019-05-17 06:52:29 +02:00
e8c675bd8e Store a pointer to class container to reduce memory usage.
All checks were successful
The build was successful.
2019-05-16 15:41:37 +02:00
7203492763 Store a class name in each attribute.
All checks were successful
The build was successful.
2019-05-16 13:25:06 +02:00
5256dda922 Attempt to fix '$this' and '$parent' constructs.
All checks were successful
The build was successful.
2019-05-10 23:45:32 +02:00
9b1ad67580 PH7_VmThrowError() always breaks script execution on PH7_CTX_ERR.
All checks were successful
The build was successful.
Thus code placed below will never get executed and is completely useless.
2019-04-24 18:09:41 +02:00
c9203b6c91 New source code legal format.
All checks were successful
The build was successful.
2019-04-20 19:29:15 +02:00
3f205c19ce Get rid of dirty references. Return a reference & pass-by reference are still working.
All checks were successful
The build was successful.
2019-03-29 22:55:49 +01:00
140bd35f93 Set proper type for all class attributes.
All checks were successful
The build was successful.
2019-03-29 09:00:55 +01:00
1460200919 This is true about PH7, but not about the AerScript.
All checks were successful
The build was successful.
2019-03-20 19:39:30 +01:00
7b1ed59f41 Basic check if all methods declared in interface are also defined in class.
All checks were successful
The build was successful.
2019-03-20 09:24:30 +01:00
2db1954779 Another bunch of fixes for object type.
All checks were successful
The build was successful.
2018-09-24 13:34:22 +02:00
550107235c Do not try to dump a non-instantiated object.
All checks were successful
The build was successful.
2018-09-24 12:22:58 +02:00
ae79cb57de No need to store information about line number in ph7_class struct.
All checks were successful
The build was successful.
2018-09-05 17:42:10 +02:00
d793d3ed70 Rename PH7_VmGenericError() to PH7_VmThrowError()
All checks were successful
The build was successful.
2018-09-04 08:54:48 +02:00
d3d3dcc767 Partially switch to new error reporting.
All checks were successful
The build was successful.
2018-09-03 16:16:32 +02:00
7b3e6c5b76 P# introduces virtual classes and virtual methods 2018-07-30 17:08:25 +02:00
cd2adc1f51 Useless variable declaration & assignment 2018-07-28 11:56:09 +02:00
8ab80ff8bc Several fixes to multiple inheritance
* Only first inherited class should be available via 'parent' keyword
 * If class X extends Y, Z and both Y and Z implements a(), $this->a() should match to the first one
2018-07-28 11:53:56 +02:00
72f2cc2c1b Remove useless fields, free some memory. 2018-07-27 23:41:51 +02:00
caf9126f0b Several changes:
* small code cleanup
 * implement new structure for storing information about class inheritance
 * implement PH7_NewClassInfo()
 * make a use of smaller ph7_class_info instead of ph7_class, to reduce memory usage
2018-07-27 21:05:54 +02:00
e47eef7d97 Fix error reporting 2018-07-27 20:01:45 +02:00
4bf46f1a87 I hate typos 2018-07-27 19:00:29 +02:00
9e885b3196 Generally speaking ... this is working.
This commit partially fixes #5, however it still needs some work. TODO:
 * remove debugging printf calls,
 * some tuning, to consume less memory,
 * implement similar solution for interfaces
2018-07-27 17:42:12 +02:00
b040886b97 Test and temporary version of compiler emiting PH7_OP_CLASS_INIT instruction.
However it works on ph7_class and thus passes whole class into the VM, what causes memory overhead,
as finally we have to find this class on the VM's stack. Instead, we could pass some ph7_class_info
structure containing a name of class to look for and information about its inheritances.
2018-07-27 08:24:53 +02:00
ceca007cd1 Correct some typos 2018-07-22 19:25:12 +01:00
abb91a9874 Reorganize the repository for new build system 2018-07-20 22:35:09 +02:00