sourcemod/public
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
..
amtl Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
asm Eliminate SDK dependence for MM:S enabled extensions. 2014-08-09 14:42:38 -07:00
CDetour Initial CSGO GetWeaponPrice fixes 2015-01-31 12:44:18 -05:00
doxygen Spring Cleaning, Part Ichi (1) 2008-03-30 07:00:22 +00:00
extensions Added ISDKHooks interface with entity listeners (bug 5602, r=psychonic). 2013-08-04 10:03:40 -04:00
jit Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
licenses updated licenses 2008-06-13 07:26:09 +00:00
mms_sample_ext Fixed build error in mms_sample_ext from cset d17aed3d46bf (r=psychonic). 2013-03-16 23:02:36 -04:00
sample_ext Updated Visual Studio sample_ext files 2015-02-18 10:34:38 +01:00
sourcepawn Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
AutoHandleRooter.h Move scared guts of core into logic (bug 5680, r=fyren). 2013-03-29 11:37:29 -07:00
compat_wrappers.h Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
IAdminSystem.h Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
IADTFactory.h Switch ADTFactory/IBasicTrie off KTrie (bug 5884 part 17, r=ds). 2013-08-25 12:21:15 -07:00
IDataPack.h Add WritePackFunction and ReadPackFunction natives 2014-08-04 02:05:25 +02:00
IDBDriver.h Add atomic reference counting and port DBI (bug 5876 part 3, r=ds). 2013-08-23 00:18:13 -07:00
IExtensionSys.h Added note to know what version OnCoreMapEnd was added to. 2014-08-08 10:57:38 -04:00
IForwardSys.h Move ForwardSys from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
IGameConfigs.h Make IGameConfig::GetMemSig return value clearer (bug 6081, r=asherkin). 2014-03-29 14:22:53 -04:00
IGameHelpers.h Add support for nested datatables. (bug 5446, r=asherkin) 2013-08-12 00:54:21 +01:00
IHandleSys.h Move scared guts of core into logic (bug 5680, r=fyren). 2013-03-29 11:37:29 -07:00
ILibrarySys.h Move scared guts of core into logic (bug 5680, r=fyren). 2013-03-29 11:37:29 -07:00
IMemoryUtils.h Add support for Mac OS X to ResolveSymbol() and FindPattern() in IMemUtils (bug 4392, r=dvander). 2010-05-13 04:20:41 -05:00
IMenuManager.h Move menu natives from core to logic 2014-09-05 08:24:40 -07:00
IPlayerHelpers.h Unify Player::GetSteamXId returns, clarify doc, and fix checks 2014-09-09 17:57:54 -07:00
IPluginSys.h Moved handle natives from core to logic (bug 4406 part 9, r=ds). 2010-05-14 21:06:06 -07:00
IRootConsoleMenu.h Moved profiler and adt_trie to logic binary. 2009-05-14 11:24:07 -04:00
IShareSys.h Remove native override API (bug 5852 part 1, r=ds). 2013-08-30 10:10:57 -07:00
ISourceMod.h Added checks to avoid crashing in some natives before map start (bug 5119, r=fyren). 2011-10-11 22:50:21 -04:00
ITextParsers.h Added an SMC stream reader to ITextParser (bug 3530, r=pred). 2009-02-01 20:31:27 -05:00
IThreader.h Rename ke_* headers to am-* 2013-08-22 17:10:59 -07:00
ITimerSystem.h Move timer natives into logic binary (bug 4402, r=ds). 2010-05-13 01:47:12 -07:00
ITranslator.h Add sm_reload_translations command (bug 5750, r=asherkin). 2014-03-30 12:08:11 -04:00
IUserMessages.h Added initial support for protobuf usermessages on CS:GO (bug 5579, r=asherkin). 2013-01-22 21:43:12 -05:00
metamod_wrappers.h Spring Cleaning, Part Ichi (1) 2008-03-30 07:00:22 +00:00
sm_memtable.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
sm_namehashset.h Use Refcounted to manage to NativeEntry (bug 5852 part 4, r=ds). 2013-08-30 10:16:28 -07:00
sm_platform.h Give define value (of 1) to PLATFORM defs to match the same-name defs in some SDKs. 2014-05-28 20:36:52 -04:00
sm_queue.h Move DBManager and DB natives from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
sm_stringhashmap.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
sm_trie_tpl.h Switch UserMessages off KTrie (bug 5884 part 11, r=ds). 2013-08-25 12:16:07 -07:00
smsdk_ext.cpp Eliminate SDK dependence for MM:S enabled extensions. 2014-08-09 14:42:38 -07:00
smsdk_ext.h Eliminate SDK dependence for MM:S enabled extensions. 2014-08-09 14:42:38 -07:00
sourcemod_version.h Update manual builds to use version 1.8.0 2014-12-18 18:18:55 -06:00
vtable_hook_helper.h Change SDKHooks to VTable Hooks (bug 6070, r=psychonic). 2014-03-23 22:11:06 -06:00