0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-14 20:48:54 +02:00
Commit graph

1217 commits

Author SHA1 Message Date
Jason Volk
4c6e182241 ircd::js: Add script bytecode and compile-test utils. 2016-11-25 19:23:48 -08:00
Jason Volk
6c54215336 ircd::js: Add handler for runtime Preserve Wrapper callback. 2016-11-25 19:23:48 -08:00
Jason Volk
36a7ffba37 ircd::js: Add an overload for hash(string) -> ircd::util::hash(). 2016-11-25 19:23:48 -08:00
Jason Volk
3ec62bba09 ircd::js: Attempt at an ObjectExpression with an initializer list. 2016-11-25 19:23:48 -08:00
Jason Volk
3e8aaf0c13 ircd::js: #define DEBUG internally for JS when RB_DEBUG is also set. 2016-11-25 19:23:48 -08:00
Jason Volk
f2a395b879 ircd::js: Improve for_each(). 2016-11-25 19:23:48 -08:00
Jason Volk
4edfd51106 ircd::js: Various fixes for conversions and root-ordering through calls. 2016-11-25 19:23:48 -08:00
Jason Volk
044259f841 ircd::locale: Add an std::ostream convenience for std::u16string in our ns. 2016-11-25 19:23:48 -08:00
Jason Volk
0e47468e63 ircd::js: Add JSON support. 2016-11-25 19:23:47 -08:00
Jason Volk
3e4a9e58f7 ircd::js: Improve trap function interface. 2016-11-25 19:23:47 -08:00
Jason Volk
88fd6971ec ircd::js: Improve private data slot interface related. 2016-11-25 19:23:47 -08:00
Jason Volk
6aae248357 ircd::js: Fix various debug log messages. 2016-11-25 19:23:47 -08:00
Jason Volk
254f5b921a ircd::js: Fixes to async state related. 2016-11-25 19:23:47 -08:00
Jason Volk
411bed10b1 ircd::js: Fix trap object production / object construction. 2016-11-25 19:23:47 -08:00
Jason Volk
61017f4cdc ircd::js: Add tracing support for GC.
ircd::js: Add template constexprs for jsapi handle types.
2016-11-25 19:23:47 -08:00
Jason Volk
20e62f04df ircd::js: Minor context interface cleanup; prevent task struct address change. 2016-11-25 19:23:47 -08:00
Jason Volk
8554fc858b ircd::log: Add function to logger with facility argument. 2016-11-25 19:23:47 -08:00
Jason Volk
e3f3543d65 ircd::ctx: Zero the interruption flag before the throw to user handler. 2016-11-25 19:23:47 -08:00
Jason Volk
90f81bb871 ircd::js: Return undefined for args::operator[]; bounds check on args::at(). 2016-11-25 19:23:46 -08:00
Jason Volk
a44e6f701f ircd::js: Fix pending exception propagation on interleaving stack. 2016-11-25 19:23:46 -08:00
Jason Volk
c558df48bc ircd: Add convenience templates for shared_from()/weak_from(). 2016-11-25 19:23:46 -08:00
Jason Volk
ae4057b1d5 ircd::js: Use std::string for trap mapping. 2016-11-25 19:23:33 -08:00
Jason Volk
a3c06466fb ircd::js: Add an inefficient std::u16string conversion for string. 2016-11-13 16:34:27 -08:00
Jason Volk
559bc530c8 ircd::js: Improve off-thread compilation error handling. 2016-11-13 16:34:27 -08:00
Jason Volk
c8402577c3 ircd::js: GC related fixes. 2016-11-13 16:34:27 -08:00
Jason Volk
c3e6c52192 ircd::js: Improve private slot access. 2016-11-13 16:34:27 -08:00
Jason Volk
7a99d919d6 ircd::js: Improve reserved data access. 2016-11-13 16:34:27 -08:00
Jason Volk
25a2dd906c ircd::util: Strengthen the strong typedef. 2016-11-13 16:34:27 -08:00
Jason Volk
84383d41d8 ircd::js: Fix unconditional cast of this to object type in trap::on_call handlers. 2016-11-13 16:34:24 -08:00
Jason Volk
fcc654699d ircd::locale: Add char16_t conversion overloads for unterminated strings.
ircd::js: Use sized conversions when calling ircd::locale.
2016-11-13 16:34:06 -08:00
Jason Volk
e6ba493bd3 ircd::js: Improve script compilation exceptions. 2016-11-13 16:34:06 -08:00
Jason Volk
290fa43c43 ircd::util: Add bernstein hash overloads for 16bit chars. 2016-11-13 16:34:06 -08:00
Jason Volk
e3e0d81828 ircd::js: Add string internal-data observer via closure. 2016-11-13 16:34:06 -08:00
Jason Volk
12e11445c3 ircd::js: Add overload to construct prototyped trap object. 2016-11-13 16:34:06 -08:00
Jason Volk
b8f5366f52 ircd::js: Improve trap callback arguments; add this value. 2016-11-13 16:34:00 -08:00
Jason Volk
292b3fc8e8 ircd::js: Get/Set object prototype. 2016-11-13 16:33:25 -08:00
Jason Volk
67d9f11fbc ircd::js: Add constructible-id overload for get()/set()/has()/del(). 2016-11-13 16:33:25 -08:00
Jason Volk
da78598d86 ircd::mapi: Rectify linkage of the header symbol name string. 2016-11-13 16:33:25 -08:00
Jason Volk
0d2d21b49f ircd::js: Add asynchronous/concurrent compilation. 2016-11-13 16:33:24 -08:00
Jason Volk
ee5f48672f ircd::js: Various type and conversion tweaks. 2016-11-13 16:33:24 -08:00
Jason Volk
6cc89f2613 ircd::js: Add uninitialized constructor for cheap object handle creation. 2016-11-13 16:33:24 -08:00
Jason Volk
edd77d2265 ircd::js: Add asynchronous state and completion target mechanism. 2016-11-13 16:33:22 -08:00
Jason Volk
bfb5948191 ircd::js: Allow value copy. 2016-11-13 16:32:42 -08:00
Jason Volk
333b0dca5a ircd::js: Use a script object in the task (more flexible than function). 2016-11-13 16:32:42 -08:00
Jason Volk
f54c4215b4 ircd::ctx: Add queue: amalgam of a standard queue container with a dock. 2016-11-13 16:32:42 -08:00
Jason Volk
b0bc025ced ircd::ctx: Add notify() to dock to rotate the waiters in contrast to notify_one(). 2016-11-13 16:32:42 -08:00
Jason Volk
6f7dde8fdf ircd::js: Quadword value construction. 2016-11-13 16:32:41 -08:00
Jason Volk
0e541cd3a9 ircd::js: get()/set()/has()/del() for array object indexes. 2016-11-13 16:32:41 -08:00
Jason Volk
d5fd794511 ircd::js: Add JSProp flags as arguments for constructing trap. 2016-11-13 16:32:41 -08:00
Jason Volk
f2b59a57dc ircd::js: Variadic arguments for object construction via trap. 2016-11-13 16:32:41 -08:00
Jason Volk
0fbbed7daf ircd::js: Vector construction from Object of array type. 2016-11-13 16:32:41 -08:00
Jason Volk
d2b3bedca6 ircd::js: Task identification (PID) and reference counted management. 2016-11-13 16:32:41 -08:00
Jason Volk
cca79d87fc ircd::js: Assertions for pending exceptions. 2016-11-13 16:32:41 -08:00
Jason Volk
e214d6e40c ircd::js: Remove boolean return type from trap hook for enumeration. 2016-11-13 16:32:41 -08:00
Jason Volk
bf540caead ircd::js: Order arguments to call() more intuitively. 2016-11-13 16:32:41 -08:00
Jason Volk
42f0c6b06b ircd::js: Additional object utils; array-object type support. 2016-11-13 16:32:41 -08:00
Jason Volk
8a3f592753 ircd::js: Add property flag reflection. 2016-11-13 16:32:41 -08:00
Jason Volk
3fcd3d2bb0 ircd::js: Trap find() overload with JSString type. 2016-11-13 16:32:40 -08:00
Jason Volk
5ebd15c983 ircd::js: Persistent string for trap map to be sure. 2016-11-13 16:32:40 -08:00
Jason Volk
64057fc101 ircd::js: Script decompilation; check if function is ctor; interning for string. 2016-11-13 16:32:40 -08:00
Jason Volk
12c1755899 ircd::js: Functions to get current zone; debug callbacks for zone; etc. 2016-11-13 16:32:40 -08:00
Jason Volk
c70ddd5a80 ircd::js: Allow setting the ECMA version for a compartment. 2016-11-13 16:32:40 -08:00
Jason Volk
771907127e ircd::js: Add string tokenizer; fix split; minor cleanup. 2016-11-13 16:32:40 -08:00
Jason Volk
845e81e446 ircd::locale: Move char16_t conversions into namespace. 2016-11-13 16:32:40 -08:00
Jason Volk
cff506e0be ircd::js: Add global/task struct. 2016-11-13 16:32:40 -08:00
Jason Volk
d0ec6497c7 ircd::js: Add object private/reserved getters and setters. 2016-11-13 16:32:40 -08:00
Jason Volk
d5abc39e49 ircd::js: Template the string type passed to overloaded JS::CompileFunction() 2016-11-13 16:32:40 -08:00
Jason Volk
2846f80a8d ircd::js: Make trap tree root thread local near rt/cx. 2016-11-13 16:32:40 -08:00
Jason Volk
e2ae907dfa ircd::util: Improve the timer to start/stop with accumulation. 2016-11-13 16:32:39 -08:00
Jason Volk
5e81c26fdf ircd::js: Add and use calls for current_compartment(). 2016-11-13 16:32:39 -08:00
Jason Volk
639dd7903b ircd::js: Move TLS assignment out of runtime/context (though this doesn't matter). 2016-11-13 16:32:39 -08:00
Jason Volk
96d4bb4775 ircd::js: Add convenience functions to struct args. 2016-11-13 16:32:39 -08:00
Jason Volk
ac14c2a4db ircd::js: Add generator state class. 2016-11-13 16:32:39 -08:00
Jason Volk
3bfb3d3319 ircd::js: Argument forwarding for function call operator. 2016-11-13 16:32:39 -08:00
Jason Volk
b9137fd475 ircd::js: Disambiguate vector<value> initializer list constructor. 2016-11-13 16:32:39 -08:00
Jason Volk
7e18e32ce4 ircd::js: Improve/cleanup exception string generaton related. 2016-11-13 16:32:39 -08:00
Jason Volk
72eb8ff8da ircd::js: Add conversions for JS::Heap<> type to handle types. 2016-11-13 16:32:39 -08:00
Jason Volk
164f650a0f ircd::js: Use JS::Heap<> container for exception value. 2016-11-13 16:32:39 -08:00
Jason Volk
6b5bab0871 ircd::js: Convert all JS type wrappers into templates and typedef on requsted GC.
Templates are now in the namespace basic:: i.e `basic::value<>`
Typedefs are in ircd::js:: matching the original non-template types.

Ex. stack-duration type in template form is: `basic::value<lifetime::stack>`
Ex. stack-duration type in typedef form is `value`
Ex. heap-duration type in template form is: `basic::value<lifetime::heap>`
Ex. heap-duration type in typedef form is: `heap_value`
2016-11-13 16:32:39 -08:00
Jason Volk
7e66df914a ircd::js: Add debug dump() calls from JS_DEBUG ifdef'ed api. 2016-11-13 16:32:39 -08:00
Jason Volk
54c8044ca1 ircd::js: Add trap_function alternative to full object trap. 2016-11-13 16:32:38 -08:00
Jason Volk
56d8e429a2 ircd::js: Add pointer_value() to store external host pointers in JS::Value. 2016-11-13 16:32:38 -08:00
Jason Volk
21e96eaedf ircd::js: id creation constructors and comparison. 2016-11-13 16:32:38 -08:00
Jason Volk
5de2622bd1 ircd::js: Add string literal constructor to prevent any alloc/copy/free. 2016-11-13 16:32:38 -08:00
Jason Volk
fcc9cdee74 ircd::js: Function to get JSFunction arity. 2016-11-13 16:32:38 -08:00
Jason Volk
1dcbfb5c33 ircd::js: Add wide character string constructions. 2016-11-13 16:32:38 -08:00
Jason Volk
118fc20bbc ircd::js: Use js strings in trap tree mappings. 2016-11-13 16:32:38 -08:00
Jason Volk
be48466ef3 fixup! [temp] Checkpoint test. 2016-11-13 16:32:38 -08:00
Jason Volk
50e38b5a82 ircd::js: Add rudimentary string utils. 2016-11-13 16:32:38 -08:00
Jason Volk
3df49d4bf4 ircd::js: Add string index operator; empty(); clarify size(); relax ctor. 2016-11-13 16:32:38 -08:00
Jason Volk
04a919820a ircd::js: Improve string comparison suite; add transparent less. 2016-11-13 16:32:38 -08:00
Jason Volk
4c62795aeb ircd::js: Use jsapi external string facilities for string constructions. 2016-11-13 16:32:38 -08:00
Jason Volk
6a1fb4e8fb ircd::local: Add additional char/char16_t buffer conversion. 2016-11-13 16:32:37 -08:00
Jason Volk
97c0d3df7d ircd::js: Support trap dtors on GC. 2016-11-13 16:32:37 -08:00
Jason Volk
ae40f9c016 ircd: Move all signal handling to charybdis executable. 2016-11-13 16:32:37 -08:00
Jason Volk
50ce286a3c fixup! fixup! ircd::util: Add string() convenience to 'to_string' an object stream. 2016-11-13 16:32:37 -08:00
Jason Volk
7f12f1cce5 ircd::js: Disambiguate and improve value/object conversions. 2016-11-13 16:32:37 -08:00
Jason Volk
91d11f391b ircd::js: Add recursive tree semantics to object trap system. 2016-11-13 16:29:47 -08:00
Jason Volk
b44eb91437 ircd: Add stringops rsplit(). 2016-11-13 16:29:47 -08:00
Jason Volk
fedeab2ddd ircd: Add locale:: namespace for portable internationalization. 2016-11-13 16:29:47 -08:00
Jason Volk
8f8f747628 ircd::js: Add additional secondary object constructions. 2016-11-13 16:29:47 -08:00
Jason Volk
fd0f925459 ircd::js: Add handle typedefs in object wrappers to clean up arguments. 2016-11-13 16:29:47 -08:00
Jason Volk
87eee25953 ircd::js: Add JS::CallArgs wrapper. 2016-11-13 16:29:46 -08:00
Jason Volk
6d7e1157b1 ircd::js: Add recursive has(), get(), set(), del(). 2016-11-13 16:29:46 -08:00
Jason Volk
9f85b39506 ircd::js: Improve function information + decompile. 2016-11-13 16:29:46 -08:00
Jason Volk
b69444138f ircd::js: Reflect JSType + value type tests. 2016-11-13 16:29:46 -08:00
Jason Volk
1ae9f4ffa4 ircd::js: Add function_literal convenience. 2016-11-13 16:29:46 -08:00
Jason Volk
c2f23a01bd ircd::js: Support more debug and statistics from js engine. 2016-11-13 16:29:46 -08:00
Jason Volk
8f9465764d ircd::js: Construct compartment from more implicit information. 2016-11-13 16:29:46 -08:00
Jason Volk
c704c67aa5 ircd: Add more stringops tokenizer overloads. 2016-11-13 16:29:46 -08:00
Jason Volk
9ecb26d27e ircd::js: Simplify the interrupt(context) call. 2016-11-13 16:29:46 -08:00
Jason Volk
b6ba71b6a0 ircd::js: Add ctor/call functionality to object trap. 2016-11-13 16:29:46 -08:00
Jason Volk
f8600a562a ircd::js: Improve various type conversions and constructions. 2016-11-13 16:29:46 -08:00
Jason Volk
83fbbc6462 ircd::js: Fix compartment acquire; trap JSClass delete; debug related. 2016-11-13 16:29:46 -08:00
Jason Volk
9a0753d7f8 ircd::js: Relax value construction from host types. 2016-11-13 16:29:45 -08:00
Jason Volk
5069df70c0 ircd::js: Add string comparison, equality operator and empty on null. 2016-11-13 16:29:45 -08:00
Jason Volk
aae1264d7f ircd::js: Add some GC related stats/controls. 2016-11-13 16:29:45 -08:00
Jason Volk
2d89f0e97c ircd::js: Improve exception sequence / Add script and line data. 2016-11-13 16:29:45 -08:00
Jason Volk
f9848b0494 ircd::js: Add wait-free (for the user) timer. 2016-11-13 16:29:45 -08:00
Jason Volk
ad1fef4247 ircd::js: Add wait-free execution interruption. 2016-11-13 16:29:45 -08:00
Jason Volk
2f645941a8 ircd::ctx: Move ctx headers into directory. 2016-11-13 16:29:45 -08:00
Jason Volk
e6c8025ae0 ircd::ctx: Add yield() allowing other contexts to run before returning. 2016-11-13 16:29:45 -08:00
Jason Volk
b289c63b99 ircd::js: Improve the exception translation. 2016-11-13 16:29:45 -08:00
Jason Volk
a8ee379ac2 ircd::js: Add vector semantic wrapper. 2016-11-13 16:29:45 -08:00
Jason Volk
4872883860 ircd::js: Improve value construction / string related. 2016-11-13 16:29:45 -08:00
Jason Volk
23318a2b4f ircd::js: Add script object + caller / deinline function caller. 2016-11-13 16:29:44 -08:00
Jason Volk
8108773021 ircd::js: Wrap JSAPI objects for better semantics. 2016-11-13 16:29:44 -08:00
Jason Volk
4f34311f5f ircd::js: Fix inline linkage on context wrapper functions. 2016-11-13 16:29:44 -08:00
Jason Volk
79c054c535 ircd::js: Add basic priv()/get() object manip functions. 2016-11-13 16:29:44 -08:00
Jason Volk
7fa3777a57 ircd::js: Improve trap exceptions; noexcept all jsapi callbacks. 2016-11-13 16:29:44 -08:00
Jason Volk
4171a9c834 ircd::js: Add js exception hierarchy. 2016-11-13 16:29:44 -08:00
Jason Volk
2c231ac187 ircd: Add exception message generation bypass constructor. 2016-11-13 16:29:44 -08:00
Jason Volk
dffb39f8cc ircd::js: Add string utf conversions; improve string related. 2016-11-13 16:29:44 -08:00
Jason Volk
7b5629e4a5 ircd::js: Add basic trap debug / rename trap.res -> trap.has. 2016-11-13 16:29:44 -08:00
Jason Volk
34881325bb ircd::js: Develop object compartment related. 2016-11-13 16:29:43 -08:00
Jason Volk
0e2b8600e5 ircd::js: Moz people recommend thread_local JSRuntime/JSContext;
There is no reason to clutter most arguments with contexts. Additionally
these will be merged in the future SpiderMonkey. There is only one
JSRuntime/JSContext per thread and it must be locked when in use.
2016-11-13 16:29:43 -08:00
Jason Volk
6db6b2a975 ircd::js: Add trap to define JSObject functionality in C. 2016-11-13 16:29:43 -08:00
Jason Volk
e6c6137fcb ircd::js: Add id/value/string conversion convenience utils. 2016-11-13 16:29:43 -08:00
Jason Volk
c7ea23bece ircd::js: Add debug / reflection for JSErrorReport; deinline other debug. 2016-11-13 16:29:43 -08:00
Jason Volk
517097b534 ircd::js: Add basic object utils: string, foreach, type debug. 2016-10-25 01:55:50 -07:00
Jason Volk
01e6e732cc ircd::js: Stub runtime/context callback framework. 2016-10-25 01:55:50 -07:00
Jason Volk
c1fd6391c6 ircd::js: Add barebones accoutrements. 2016-10-25 01:55:50 -07:00
Jason Volk
191258cea5 ircd::js: Add main runtime and main context. 2016-10-25 01:55:50 -07:00
Jason Volk
95068c7d06 Introduce Mozilla SpiderMonkey. 2016-10-25 01:55:50 -07:00
Jason Volk
afc23fa235 ircd::util: Add noexcept specifier to custom_ptr deleter prototype. 2016-10-13 21:55:53 -07:00
Jason Volk
fde4626fce ircd::cmds: Minor cleanup of cmds:: related. 2016-10-11 03:30:11 -07:00
Jason Volk
43b07d1180 ircd: Add more token related stringops. 2016-10-11 03:30:11 -07:00
Jason Volk
02146880f8 fixup! ircd::util: Add string() convenience to 'to_string' an object stream. 2016-10-10 22:38:24 -07:00
Jason Volk
5ad9f96b2a ircd::util: Add string() convenience overloads for sized char buffer. 2016-09-28 14:19:18 -07:00
Jason Volk
d4bcf904c3 ircd: Add single char overloads for startswith()/endswith() stringops. 2016-09-28 14:16:14 -07:00