Commit Graph

5396 Commits

Author SHA1 Message Date
David Anderson
8bb6f0e5c6 Merge pull request #297 from alliedmodders/rm-packing
Remove scpack.
2015-03-07 12:42:00 -08:00
David Anderson
0b990e46ab Remove scpack. 2015-03-07 11:39:11 -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
David Anderson
6f1eefbdbe Strip internal SourcePawn dependencies on SM relative paths. 2015-03-07 11:07:20 -08:00
David Anderson
23ac0b4637 Keep one copy of zlib in the SourcePawn tree. 2015-03-07 11:02:44 -08:00
David Anderson
a008a3f804 Remove msvc project files for SourcePawn. 2015-03-07 10:53:12 -08:00
David Anderson
c81e7e3410 Move batchtool out of sourcepawn. 2015-03-07 10:52:13 -08:00
David Anderson
d459ebee41 Rename jit/ to vm/. 2015-03-07 10:50:35 -08:00
Nicholas Hastings
ea684d5933 Merge pull request #296 from WildCard65/WildCard65-patch-1
Port remainder of regex.inc to transitional syntax (r=psychonic).
2015-03-07 08:09:12 -05:00
WildCard65
a730cfe9b5 Fixed regex.inc 2015-03-07 08:07:11 -05:00
Alexander Corn
c9b6b7b212 Moved note about releasing resources from OnPluginStart to OnPluginEnd 2015-03-06 15:25:39 -05:00
Nicholas Hastings
d72a9150a1 Merge pull request #294 from alliedmodders/explicit-ret-types
Add explicit return types to forwards missing them (r=dvander).
2015-03-06 15:19:37 -05:00
Nicholas Hastings
bfaedba9ed Merge pull request #287 from peace-maker/tempent_range
Add TE_SendToAllInRange (r=psychonic).
2015-03-06 15:19:24 -05:00
David Anderson
0c5cbe536f Revert unintentional change. 2015-03-06 11:00:15 -08:00
David Anderson
175f9afa68 Merge pull request #240 from alliedmodders/stock-values
Allow capturing non-public functions as values.
2015-03-06 10:53:21 -08:00
David Anderson
8216097b2c Allow capturing non-public functions as values. 2015-03-06 10:51:46 -08:00
Nicholas Hastings
adbdcd6b1d Add explicit return types to forwards missing them. 2015-03-06 10:18:09 -08:00
Nicholas Hastings
ac4f594063 Trigger build for hl2sdk-dota changes. 2015-03-06 11:25:37 -05: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
David Anderson
7c775aee2e Merge pull request #288 from klausenbusk/patch-1
Updated KillTimer documentation to reflect "Invalid handles" = runtime error.
2015-03-06 01:52:32 -08:00
Fyren
b1ae2a178f Merge pull request #293 from alliedmodders/spcomp-option-spaces
Reapply ancient patch to allow spaces in spcomp options.
2015-03-06 02:50:50 -07:00
David Anderson
fa2dc5b20a Merge pull request #290 from InstantMuffin/patch-1
Documentation oddities for Call_PushStringEx
2015-03-06 01:43:54 -08:00
Fyren
dd8fa985c1 Reapply ancient patch to allow space in spcomp options. 2015-03-06 09:08:24 +00:00
Fyren
81926ceae2 Merge pull request #292 from alliedmodders/sourcepawn-fix-signed-compare
Signed comparison warning fixes.
2015-03-06 01:48:54 -07:00
Fyren
d3da389f9f Signed comparison warning fixes. 2015-03-06 08:08:41 +00:00
David Anderson
782eee3c58 Merge pull request #291 from VoiDeD/spcomp-error25-improvements
Improve the diagnostic given when a function prototype doesn't match an existing definition
2015-03-05 23:04:19 -08:00
Kyle Sanderson
d0d0ea5051 Merge pull request #269 from KyleSanderson/wnoerrorsign
Add Wno-error=sign-compare for gcc to Compiler. r=dvander
2015-03-05 20:05:06 -08:00
Ryan Stecker
3509f963ee Improve the diagnostic given when a function prototype doesn't match an existing definition. 2015-03-05 18:45:15 -06:00
InstantMuffin
98cbef547a Update functions.inc 2015-03-05 21:03:46 +01:00
David Anderson
90d3841ab2 Fix mac build. 2015-03-05 11:51:08 -08:00
InstantMuffin
3f2ad5ccb0 Documentation oddities for Call_PushStringEx
See changes for details, should be obvious. What also strikes me as odd is that there is only one cpflag atm. Has this always been the case? Will there be more in the future? Or why is this designed to be a flagstring?
2015-03-05 20:47:05 +01: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
Nicholas Hastings
c39565ddb1 Fix spacing. 2015-03-05 10:56:54 -08:00
Nicholas Hastings
70390ff1f7 Purge Purge. 2015-03-05 10:56:36 -08:00
Kristian Klausen
924b7621ac Updated KillTimer documentation.. 2015-03-05 17:15:54 +01:00
David Anderson
715a51d01f Merge pull request #285 from alliedmodders/frames
Implement a new stack and error handling model for the SourcePawn VM.
2015-03-04 23:45:59 -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
Peace-Maker
b53947ccc3 Add TE_SendToAllInRange
Add helper stock to mimic PVS and PAS recipient filters for tempents in
the SDK.
2015-03-03 17:22:01 +01:00
Nicholas Hastings
b43da7b7f0 Fix Mac build. 2015-02-27 04:53:31 -08:00
Nicholas Hastings
fdc3c0791e Merge pull request #266 from alliedmodders/tfconds-reducks
Replace frameloop for player condition checks in TF2 ext with sendproxies (r=All of the KyleS).
2015-02-27 04:43:15 -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
afbcdc8a20 Merge branch 'rm-interpreter' 2015-02-25 22:22:07 -08:00
David Anderson
b5ae5defcf Merge branch 'simpl-fns' 2015-02-25 22:21:43 -08:00
David Anderson
1f351c50d5 Merge branch 'fix-native-updating' 2015-02-25 22:20:41 -08:00
David Anderson
9a37b94f4d Merge pull request #280 from alliedmodders/rm-ctx
Remove sp_context_t.
2015-02-26 15:46:32 -08:00
David Anderson
acf6dcac86 Remove the interpreter. 2015-02-24 23:57:08 -08:00
David Anderson
fcec0ee7c7 Use AutoPtr in more places in the JIT. 2015-02-24 23:50:42 -08:00
David Anderson
b9b0ec865c Simplify the JIT function cache. 2015-02-24 23:43:07 -08:00