Commit Graph
362 Commits
Author SHA1 Message Date
David Anderson 246c32a202 Update SourcePawn and AMTL. 2015-08-13 22:08:47 -07:00
David Anderson 152807b977 Update AMTL and SourcePawn submodules to master. 2015-07-25 17:25:59 -07:00
Ross Bemrose b705de0143 Add missing CopyFiles function. 2015-07-25 13:16:17 -04:00
Nicholas Hastings 7564c09aff Merge pull request #341 from powerlord/ambuild-sampleext
Add AMBuild2 script to Sample Extension.
2015-06-27 20:10:00 -04:00
David Anderson cb6024e334 Update AMTL and SourcePawn. 2015-05-27 10:22:40 -04:00
Ross Bemrose 43f4a2f7b7 Fix checking the wrong directory for smsdk_ext.cpp. Updated some comments. 2015-05-14 14:16:19 -04:00
Ross Bemrose 0022b750b5 Split AMBuildScript into AMBulde and AMBuildScript 2015-05-14 13:48:59 -04:00
Ross Bemrose d49714bb10 Add AMBuildScript, configure.py, and PackageScript 2015-05-14 12:36:59 -04:00
Asher Baker 1b47b68cc7 Correct NameHashSet::add() return type. 2015-05-09 11:57:49 +01:00
Asher Baker f7c6fc9d1f Restore check_thunks error message. 2015-05-07 21:53:38 +01:00
David Anderson eaea3c927d Update upstream AMTL as a submodule. 2015-03-08 00:24:03 -08:00
David Anderson 1d313e3120 Move macro assembler out of public/assembler into sourcepawn/vm/x86. 2015-03-07 11:16:37 -08:00
David Anderson 561004c4bf Move SourcePawn headers out of public/ into sourcepawn/include. 2015-03-07 11:13:32 -08:00
Nicholas Hastings 2d53547e03 Merge pull request #289 from alliedmodders/more-ninvoke-killing
Remove references to INativeInvoker.h from extension boilerplate.
2015-03-06 07:37:46 -05:00
Nicholas Hastings 6f8ffd55a7 Merge pull request #263 from alliedmodders/admins-trans
Update admins.inc with methodmaps, newdecls (r=dvander, asherkin).
2015-03-05 14:32:15 -05:00
Nicholas Hastings 96703c247c Remove references to INativeInvoker.h from extension boilerplate. 2015-03-05 10:59:19 -08: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 04827466b0 Rewrite the .smx parser.
This removes one the last remnants of the SourceMod 1.0 VM implementation.

The new parser introduces a number of design changes in the VM. First, the VM now takes greater responsibility for validating and sanity checking the structure of the SMX container format. Previously, malformed SMX files could easily crash SourcePawn. The loader now rejects files that have out-of-bounds offsets or incomplete sections. Complex sections, like debug info or the code stream, are verified lazily.

Internally, the sp_plugin_t structure has been removed. It has been replaced by a new LegacyImage class, designed to be independent from the SPVM API. This potentially lets us load code streams from non-.smx containers. More importantly, it removes a lot of bookkeeping and pre-computed state from PluginRuntime. The LegacyImage class is now responsible for handling debug info as well.

PluginRuntime is now intended to hold only cached or immutable data, and PluginContext holds all VM state. As such PluginContext is now responsible for allocating a plugin's runtime memory, not PluginRuntime.

Finally, some aspects of the loading process have been cleaned up. The
decompression and image handoff logic should now be easier to
understand.
2015-02-25 22:28:10 -08:00
David Anderson fcaa5361c8 Don't expose mutable sp_native_t. 2015-02-24 23:10:18 -08:00
David Anderson 21f5400d9c Remove ICompilationData. 2015-02-24 02:03:57 -08:00
David Anderson 499f7b3929 Refactor the public API entrypoint for SourcePawn. 2015-02-24 01:52:13 -08:00
Developer 94c439e533 Updated Visual Studio sample_ext files 2015-02-18 10:34:38 +01:00
Nicholas Hastings 67e74581cc Make result ptr in IForward::Execute default to NULL (which is allowed). 2015-02-17 06:43:07 -08:00
Ruben Gonzalez 213e7ced8c Initial CSGO GetWeaponPrice fixes 2015-01-31 12:44:18 -05:00
Kyle Sanderson 37d9867c06 Merge pull request #129 from KyleSanderson/SDKDep
Enable SDK independence with MM:S enabled extensions.
2015-01-20 17:22:04 -08:00
Asher Baker c28426a09f Fix threads leaking if they're not joined. (bug 3460, r=dvander) 2015-01-06 20:29:47 +00:00
Ryan Stecker 679b2863fa Update manual builds to use version 1.8.0 2014-12-18 18:18:55 -06:00
Asher Baker 686cf9c5ba Use GCC builtins for bsr/bsf where available. 2014-11-09 04:15:49 +00:00
Nicholas Hastings 96fbb7ecda Unify Player::GetSteamXId returns, clarify doc, and fix checks 2014-09-09 17:57:54 -07:00
Nicholas Hastings 775a35c5ab Update OnClientAuthorized function doc 2014-09-09 17:56:29 -07:00
Nicholas Hastings a597277a64 Merge pull request #153 from alliedmodders/auth-fixups
More auth fixups for Steam auth (bug 6243, r=asherkin).
2014-09-09 16:24:57 -04:00
Nicholas Hastings ad7d920ce0 Move menu natives from core to logic 2014-09-05 08:24:40 -07:00
Nicholas Hastings 1bf4eb80bd Cache Steam ID and rendered forms when caching networkID 2014-09-04 16:14:34 -07:00
Nicholas Hastings f1dc24c089 Move Steam2/3 id rendering logic to CPlayer 2014-09-04 15:27:44 -07:00
David Anderson a00adaf9fb Sync with AMTL one last time. 2014-09-03 22:05:10 -07:00
David Anderson 8686957dee Final sync of AMTL. 2014-09-03 21:48:48 -07:00
David Anderson e6e90fb8b8 Sync am-string. 2014-09-03 21:45:44 -07:00
David Anderson 6068d341c8 Sync am-hashmap. 2014-09-03 21:44:51 -07:00
David Anderson 105cd27d19 Sync am-utility.h from upstream. 2014-09-03 21:40:03 -07:00
David Anderson e608057304 Sync a change from AMTL. 2014-09-03 21:31:06 -07:00
Nicholas Hastings 7f3656215b Consistency Fixes (ID->Id, AuthString->AuthId) 2014-09-03 15:13:30 -07:00
Nicholas Hastings 8c89b72fbc Expose explicit client auth string formats 2014-09-02 14:40:39 -07:00
David Anderson 9267d0c803 Eliminate Newborn/NoAddRef (bug 5907, r=ds). 2014-08-22 22:50:25 -07:00
David Anderson 225954a27c Modernize the smx headers. 2014-08-21 22:16:07 -07:00
Kyle Sanderson 766b6e1770 Merge pull request #127 from alliedmodders/coremapend
Add OnCoreMapEnd to extension's interface.
2014-08-15 20:48:59 -07:00
David Anderson 4b8e26463a Merge pull request #122 from peace-maker/datapack_funcpointer
Add WritePackFunction and ReadPackFunction natives
2014-08-12 10:33:27 -07:00
Kyle Sanderson 901890e36d Eliminate SDK dependence for MM:S enabled extensions. 2014-08-09 14:42:38 -07:00
Ryan Stecker 0bde28cc17 Add a command to dump profiling output. 2014-08-09 13:32:05 -05:00
Ruben Gonzalez 2ba0b794ea Added note to know what version OnCoreMapEnd was added to. 2014-08-08 10:57:38 -04:00
Ruben Gonzalez 7a88386568 Add OnCoreMapEnd to extension's interface. 2014-08-08 01:01:47 -04:00