sourcemod/extensions/sdktools
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
..
msvc8 Now compiles against Metamod:Source 1.7 (bug 3445). 2008-11-27 01:13:51 -06:00
msvc9 Added InactivateClient and ReconnectClient natives to SDKTools (bug 4931, r=fyren). 2011-07-06 18:11:02 -04:00
msvc10 Add GetPlayerResourceEntity to SDKTools; deprecate old, broken TF2-specific impl (bug 5491, r=asherkin). 2013-03-16 13:50:36 -04:00
AMBuilder Port build scripts to the new project API. 2014-05-31 19:56:42 -07:00
CellRecipientFilter.h Fixed regression in CellFilter GetRecipientIndex reading oob (bug 5826, r=psychonic). 2013-08-03 19:20:03 -04:00
clientnatives.cpp Fix crash in ReconnectClient and Inactivate client when IServer ptr is null (bug 6122, r=asherkin). 2014-05-15 10:49:32 -04:00
clientnatives.h Added InactivateClient and ReconnectClient natives to SDKTools (bug 4931, r=fyren). 2011-07-06 18:11:02 -04:00
extension.cpp Add support for getting g_pGameRules without a byte signature / symbol. 2014-12-13 16:35:32 -05:00
extension.h Refactor SDKTools to not expose gamerules ptr ptr outside of vglobals.cpp. 2014-12-13 15:48:51 -05:00
gamerulesnatives.cpp Refactor SDKTools to not expose gamerules ptr ptr outside of vglobals.cpp. 2014-12-13 15:48:51 -05:00
gamerulesnatives.h Added ability in SDKTools to get/set prop values on gamerules class (bug 4983, r=fyren). 2011-07-06 17:37:35 -04:00
hooks.cpp Move PlayerRunCmd to a global VTable Hook (bug 6051, r=psychonic). 2014-03-01 14:25:35 -07:00
hooks.h Move PlayerRunCmd to a global VTable Hook (bug 6051, r=psychonic). 2014-03-01 14:25:35 -07:00
inputnatives.cpp Added support for logical (non-networked) entities using entity references - See http://wiki.alliedmods.net/Entity_References_%28SourceMod%29 (bug 2459, r=dvander) 2009-07-24 12:34:31 +12:00
Makefile Project files changes for CS:S as separate build (bug 5370) (NPOTB). 2012-08-20 21:54:42 -04:00
output.cpp Update SDKTools entity output functions to use core's GetEntityClassname instead of own. 2014-06-19 11:27:26 -04:00
output.h Update SDKTools entity output functions to use core's GetEntityClassname instead of own. 2014-06-19 11:27:26 -04:00
outputnatives.cpp Update SDKTools entity output functions to use core's GetEntityClassname instead of own. 2014-06-19 11:27:26 -04:00
smsdk_config.h 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
teamnatives.cpp Throw error instead of crash when calling SetTeamScore between maps (bug 5718, r=psychonic). 2013-07-18 11:38:04 -04:00
teamnatives.h Add GetPlayerResourceEntity to SDKTools; deprecate old, broken TF2-specific impl (bug 5491, r=asherkin). 2013-03-16 13:50:36 -04:00
tempents.cpp Eliminate need for s_pTempEnts gamedata on sdk2013 and soon css/dods/hl2dm (already on tf2). 2014-10-30 19:24:53 -04:00
tempents.h Spring Cleaning, Part Ichi (1) 2008-03-30 07:00:22 +00:00
tenatives.cpp Unify Maximum supported clients, raised SDKTools limit (bug 5964, r=psychonic). 2014-05-06 18:40:35 -07:00
trnatives.cpp Added support for Alien Swarm (bug 4530, r=dvander). 2010-07-27 17:32:32 -05:00
util.h Added svn:keywords property to some files that didn't have them already 2008-04-10 19:28:26 +00:00
vcallbuilder.cpp More build fixes. 2009-08-30 01:34:24 -07:00
vcallbuilder.h Spring Cleaning, Part Ichi (1) 2008-03-30 07:00:22 +00:00
vcaller.cpp Refactor SDKTools to not expose gamerules ptr ptr outside of vglobals.cpp. 2014-12-13 15:48:51 -05:00
vdecoder.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
vdecoder.h Added a new ValveCallType that allows for arbitrary |this| parameters, as well as associated features in gamedata and for reading/writing memory (bug 3520, r=dvander, sr=fyren). 2010-01-11 22:46:44 -08:00
version.rc Overhauled versioning information (bug 5453, r=dvander). 2012-08-26 01:33:54 +01:00
vglobals.cpp Use new IVEngineServer::GetIServer to get IServer* on Insurgency. 2015-02-22 15:16:26 -05:00
vglobals.h Add support for getting g_pGameRules without a byte signature / symbol. 2014-12-13 16:35:32 -05:00
vhelpers.cpp Add offset printing to datamap dumps. 2014-12-30 08:36:35 -05:00
vhelpers.h Add GetPlayerResourceEntity to SDKTools; deprecate old, broken TF2-specific impl (bug 5491, r=asherkin). 2013-03-16 13:50:36 -04:00
vnatives.cpp Eliminate need for FindEntityByClassname gamedata on sdk2013 and soon css/dods/hl2dm (already on tf2). 2014-10-30 19:25:26 -04:00
vnatives.h Spring Cleaning, Part Ichi (1) 2008-03-30 07:00:22 +00:00
voice.cpp Unify Maximum supported clients, raised SDKTools limit (bug 5964, r=psychonic). 2014-05-06 18:40:35 -07:00
vsound.cpp Initializing soundEntry and using something safer than strcpy 2015-02-05 11:12:33 -08:00
vsound.h Add support for Source SDK Base 2013 (bug 5917, r=asherkin). 2013-10-13 14:14:51 -04:00
vstringtable.cpp Fix FindStringIndex native not returning INVALID_STRING_INDEX when string not found (bug 6144). 2014-06-19 11:40:01 -04:00