Rafal Kupiec
af2c23d3b2
Add some basic checks. At this point, I can say it detects correctly a class declared inside inclueded file.
4 years ago
Rafal Kupiec
e70a89fcdb
This is useless.
4 years ago
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.
4 years ago
Rafal Kupiec
09451f4042
Two changes come here:
...
* do not allow two or more classes / interfaces with the same name
* fix class_exists() builtin function so that it does not return true if interface is found
4 years ago
Rafal Kupiec
63b0f450d3
Move VM initialization into separate step to enable errors reporting earlier.
4 years ago
Rafal Kupiec
7bf76c3fa0
Make reported errors more PHP-like
4 years ago
Rafal Kupiec
11b4c95c6f
Remove useless duplicated debug functions, they returned some trash information (nothing we don't get via debug_backtrace).
4 years ago
Rafal Kupiec
52d9616503
Revert d937d0c825
4 years ago
Rafal Kupiec
c28e0dbc88
There are problably still a lot of typos, here and there.
4 years ago
Rafal Kupiec
38186c3fda
Correct error messages
4 years ago
Rafal Kupiec
17c486d599
Make reported errors more PHP-like
4 years ago
David Carlier
aa2d762b29
Fixing include files functions
4 years ago
David Carlier
dba8e5098f
fixing in the vm context instead, making the feature available in case realpath could be implemented as well
4 years ago
Rafal Kupiec
7bb9924699
Call to undefined function should also be an error, not warning
4 years ago
Rafal Kupiec
9cae9eb905
Throw an error if it cannot match the overloaded function/method. This fixes #13 .
4 years ago
Rafal Kupiec
63385281bf
Break script execution on exit
4 years ago
Rafal Kupiec
ceca007cd1
Correct some typos
4 years ago
David Carlier
e7b78be8e5
Fix #15 , merge from fix_debug_backtrace branch ( #18 )
4 years ago
David Carlier
357be5ec0d
Attempt to fix #3 ( #14 )
4 years ago
Rafal Kupiec
dc4c51ca5a
Allow to use operating systems's native dynamic library extension
4 years ago
Rafal Kupiec
abb91a9874
Reorganize the repository for new build system
4 years ago
Rafal Kupiec
a00e81f4f8
Move XML support into separate module.
4 years ago
Rafal Kupiec
95e9174058
Move JSON support into separate module.
4 years ago
Rafal Kupiec
0dc9a04f0e
It is a bad idea to compare memory. This fixes some false-positives.
4 years ago
Rafal Kupiec
28dbeeb1ad
I'm not a big Windows fun, so please correct me if this is not working
4 years ago
Rafal Kupiec
d1e56b9206
sizeof() is enough
4 years ago
devnexen
f0b3adc44a
Further change for module load ( #11 )
4 years ago
devnexen
e755fd55b9
Little build fix ( #10 )
4 years ago
Rafal Kupiec
5908307885
Automatically unload all modules and free up memory on VM release.
4 years ago
Rafal Kupiec
ee5504ea3a
Initial support for modules, partially implements #1
4 years ago
David Carlier
62344a99ef
Adding random_int/random_bytes functions but still using PH7 PRNG.
4 years ago
Rafal Kupiec
6d0e346b7d
Correct coding style
4 years ago
Rafal Kupiec
4f4371545b
Implement register_autoload_handler() builtin function, that registers any number of autoloaders, enabling for classes to be automatically loaded if they are not defined.
...
Implement a mechanism, to iterate through registered autoload callbacks until class is found.
4 years ago
Rafal Kupiec
d0357787db
Do not consider a method with the same name as class name to be a constructor, nor do not create such alias. This is some event from old PHP4, we do not want to support. Magic methods <__construct() & __destruct()> are more than
...
enough.
4 years ago
Rafal Kupiec
5d1e75d72c
There will be no PDO. P# will contain DBAL
4 years ago
Rafal Kupiec
0c4f5bcd75
Serialization cannot depend on JSON. It needs to be rewritten in the future
4 years ago
Rafal Kupiec
d898cd1e36
Code formatting
4 years ago
Rafal Kupiec
f212588ab1
Removing unnecessary operators (eq, ne). Some special strings comparison should be implemented as a function like strcmp().
4 years ago
Rafal Kupiec
96fe73a39f
Be able to compile with -Wwrite-strings
4 years ago
Rafal Kupiec
f577943861
Fix VmEvalChunk() to also initialize and install static and constant class attributes
4 years ago
Rafal Kupiec
520e2280e4
No amalgamation
4 years ago
Rafal Kupiec
5b10ea3b41
de-amalgamation of code for easier maintenance
4 years ago