sourcemod/public/amtl
David Anderson a1afa23bc4 Implement a new stack and error handling model for the SourcePawn VM.
This has three major changes to SourcePawn. First, the API now supports the concept of "exceptions". The exception state is a global property of an instance of the SourcePawn VM. Exceptions can be caught or suppressed. Many places in SourceMod have been updated to check exceptions instead of errors.

The new API obsoletes major parts of the embedder API - all but one method of invoking functions is obsoleted, and the debug interface has been scrapped. Extensions using the native API will not be affected, however, ThrowNativeError has been deprecated in favor of ReportError.

Second, the SourcePawn concept of a "stack" has been unified at the API level. A stack frame iterator now iterates over all SourcePawn invocations, rather than the topmost plugin. This makes error handling more consistent and removes another dependency on context-per-plugin.

Finally, the implementation of stack frames has been changed dramatically. Rather than maintain a complicated and expensive return pointer stack, we now rely on the implicit one provided by the CPU. The stack frame iterator now walks the JIT stack directly. This removes many unnecessary bookkeeping instructions from the generated code, in particular making the CALL instruction 40% faster.

These changes required some fair surgery to the JIT. Its error paths are now slightly more complicated, as they have to throw an exception rather than return an error code. In addition, any path that can throw an exception is now responsible for creating an "exit frame", which exists to tell the stack frame iterator about transitions from the JIT to the VM.
2015-03-04 23:45:30 -08:00
..
am-allocator-policies.h Update AMTL with a number of changes. 2013-08-23 22:29:44 -07:00
am-atomics.h Fix Windows build errors. 2013-08-23 15:45:07 -07:00
am-fixedarray.h Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
am-float.h Sync with AMTL one last time. 2014-09-03 22:05:10 -07:00
am-hashmap.h Sync am-hashmap. 2014-09-03 21:44:51 -07:00
am-hashset.h Sync AMTL. 2013-08-29 10:11:59 -07:00
am-hashtable.h Refactor Trie natives to use HashMap instead of KTrie; add iteration API (bug 5892, r=ds). 2013-08-29 10:09:02 -07:00
am-inlinelist.h Clean up ConCmdManager (bug 5900, r=fyren). 2013-08-31 11:51:23 -07:00
am-linkedlist.h Sync AMTL. 2013-08-29 11:45:28 -07:00
am-moveable.h Sync AMTL. 2013-08-29 11:45:28 -07:00
am-refcounting-threadsafe.h Eliminate Newborn/NoAddRef (bug 5907, r=ds). 2014-08-22 22:50:25 -07:00
am-refcounting.h Sync a change from AMTL. 2014-09-03 21:31:06 -07:00
am-string.h Sync am-string. 2014-09-03 21:45:44 -07:00
am-thread-posix.h Fix threads leaking if they're not joined. (bug 3460, r=dvander) 2015-01-06 20:29:47 +00:00
am-thread-utils.h Make amtl headers BSD-licensed and clean up outstanding style issues. 2013-08-22 17:11:17 -07:00
am-thread-windows.h Update AMTL with a number of changes. 2013-08-23 22:29:44 -07:00
am-threadlocal.h Final sync of AMTL. 2014-09-03 21:48:48 -07:00
am-utility.h Use GCC builtins for bsr/bsf where available. 2014-11-09 04:15:49 +00:00
am-vector.h Sync am-vector.h with AMTL (fix bug 6090). 2014-04-19 19:21:40 -07:00