Rafal Kupiec
48d5088265
Enable the magic number protection.
2019-06-27 22:57:08 +02:00
Rafal Kupiec
647454b98d
Another signedness correction.
2019-06-22 20:45:22 +02:00
Rafal Kupiec
72782b147a
Do not convert between data pointers and function pointers.
2019-06-22 12:35:33 +02:00
Rafal Kupiec
dcf37af75e
Implement a NULL-coalescing '??' operator.
2019-06-21 00:34:41 +02:00
Rafal Kupiec
59811ac742
Completely rely on the compiler.
2019-06-20 12:10:02 +02:00
Rafal Kupiec
bd24aa0605
Correct more compiler warnings.
2019-06-19 09:31:40 +02:00
Rafal Kupiec
690213e0c7
Do not use a pointer for temporary value.
2019-06-18 13:25:40 +02:00
Rafal Kupiec
bffd44a7b4
Get rid of some annoying compiler warnings.
2019-06-17 09:51:37 +02:00
Rafal Kupiec
c7b6e76d0d
Get rid of unused variables/labels/etc.
2019-06-16 00:33:03 +02:00
Rafal Kupiec
8985044054
Remove some unused variables.
2019-06-15 17:43:24 +02:00
Rafal Kupiec
010bdd7331
Properly destroy temporary memory object. Fix memory leak.
2019-06-14 17:16:41 +02:00
Rafal Kupiec
0bef248298
Implement PH7_VmDestroyMemObj() to forcibly destroy a memory object.
2019-06-14 17:11:34 +02:00
Rafal Kupiec
d09a33da55
Do not duplicate variable name in this case.
...
This should save a lot of memory on many method calls.
2019-06-14 10:17:50 +02:00
Rafal Kupiec
5c824ec67d
Do not set any recursion depth limit.
2019-06-10 12:11:55 +02:00
Rafal Kupiec
78c416c6b8
Implement the implicit 'auto' type.
...
An implicitly typed local variable is strongly typed just as if it had been declared the type, but the compiler determines the type. The following two declarations of $i are functionally equivalent:
int $i = 10; // Explicitly typed.
auto $i = 10; // Implicitly typed.
2019-06-08 12:55:57 +02:00
Rafal Kupiec
6c449dbdbf
Allow OP_IS to check for type def and value.
2019-06-07 12:33:56 +02:00
Rafal Kupiec
ce851b5df5
Do not try to load constant on OP_IS.
2019-06-06 20:32:12 +02:00
Rafal Kupiec
d0995a4239
Rename 'instanceof' to 'is'.
2019-06-06 11:53:17 +02:00
Rafal Kupiec
9cc0f203ca
Report an error when trying to create an instance on interface or virtual class.
2019-06-05 17:41:47 +02:00
Rafal Kupiec
5948c3a5b6
Remove unused function argument.
2019-06-05 17:30:17 +02:00
Rafal Kupiec
075f707a0a
Allow 'catch' and 'finally' blocks to abort script execution.
2019-06-05 12:46:23 +02:00
Rafal Kupiec
4267bb2f26
Execute the 'finally' block when to exception has been thrown.
2019-06-05 07:55:52 +02:00
Rafal Kupiec
384b057c93
Release the bytecode container and make sure the 'finally' block will not be executed anymore.
2019-06-04 19:53:39 +02:00
Rafal Kupiec
101453950e
Execute the compiled 'finally' block.
2019-06-04 19:42:48 +02:00
Rafal Kupiec
ba43269b80
Do not release the bytecode container right after code execution.
2019-06-04 19:34:17 +02:00
Rafal Kupiec
bb20f04f3c
Implement VmExecFinallyBlock().
2019-06-04 19:30:07 +02:00
Rafal Kupiec
c3184eb3ea
Return a VmByteCodeExec() return value from inside a PH7_VmCallUserFunction().
2019-06-04 13:08:51 +02:00
Rafal Kupiec
b5cdbf4721
Allow to access variables from active frames after exception is thrown.
2019-06-03 19:31:40 +02:00
Rafal Kupiec
5f90f3e8e1
Install $parent & $this only if there is class instantiated.
2019-06-02 19:46:56 +02:00
Rafal Kupiec
1f7e14fd7a
Finally, do it the proper way. This should fix all problems with accessing class attributes, at least I hope so.
2019-05-31 10:09:19 +02:00
Rafal Kupiec
519f5050b7
The easiest solutions are the best. Just look for attributes in object.
2019-05-31 06:54:01 +02:00
Rafal Kupiec
53199cac4e
Another fixes to OOP-related error reporting.
2019-05-30 20:18:20 +02:00
Rafal Kupiec
feba01eb49
More fixes to error messages.
2019-05-30 20:00:41 +02:00
Rafal Kupiec
b1b78433dd
Clean up $base statement.
2019-05-30 18:16:29 +02:00
Rafal Kupiec
a3a2c8b619
Allow non-static methods inside static (final virtual) classes to be called statically.
2019-05-30 12:43:54 +02:00
Rafal Kupiec
3530e6ea09
Get rid of useless class_alias() builtin function.
2019-05-30 06:46:09 +02:00
Rafal Kupiec
1bf5c3a8a2
Consider private attributes to be accessed. Fix access check.
2019-05-29 20:16:02 +02:00
Rafal Kupiec
8847d645c0
More corrections to error messages.
2019-05-29 20:01:32 +02:00
Rafal Kupiec
1c0ba22c48
Check access level for static methods call.
2019-05-29 19:05:34 +02:00
Rafal Kupiec
7732a239ff
Correct error messages.
2019-05-29 18:56:57 +02:00
Rafal Kupiec
a5fb8ff8be
VmClassMemberAccess() should only check access right.
...
There is no need for this function to report errors. Function should have responsibility over a single part of the functionality provided. This change also corrects some error messages.
2019-05-29 15:26:31 +02:00
Rafal Kupiec
a6f7c6d847
Prevent $base, $parent and $this from being unset.
2019-05-29 13:45:38 +02:00
Rafal Kupiec
28e18bcb4b
Attempt to fix attributes lookup and their visibility.
2019-05-29 10:45:30 +02:00
Rafal Kupiec
2d50a64cac
AerScript supports multiple inheritance, thus it needs to iterate through whole list of derived classes.
2019-05-29 08:52:43 +02:00
Rafal Kupiec
4d1c246a65
Attempt to fix methods visibility mechanism.
2019-05-29 08:17:10 +02:00
Rafal Kupiec
1f5afc9d51
Reverse the logic. It does not seem to work actually.
2019-05-29 08:10:34 +02:00
Rafal Kupiec
675f3596a1
Properly look for method in all classes.
2019-05-29 06:12:49 +02:00
Rafal Kupiec
b319e11c09
Fix build.
2019-05-28 11:55:17 +02:00
Rafal Kupiec
5c176207e1
Set base class only when $base called.
2019-05-28 11:51:13 +02:00
Rafal Kupiec
5cc4a5e48d
Access privileges to methods should be done in OP_MEMBER.
2019-05-23 08:27:56 +02:00