Splits longish v8js.cc file into pieces. It used to contain the
definitions of all V8Js exception classes, the V8Js class itself as
well as the V8Object/V8Function classes... besides the module setup
code itself.
This change factors out all exception class definitions into a
seperate pair of files (v8js_exceptions.*).
The V8Js class definition itself is moved to v8js_class.* pair,
with the v8 init & call code moved to v8js_v8.* pair
and the watchdog timer to v8js_timer.* pair.
The V8Object/V8Function code was moved to v8js_v8object_class.*
pair, not differentiating between the two like before.
The test is unfortunately unstable as it somehow depends on CPU speed.
v8 seems to precompute the result even so it hasn't reached the for
loop consuming the memory.
This can be proved easily by adding a sleep(1) call at the start of the
prolongTimeLimit function. Then the memory limit is always tripped
even so v8 didn't have to do much until there
If the PHP object implementing ArrayAccess has a method,
that has the same name as one of the Array.prototype methods,
the PHP method shall be called, i.e. overwrite the JS method.
These cause the test to fail on old v8 versions like 3.24.10
since the Array.prototype.push implementation calls count() twice
with that version (causing a second echo-line that makes the
test fail).
This merges the distinct code path for the export of ArrayAccess
capable PHP objects back into the "common" PHP object export code.
Sole difference is that the ArrayAccess-style object has index
property handlers as well as property bridging to Array.prototype.
php_v8js_hash_to_jsobj is called for all wrapping to JS objects, be it
a PHP associative array or a PHP object. I've now splitted both parts
into seperate functions since they don't share any code any longer
anyways.