Commit Graph

39 Commits

Author SHA1 Message Date
Rafal Kupiec c7b6e76d0d
Get rid of unused variables/labels/etc.
The build was successful. Details
2019-06-16 00:33:03 +02:00
Rafal Kupiec 24c75975e3
Correct the condition.
The build was successful. Details
2019-06-05 19:15:47 +02:00
Rafal Kupiec 53199cac4e
Another fixes to OOP-related error reporting.
The build was successful. Details
2019-05-30 20:18:20 +02:00
Rafal Kupiec c206011c95
Rework PH7_ClassExtractAttribute() function. Now it returns a pointer to valid attribute.
The build was successful. Details
2019-05-29 20:02:49 +02:00
Rafal Kupiec 5e166492d5
Revert 02471b4ccb.
The build was successful. Details
2019-05-29 18:46:31 +02:00
Rafal Kupiec 02471b4ccb
Do not install private methods from parent to subclass.
The build was successful. Details
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
Rafal Kupiec 26333360b0
Fix similar to a25b163af6.
The build was successful. Details
2019-05-28 20:04:23 +02:00
Rafal Kupiec e654e42b07
Store class directly in function container.
The build was successful. Details
2019-05-22 08:33:56 +02:00
Rafal Kupiec 9fd61a207b
Store class pointer in attribute during installation.
The build was successful. Details
2019-05-21 08:42:45 +02:00
Rafal Kupiec 1acbd21caf
Store a pointer to class container in each method.
The build was successful. Details
2019-05-21 08:40:10 +02:00
Rafal Kupiec a25b163af6
Fix another PH7 conceptual bug. Reverse this logic.
The build was successful. Details
2019-05-18 13:42:30 +02:00
Rafal Kupiec 77c57674e8
Allow private methods redeclaration.
The build was successful. Details
2019-05-17 19:54:32 +02:00
Rafal Kupiec 4cc7940216
Correctly identify a member.
The build was successful. Details
2019-05-17 09:05:17 +02:00
Rafal Kupiec 48ccd7fef0
Copy all attributes from base classes and emit a warning if redeclared in subclass.
The build was successful. Details
2019-05-17 06:52:29 +02:00
Rafal Kupiec e8c675bd8e
Store a pointer to class container to reduce memory usage.
The build was successful. Details
2019-05-16 15:41:37 +02:00
Rafal Kupiec 7203492763
Store a class name in each attribute.
The build was successful. Details
2019-05-16 13:25:06 +02:00
Rafal Kupiec 5256dda922
Attempt to fix '$this' and '$parent' constructs.
The build was successful. Details
2019-05-10 23:45:32 +02:00
Rafal Kupiec 9b1ad67580
PH7_VmThrowError() always breaks script execution on PH7_CTX_ERR.
The build was successful. Details
Thus code placed below will never get executed and is completely useless.
2019-04-24 18:09:41 +02:00
Rafal Kupiec c9203b6c91
New source code legal format.
The build was successful. Details
2019-04-20 19:29:15 +02:00
Rafal Kupiec 3f205c19ce
Get rid of dirty references. Return a reference & pass-by reference are still working.
The build was successful. Details
2019-03-29 22:55:49 +01:00
Rafal Kupiec 140bd35f93
Set proper type for all class attributes.
The build was successful. Details
2019-03-29 09:00:55 +01:00
Rafal Kupiec 1460200919
This is true about PH7, but not about the AerScript.
The build was successful. Details
2019-03-20 19:39:30 +01:00
Rafal Kupiec 7b1ed59f41
Basic check if all methods declared in interface are also defined in class.
The build was successful. Details
2019-03-20 09:24:30 +01:00
Rafal Kupiec 2db1954779
Another bunch of fixes for object type.
The build was successful. Details
2018-09-24 13:34:22 +02:00
Rafal Kupiec 550107235c
Do not try to dump a non-instantiated object.
The build was successful. Details
2018-09-24 12:22:58 +02:00
Rafal Kupiec ae79cb57de
No need to store information about line number in ph7_class struct.
The build was successful. Details
2018-09-05 17:42:10 +02:00
Rafal Kupiec d793d3ed70
Rename PH7_VmGenericError() to PH7_VmThrowError()
The build was successful. Details
2018-09-04 08:54:48 +02:00
Rafal Kupiec d3d3dcc767
Partially switch to new error reporting.
The build was successful. Details
2018-09-03 16:16:32 +02:00
Rafal Kupiec 7b3e6c5b76
P# introduces virtual classes and virtual methods 2018-07-30 17:08:25 +02:00
Rafal Kupiec cd2adc1f51
Useless variable declaration & assignment 2018-07-28 11:56:09 +02:00
Rafal Kupiec 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
Rafal Kupiec 72f2cc2c1b
Remove useless fields, free some memory. 2018-07-27 23:41:51 +02:00
Rafal Kupiec 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
Rafal Kupiec e47eef7d97
Fix error reporting 2018-07-27 20:01:45 +02:00
Rafal Kupiec 4bf46f1a87
I hate typos 2018-07-27 19:00:29 +02:00
Rafal Kupiec 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
Rafal Kupiec 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
Rafal Kupiec ceca007cd1 Correct some typos 2018-07-22 19:25:12 +01:00
Rafal Kupiec abb91a9874
Reorganize the repository for new build system 2018-07-20 22:35:09 +02:00