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