Rafal Kupiec
9290db2504
Another changes in file inclusion mechanism ( #58 ):
* Remove builtin functions: 'include' & 'require'
* Implement 'include' and 'require' statements compiler
* Implement OP_INCLUDE operator
* Allow 'require' statement to be used in global scope as well as in method body and 'include' only in method body
1 year ago
Rafal Kupiec
a24e44fbf3
Completely remove this broken threading implementation. Fixes #55 .
1 year ago
Rafal Kupiec
f3972a9ca2
Rename LFB/LFE operators.
1 year ago
Rafal Kupiec
426ec932ec
Implement MemObjIsHashmap().
1 year ago
Rafal Kupiec
3b9d91f186
Revert 3dcc908788
.
1 year ago
Rafal Kupiec
616b2eeae3
Cleanup the headers a bit.
1 year ago
Rafal Kupiec
48d5088265
Enable the magic number protection.
1 year ago
Rafal Kupiec
3dcc908788
Enable threading.
1 year ago
Rafal Kupiec
dcf37af75e
Implement a NULL-coalescing '??' operator.
1 year ago
Rafal Kupiec
6d964d6113
Add missing declaration for PH7_MemObjIsNull() function.
1 year ago
Rafal Kupiec
ca51e2a5da
Add comments.
1 year ago
Rafal Kupiec
bd24aa0605
Correct more compiler warnings.
1 year ago
Rafal Kupiec
0be38392bd
Correct variable types, to make compiler silent.
1 year ago
Rafal Kupiec
bffd44a7b4
Get rid of some annoying compiler warnings.
1 year ago
Rafal Kupiec
b3eb2d0139
Include missing header.
1 year ago
Rafal Kupiec
050a637e88
Add missing declarations.
1 year ago
Rafal Kupiec
1a91fedb1f
Proper SXUNUSED() macro implementation.
1 year ago
Rafal Kupiec
0bef248298
Implement PH7_VmDestroyMemObj() to forcibly destroy a memory object.
1 year ago
Rafal Kupiec
5c824ec67d
Do not set any recursion depth limit.
1 year ago
Rafal Kupiec
cbe4f29909
Define 'auto' keyword.
1 year ago
Rafal Kupiec
d0995a4239
Rename 'instanceof' to 'is'.
1 year ago
Rafal Kupiec
5948c3a5b6
Remove unused function argument.
1 year ago
Rafal Kupiec
9fe4aa653f
We will store 'finally' block bytecode here.
1 year ago
Rafal Kupiec
d57d6caf2d
Add 'finally' frame definition.
1 year ago
Rafal Kupiec
d0840d7eea
Cleanup after switching from 'parent' constant to '$parent' variable.
1 year ago
Rafal Kupiec
625a386b69
Get rid of 'self' statement.
1 year ago
Rafal Kupiec
b1b78433dd
Clean up $base statement.
1 year ago
Rafal Kupiec
e654e42b07
Store class directly in function container.
1 year ago
Rafal Kupiec
ddd46a4e80
Quick small cleanup.
1 year ago
Rafal Kupiec
3cca5faa76
Store variable type in dedicated field.
1 year ago
Rafal Kupiec
0f4a666b89
Variable type should be separated from control flags.
1 year ago
Rafal Kupiec
1acbd21caf
Store a pointer to class container in each method.
1 year ago
Rafal Kupiec
e8c675bd8e
Store a pointer to class container to reduce memory usage.
1 year ago
Rafal Kupiec
7203492763
Store a class name in each attribute.
1 year ago
Rafal Kupiec
8aed5af238
Correct indentation.
1 year ago
Rafal Kupiec
f2116a6461
Always use HTTPS when possible.
1 year ago
Rafal Kupiec
07bd3ceec3
Reimplement 'parent' construct as variable $parent.
This commit also adds new controls to variables, which prevents from re-assigning a value when set. Thanks to that, both $this and $parent cannot be overwritten by using OP_STORE instruction. Other instructions still need some
work.
1 year ago
Rafal Kupiec
0c8ca53f70
Continuous numeration.
1 year ago
Rafal Kupiec
c4b63a3018
Rename OP_LOAD instruction to OP_LOADV.
1 year ago
Rafal Kupiec
23900f2aed
Remove unused compiler function - PH7_CompileLangConstruct().
In AerScript, there are no such language constructs, that have syntax similiar to functions. If so, it is just a builtin function.
1 year ago
Rafal Kupiec
b36510943d
Implement 'define' statement for defining constants globally.
1 year ago
Rafal Kupiec
ab8bf48485
Make constant declarations local.
There are several changes in this commit:
* first of all constants declared by 'const' statement should be local (declared in current scope / frame),
* constants are declared by using OP_DECLARE instruction,
* OP_LOADC browses both global and local constants container,
* PH7_VmRegisterConstant() allows both global and local declarations.
Since this commit, there are 3 kinds of constants:
1) global
2) local (in loop, closure, method)
3) class members.
Actually there is no way to declare a global constant except the built-in constants.
1 year ago
Rafal Kupiec
90b2da7c56
Unify constant length.
1 year ago
Rafal Kupiec
03fc167be1
Proper implementation of so hated 'goto' statement.
1 year ago
Rafal Kupiec
798fd7d3b2
Remove unused and useless VM instruction.
1 year ago
Rafal Kupiec
70676cb0d5
Correct comment.
1 year ago
Rafal Kupiec
5c1e0f0cce
Simplify the foreach() loop implementation.
1 year ago
Rafal Kupiec
4d8d92092e
Refactor foreach() loop.
In AerScript, the foreach() loop is syntatically more similiar to C#, than PHP. However the optional '$key => $value' construct is still available, because arrays in AerScript are still a hashmaps.
1 year ago
Rafal Kupiec
c443a38fec
Do not count compilation errors.
Interpreter will abort script execution on first error found.
1 year ago
Rafal Kupiec
291b6f0607
Get rid of backstick quoted strings (shell commands).
1 year ago