sourcemod/extensions
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
..
bintools Disable RTTI for game-agnostic extensions 2014-09-11 17:28:24 -07:00
clientprefs Fix clientprefs IsAuthIdConnected (again). 2014-11-22 10:00:40 -08:00
cstrike Initial CSGO GetWeaponPrice fixes 2015-01-31 12:44:18 -05:00
curl Disable RTTI for game-agnostic extensions 2014-09-11 17:28:24 -07:00
geoip Disable RTTI for more game-agnostic extensions. 2014-09-11 17:41:25 -07:00
mysql Establish a default timeout for MySQL connectivity. 2015-01-21 05:58:45 -08:00
regex Disable RTTI for more game-agnostic extensions. 2014-09-11 17:41:25 -07:00
sdkhooks Don't allow plugins to block LevelInit (wtf). 2015-01-27 18:01:30 -08:00
sdktools Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
sqlite Disable RTTI for game-agnostic extensions 2014-09-11 17:28:24 -07:00
structs Deduplicate a number of files used by extensions by moving them to the public directory (bug 5341, r=psychonic). 2014-04-23 21:19:28 -05:00
tf2 Convert TFHoliday values to pubvars. 2014-12-09 20:21:24 -05:00
topmenus Fix crash when creating and destroying a TopMenu without map change (bug 6303). 2015-02-04 09:57:04 -08:00
updater Disable RTTI for game-agnostic extensions 2014-09-11 17:28:24 -07:00