Rafal Kupiec
3dcc908788
Enable threading.
1 year ago
Rafal Kupiec
4881ddf6de
Pass compatible pointer type.
1 year ago
Rafal Kupiec
312fb97db6
Another FS-related bugfix to make compiler happy.
1 year ago
Rafal Kupiec
ca51e2a5da
Add comments.
1 year ago
Rafal Kupiec
bffd44a7b4
Get rid of some annoying compiler warnings.
1 year ago
Rafal Kupiec
3cca5faa76
Store variable type in dedicated field.
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
c443a38fec
Do not count compilation errors.
Interpreter will abort script execution on first error found.
1 year ago
Rafal Kupiec
8f18ebf884
Update legal info.
1 year ago
Rafal Kupiec
c9203b6c91
New source code legal format.
1 year ago
Rafal Kupiec
d8f9db8f9a
Proper implementation of is_callback() & is_callable(). First one only performs a check if variable type is callback, while the second checks if function exists and if can be called.
1 year ago
Rafal Kupiec
a87471e1e3
The empty() function is useless in Aer.
1 year ago
Rafal Kupiec
ff6c71db1c
Do not use NULL if possible.
1 year ago
Rafal Kupiec
d65a529d21
Initial support for char data type.
2 years ago
Rafal Kupiec
174ecb2a38
Initial support for void type.
2 years ago
Rafal Kupiec
eb79ed500e
Store float values in an union.
Single variable cannot have many values of different types. This also saves some memory, because union allocates memory just for one of its members.
2 years ago
Rafal Kupiec
af1d59dab4
Don't try to get an integer representation of float.
2 years ago
Rafal Kupiec
dc0a55c8c0
Cleanup old error handler.
2 years ago
Rafal Kupiec
349bbed774
Allow to enable or disable debugging.
2 years ago
Rafal Kupiec
6d27069590
Add new file for every chunk.
Every chunk should has its own file associated, even if it is [MEMORY]. Otherwise, some false information can be provided by interpreter to developer.
2 years ago
Rafal Kupiec
877d19a815
API function rename.
2 years ago
Rafal Kupiec
4dbd3ea412
New memory subsystem.
This is a new memory subsystem implementing heap calculations as well as new builtin functions:
* get_memory_usage()
* get_memory_peak_usage()
* get_memory_limit()
It also allows to set an upper memory limit, ensuring that processed script will not be able to allocate more memory from OS.
New subsystem is based on work done in 'memory_limit' branch. Big thanks to devnexen!
This finally fixes #25 .
2 years ago
Rafal Kupiec
b94a23d580
Get rid of PH7 ident
2 years ago
Rafal Kupiec
26b1675021
API function rename
2 years ago
Rafal Kupiec
ece036b214
Rework the entry point
* some functions were not used and have been removed
* some parameters seemed to be useless and have been removed
* code cleanup
2 years ago
Rafal Kupiec
7e3c79d3c5
Functions naming cleanup
2 years ago
Rafal Kupiec
63b0f450d3
Move VM initialization into separate step to enable errors reporting earlier.
2 years ago
Rafal Kupiec
a9637d2c8a
This partially implements #16 - currently only for entry file.
2 years ago
Rafal Kupiec
965f19b9b7
Add scripts directory to the include path. This fixes #17 .
2 years ago
Rafal Kupiec
52d9616503
Revert d937d0c825
2 years ago
David Carlier
dba8e5098f
fixing in the vm context instead, making the feature available in case realpath could be implemented as well
2 years ago
Rafal Kupiec
abb91a9874
Reorganize the repository for new build system
2 years ago
Rafal Kupiec
0552e388e7
Cleanup the code
2 years ago
Rafal Kupiec
d898cd1e36
Code formatting
2 years ago
Rafal Kupiec
538ea8524a
Remove unused constant
2 years ago
Rafal Kupiec
404a2cb402
Fix mutex memory leak in ph7_vm_release()
2 years ago
Rafal Kupiec
520e2280e4
No amalgamation
2 years ago
Rafal Kupiec
5b10ea3b41
de-amalgamation of code for easier maintenance
2 years ago