Commit Graph

28 Commits

Author SHA1 Message Date
David Anderson
13a783d441 Remove UTIL_Format() and UTIL_FormatArgs(). 2015-09-09 15:18:17 -07:00
David Anderson
4e275eea97 Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
David Anderson
28346c99f2 Move RootConsoleMenu into core/logic. 2015-08-30 21:01:46 -07:00
David Anderson
2c886943a0 Move RootConsoleMenu into its own header and .cpp file. 2015-08-30 21:01:10 -07:00
David Anderson
9d805ea9fb Replace the AddRootConsoleCommand API to not expose internal structures. 2015-08-30 21:01:03 -07:00
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
David Anderson
9267d0c803 Eliminate Newborn/NoAddRef (bug 5907, r=ds). 2014-08-22 22:50:25 -07:00
Nicholas Hastings
35784c018d Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
Kyle Sanderson
af7b8cd9a3 Wrap ClientPrintf into IGamePlayer (bug 6021, r=asherkin). 2014-01-29 21:41:41 -07:00
David Anderson
67ce8aff61 Remove memtables from ConCmdManager (bug 5899 part 3, r=fyren). 2013-08-31 19:50:15 -07:00
David Anderson
ba927964c8 Clean up ConCmdManager (bug 5900, r=fyren). 2013-08-31 11:51:23 -07:00
David Anderson
bc51c3e5b1 Switch ConCmdManager off KTrie (bug 5884 part 14, r=ds). 2013-08-25 12:18:25 -07:00
Nicholas Hastings
c230cf5aab Updated for latest hl2sdk-dota changes. 2013-07-12 02:31:41 -04:00
Nicholas Hastings
614967ccc1 Updated for latest hl2sdk-dota changes. 2013-05-13 15:18:12 -04:00
Nicholas Hastings
369e141ea8 Build fixes for recent hl2sdk-dota updates. 2013-04-23 07:11:49 -04:00
David Anderson
045ee262a8 Move scared guts of core into logic (bug 5680, r=fyren).
--HG--
rename : core/ExtensionSys.cpp => core/logic/ExtensionSys.cpp
rename : core/ExtensionSys.h => core/logic/ExtensionSys.h
rename : core/HandleSys.cpp => core/logic/HandleSys.cpp
rename : core/HandleSys.h => core/logic/HandleSys.h
rename : core/NativeInvoker.cpp => core/logic/NativeInvoker.cpp
rename : core/NativeInvoker.h => core/logic/NativeInvoker.h
rename : core/NativeOwner.cpp => core/logic/NativeOwner.cpp
rename : core/NativeOwner.h => core/logic/NativeOwner.h
rename : core/PluginSys.cpp => core/logic/PluginSys.cpp
rename : core/PluginSys.h => core/logic/PluginSys.h
rename : core/ShareSys.cpp => core/logic/ShareSys.cpp
rename : core/ShareSys.h => core/logic/ShareSys.h
rename : core/smn_fakenatives.cpp => core/logic/smn_fakenatives.cpp
rename : core/logic/AutoHandleRooter.h => public/AutoHandleRooter.h
2013-03-29 11:37:29 -07:00
Kyle Sanderson
ef6c454137 Replace usages of deprecated Sourcehook Add/Remove macros (bug 5631, r=dvander). 2013-03-16 22:15:25 -04:00
Asher Baker
247fabaaf0 Added the ability to override RegConsoleCommand-created commands (bug 5199, r=psychonic). 2012-11-15 17:53:11 +00:00
Nicholas Hastings
f136f2dcaf Added CheckAccess native to check cmd/override access of AdminId (bug 5083, r=fyren). 2011-09-10 12:08:38 -04:00
David Anderson
859678536f Fixed crash on plugin unload when two cmds exist with same name, different casing (bug 4698, r=Fyren). 2011-06-20 13:30:14 -04:00
David Anderson
9137e92c09 Move translator from logic to core (bug 4406 part 6, r=ds).
--HG--
rename : core/PhraseCollection.cpp => core/logic/PhraseCollection.cpp
rename : core/PhraseCollection.h => core/logic/PhraseCollection.h
rename : core/Translator.cpp => core/logic/Translator.cpp
rename : core/Translator.h => core/logic/Translator.h
rename : core/sm_memtable.h => core/logic/sm_memtable.h
rename : core/smn_lang.cpp => core/logic/smn_lang.cpp
2010-05-14 19:43:53 -07:00
David Anderson
6048144310 RegConsoleCmd is now case insensitive for client-only commands (bug 3602, r=ds). 2009-02-01 02:13:17 -05:00
Scott Ehlert
ff7a2c6b73 Added preliminary support for Left 4 Dead; some things may not yet work. 2008-11-14 09:18:30 -06:00
David Anderson
4951dccded Fixed amb1927 - client command case sensitivity did not match the server's logic.
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402483
2008-09-02 03:58:34 +00:00
David Anderson
0fac3fd74e fixed a bug in the new translation code usage
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402150
2008-05-17 05:10:36 +00:00
David Anderson
c7418e70ba added amb1666 - rehaul over the ml api so extensions can easily use translations
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402132
2008-05-10 09:23:55 +00:00
David Anderson
2fbd32cd1a fixed amb1591 - mods like IOS:S which, in listen server mode add bots before the player, caused crashes in SM
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402050
2008-04-12 02:18:03 +00:00
Scott Ehlert
251cced1f8 Spring Cleaning, Part Ichi (1)
Various minor things done to project files
Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way)
Updated regex project file and makefile

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
2008-03-30 07:00:22 +00:00