sourcemod/core/logic
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
..
msvc9 vcproj crap (NPOTB) 2010-10-20 05:13:48 -07:00
msvc10 Move scared guts of core into logic (bug 5680, r=fyren). 2013-03-29 11:37:29 -07:00
thread Fix windows build. 2013-08-22 17:55:49 -07:00
AdminCache.cpp Fix FindFlagChar not finding char for AdminFlag_Custom6. 2015-02-03 10:32:34 -05:00
AdminCache.h Fix crash on Windows when dumping admin cache to file. 2014-10-08 17:31:02 -07:00
ADTFactory.cpp Move ADTFactory from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
ADTFactory.h Move ADTFactory from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
AMBuilder Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
CellArray.h Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
common_logic.cpp Fix crash on Windows when dumping admin cache to file. 2014-10-08 17:31:02 -07:00
common_logic.h Move menu natives from core to logic 2014-09-05 08:24:40 -07:00
Database.cpp Re-add DBI query throttling (r=dvander). 2014-09-18 22:02:32 -04:00
Database.h Move DBManager and DB natives from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
DebugReporter.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
DebugReporter.h Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
ExtensionSys.cpp Merge pull request #133 from alliedmodders/logger-logic 2014-08-20 06:43:31 -04:00
ExtensionSys.h Add OnCoreMapEnd to extension's interface. 2014-08-08 01:01:47 -04:00
ForwardSys.cpp Remove unmanaged forwards from lookup list on Release (bug 6025, r=psychonic). 2014-02-08 14:51:44 -07:00
ForwardSys.h Move ForwardSys from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
GameConfigs.cpp Eliminate Newborn/NoAddRef (bug 5907, r=ds). 2014-08-22 22:50:25 -07:00
GameConfigs.h Use Linux game data for offsets and signatures/symbols on OS X if Mac-specific data is not available (bug 6056, r=dvander). 2014-02-15 23:23:53 -06:00
handle_helpers.h Simplify filesystem native implementation. 2014-11-08 15:44:35 -08:00
HandleSys.cpp Move Logger and Core natives to Logic 2014-08-13 14:24:35 -07:00
HandleSys.h Increased handles to 32k 2014-12-07 21:50:40 -08:00
intercom.h Fix crash on Windows when dumping admin cache to file. 2014-10-08 17:31:02 -07:00
Logger.cpp Fix link errors. 2014-08-17 11:11:55 -04:00
Logger.h Fix link errors. 2014-08-17 11:11:55 -04:00
Makefile Added missing files to each core and logic makefiles (NPOTB). 2012-07-15 12:31:06 -04:00
MemoryUtils.cpp Fixed potential for reading out of library bounds in MemoryUtils;:FindPattern (r=asherkin). 2013-01-23 14:05:35 -05:00
MemoryUtils.h Fixed crash in MemoryUtils::ResolveSymbol() on OS X Lion (10.7) (bug 4951, r=dvander). 2011-06-15 16:02:05 -05:00
MersenneTwister.h Added better random number generator (bug 3831, r=fyren). 2009-10-26 23:59:59 -07:00
Native.h Use Refcounted to manage to NativeEntry (bug 5852 part 4, r=ds). 2013-08-30 10:16:28 -07:00
NativeOwner.cpp Don't expose mutable sp_native_t. 2015-02-24 23:10:18 -08:00
NativeOwner.h Use Refcounted to manage to NativeEntry (bug 5852 part 4, r=ds). 2013-08-30 10:16:28 -07:00
PhraseCollection.cpp Move translator from logic to core (bug 4406 part 6, r=ds). 2010-05-14 19:43:53 -07:00
PhraseCollection.h Move translator from logic to core (bug 4406 part 6, r=ds). 2010-05-14 19:43:53 -07:00
PluginSys.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
PluginSys.h Call OnLibraryAdded for all available libraries (bug 5925, PR #4) 2014-05-27 19:26:58 -07:00
ProfileTools.cpp Add a command to dump profiling output. 2014-08-09 13:32:05 -05:00
ProfileTools.h Improve usability of start/stop. 2014-06-24 20:55:53 -07:00
ShareSys.cpp Don't expose mutable sp_native_t. 2015-02-24 23:10:18 -08:00
ShareSys.h Don't expose mutable sp_native_t. 2015-02-24 23:10:18 -08:00
sm_crc32.cpp Mercurial queues... oh, how terrible. 2010-01-18 03:20:44 -08:00
sm_crc32.h Mercurial queues... oh, how terrible. 2010-01-18 03:20:44 -08:00
sm_simple_prioqueue.h Move DBManager and DB natives from core to logic (bug 5953, r=fyren). 2013-10-09 08:43:08 -04:00
sm_symtable.h Move memutils from core to logic (bug 4406, r=ds). 2010-05-14 16:14:59 -07:00
sm_trie.cpp Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
sm_trie.h Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
smn_admin.cpp Added FindFlagChar native. (bug 3776, r=dvander) 2010-06-27 19:17:25 -04:00
smn_adt_array.cpp Merge pull request #213 from splewis/find-array-nonzero-blocks 2015-02-24 22:37:49 +00:00
smn_adt_stack.cpp Fix signed/unsigned compare warning in smn_adt_stack. 2015-01-27 17:59:55 -08:00
smn_adt_trie.cpp Port string maps to transitional syntax. 2014-11-08 17:43:28 -08:00
smn_banning.cpp Fixed BanClient always banning by IP address (bug 4626, r=fyren). 2010-11-30 13:09:30 -05:00
smn_console.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_core.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_database.cpp Fix wrong value in transitional DBI callback. (bug 6292) 2015-01-16 00:33:29 -08:00
smn_datapacks.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_fakenatives.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_filesystem.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_float.cpp Fix build. 2014-09-03 22:33:05 -07:00
smn_functions.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_gameconfigs.cpp Moved gameconf code from core to logic (bug 4406 part 11, r=ds). 2010-05-14 23:35:42 -07:00
smn_handles.cpp Allow CloseHandle() on nulls. 2014-07-05 13:52:44 -07:00
smn_lang.cpp Moved client language detection to be earlier (on connect) (bug 3714, r=psychonic). 2011-10-15 12:07:55 -04:00
smn_maplists.cpp Move Logger and Core natives to Logic 2014-08-13 14:24:35 -07:00
smn_menus.cpp Redo menu methodmaps. 2014-12-13 12:53:30 -08:00
smn_players.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_profiler.cpp Add a general profiling abstraction layer. 2014-06-24 01:04:13 -07:00
smn_sorting.cpp Implement a new stack and error handling model for the SourcePawn VM. 2015-03-04 23:45:30 -08:00
smn_string.cpp Switch StringToInt(Ex) from strtol to strtoul (bug 5939, r=psychonic). 2013-10-06 15:40:03 -04:00
smn_textparse.cpp Port SMC parsing API to transitional syntax. 2014-11-09 12:33:07 -08:00
smn_timers.cpp Fix crash creating a timer when there are no handles available. (bug 5317, r=asherkin) 2013-08-12 00:57:26 +01:00
stringutil.cpp Fixed build for real. 2013-07-04 11:28:32 -04:00
stringutil.h Fixed ReadMapList not seeing maps in all valveFS paths (bug 5715, r=asherkin). 2013-07-03 23:14:55 -04:00
TextParsers.cpp Port SMC parsing API to transitional syntax. 2014-11-09 12:33:07 -08:00
TextParsers.h Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
ThreadSupport.cpp Import of core modularization plan (bug 3599). 2009-05-13 21:55:50 -04:00
ThreadSupport.h Rename ke_* headers to am-* 2013-08-22 17:10:59 -07:00
Translator.cpp Support long key names for languages. (bug 6282) 2014-11-22 22:18:49 +00:00
Translator.h Support long key names for languages. (bug 6282) 2014-11-22 22:18:49 +00:00
version.rc Overhauled versioning information (bug 5453, r=dvander). 2012-08-26 01:33:54 +01:00