aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-12-21Add lsl arg syntax checking for control eventJustin Clark-Casey (justincc)2-9386/+9716
2013-12-21refactor: rename internal lsl parser VectorDeclaration -> VecDeclaration for ↵Justin Clark-Casey (justincc)1-7907/+7903
consistency
2013-12-21Add arg checking for at_target lsl eventJustin Clark-Casey (justincc)2-8828/+9158
2013-12-21Add lsl event arg checking for at_rot_targetJustin Clark-Casey (justincc)2-8915/+9306
2013-12-21Add lsl event argument checking for attach and on_rezJustin Clark-Casey (justincc)2-8593/+8946
2013-11-29Add parameter checking for land_collision, land_collision_start and ↵Justin Clark-Casey (justincc)2-7784/+8165
land_collision_end lsl events Wrong number of parmeters now generates syntax error on compile, as seen on LL grid
2013-11-16Add regression test to check that specifying a non-existent event raise a ↵Justin Clark-Casey (justincc)1-0/+9
syntax error This was the case before any of the recent changes
2013-11-16Add syntax checking for no_sensor() no-arg eventJustin Clark-Casey (justincc)2-4970/+4981
2013-11-16refactor common code out of no argument LSL event regression testsJustin Clark-Casey (justincc)1-14/+13
2013-11-16If anything other than a single integer is specified for events that only ↵Justin Clark-Casey (justincc)2-8245/+8691
take a single integer, generate a syntax error on LSL script compile rather than an exception later on. This applies to events changed, collision, collision_start, collision_end, on_rez, run_time_permissions, sensor, touch, touch_start, touch_end
2013-11-16Make state_exit, moving_end, moving_start, not_at_rot_target, not_at_target ↵Justin Clark-Casey (justincc)2-7447/+7520
and timer LSL events generate a syntax error if inappropriately given arguments. This matches behaviour seen on the LL grid and a previous change for state_entry. These are all the events which should take no arguments
2013-11-16refactor LSL_EventTests.TestStateEntryEvent into single method to test compileJustin Clark-Casey (justincc)1-14/+17
2013-11-15refactor: replace verbose checks with String.IsNullOrEmpty where applicable.Justin Clark-Casey (justincc)1-1/+1
Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
2013-11-09Add initial test for checking that specifying a parameter in LSL ↵Justin Clark-Casey (justincc)1-0/+64
state_entry() generates a syntax error. Same for other events to follow at a later date.
2013-11-02If the LSL state_entry() event definition contains any parameters, then ↵Justin Clark-Casey (justincc)4-7471/+7692
generate syntax error as seen on the LL grid This is done through the parser and so generates the same syntax error message if any parameters are wrongly specified for this event. We were already enforcing event names in the parser. This is only for state_entry so far as an initial test of the approach - appears to work correctly.
2013-10-04Bump OPenSimulator version and assembly versions up to 0.8.0 DevJustin Clark-Casey (justincc)1-1/+1
2013-08-02Fix problem with modInvoke defined integer constants being build intoRobert Adams1-1/+1
scripts as boxed integers rather than proper reference to a new LSLInteger. This fixes an exception when using a registered integer constant in a script.
2013-03-13Make C# scripts return correct error line and column numbers instead of ↵Justin Clark-Casey (justincc)1-3/+8
failing because they have no linemap. Adapted fix from http://opensimulator.org/mantis/view.php?id=6571 Thanks Nickel Briand
2013-02-19Deleted all AssemblyFileVersion directivesDiva Canto1-1/+1
2013-02-05Bump version and assembly version numbers from 0.7.5 to 0.7.6Justin Clark-Casey (justincc)1-1/+1
This is mostly Bluewall's work but I am also bumping the general version number OpenSimulator 0.7.5 remains in the release candidate stage. I'm doing this because master is significantly adding things that will not be in 0.7.5 This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names and so the exact version match requirement is not in force.
2013-02-01Revert "Update assembly version numbers"BlueWall1-1/+1
This reverts commit 141ad829f448b9138b12be7cf99c834c1f3977ec.
2013-02-01Update assembly version numbersBlueWall1-1/+1
2013-01-30Fix issue where lsl -> c# generation in co-operative termination mode did ↵Justin Clark-Casey (justincc)1-9/+21
not correctly handle single statement versions of for, while and do-while loops. Add regression tests to validate the fix. This problem will not affect the default abort termination mode.
2013-01-24Remove unnecessary System.Linq reference from Compiler.csJustin Clark-Casey (justincc)1-1/+0
Hopefully will fix windows build via compile.bat
2013-01-23If ScriptStopStrategy hasn't been set to co-op in [XEngine] config, then ↵Justin Clark-Casey (justincc)1-12/+18
continue to generate C# that is functionality identical to historical generation This is to eliminate disruption until co-op termination has been well-tested. In non co-op mode, XEngine will continue to load DLLs of the existing Script class and the new XEngineScript class. Moving to co-op mode still requires existing script DLL deletion to force recompilation, either manually or by setting DeleteScriptsOnStartup = true for one run. This change also means that scripts which fail to initialize do not still show up as running scripts.
2013-01-22Fix bug in generating termination checks in compound statement for loop.Justin Clark-Casey (justincc)1-1/+1
Add regression test for this case.
2013-01-17Implement non-wait co-operative termination of scripts for XEngine in ↵Justin Clark-Casey (justincc)2-65/+134
addition to termination on wait. This involves inserting opensim_reserved_CheckForCoopTermination() calls in lsl -> c# translation at any place where the script could be in a loop with no wait calls. These places are for, while, do-while, label, user function call and manual event function call. Call goes through to an XEngineScriptBase which extends ScriptBase. IEngine is extended to supply necessary engine-specific parent class references and constructor parameters to Compiler. Unfortunately, since XEngineScriptBase has to be passed WaitHandle in its constructor, older compiled scripts will fail to load with an error on the OpenSim console. Such scripts will need to be recompiled, either by removing all *.dll files from the bin/ScriptEngines/<region-id> or by setting DeleteScriptsOnStartup = true in [XEngine] for one run. Automatic recompilation may be implemented in a later commit. This feature should not yet be used, default remains termination with Thread.Abort() which will work as normal once scripts are recompiled.
2012-11-24Consistenly make NUnit test cases inherit from OpenSimTestCase which ↵Justin Clark-Casey (justincc)2-2/+2
automatically turns off any logging enabled between tests
2012-11-15Revert "Merge master into teravuswork", it should have been avination, not ↵teravus1-2/+0
master. This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
2012-11-14Added AssemblyInfos to every dll in the OpenSim.Region namespace.Diva Canto1-0/+33
2012-08-18Add a reference to OpenMetaverseType.dll to compiled script assemblies.Melanie1-0/+2
2012-07-31Adds support to ScriptModuleComms for region modules to exportMic Bowman1-2/+37
constants to the script engine.
2012-07-11Where possible, use the system Encoding.ASCII and Encoding.UTF8 rather than ↵Justin Clark-Casey (justincc)1-5/+3
constructing fresh copies. The encodings are thread-safe and already used in such a manner in other places. This isn't done where Byte Order Mark output is suppressed, since Encoding.UTF8 is constructed to output the BOM.
2012-06-11Revert "Bind ~ and ! operators in LSL tighter in order to resolve issues in ↵Justin Clark-Casey (justincc)1-3956/+3978
LSL where these aren't evaluated propertly." This reverts commit a8a9d13dc07bc9e23ebf439cbea5ece6ae002315. Accidentally committed, this patch might not be the correct approach.
2012-06-09Bind ~ and ! operators in LSL tighter in order to resolve issues in LSL ↵Justin Clark-Casey (justincc)1-3978/+3956
where these aren't evaluated propertly. Addresses http://opensimulator.org/mantis/view.php?id=3268
2012-03-15Protect the scriptmodulecomms interface.Mic Bowman1-1/+4
2012-03-15Adds a new script command 'modInvoke' to invoke registered functionsMic Bowman2-3/+30
from region modules. The LSL translator is extended to generate the modInvoke format of commands for directly inlined function calls. A region module can register a function Test() with the name "Test". LSL code can call that function as "Test()". The compiler will translate that invocation into modInvoke("Test", ...)
2012-03-06Fix TestSyntaxError() and TestSyntaxErrorDeclaringVariableInForLoop()Justin Clark-Casey (justincc)1-8/+14
They were all failing assertions but the exceptions these threw were caught as expected Exceptions. I don't think we can easily distinguish these from the Exceptions that we're expecting. So for now we'll do some messy manually checking with boolean setting instead. This patch also corrects the assertions themselves.
2012-03-06Get all test methods in OpenSim.Region.ScriptEngine.Tests.dll to report that ↵Justin Clark-Casey (justincc)2-1/+101
they're running
2012-03-06Fix off by one error in script error reporting.Justin Clark-Casey (justincc)1-1/+1
2012-02-07Add a regression test to compile and start a script. Remove ↵Justin Clark-Casey (justincc)2-3/+13
Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText(). The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory. Later path concatenation is already done by Path.Combine() which handles any trailing slash. Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
2011-06-24Optionally, don't delete previously compiled scripts on startupOren Hurvitz1-5/+14
2010-09-26Merge MasterMelanie1-2/+3
2010-09-26Add configurable path to script engine assembliesBlueWall1-2/+3
Adding ability to place script engine assemblies outside the codebase directories. Uses new [XEngine] option: ScriptEnginesPath = "path_to_assemblies" Signed-off-by: Melanie <melanie@t-data.com>
2010-06-01Comment and remove JScript support. Mono 2.7Dev and 2.8 no longer include theMelanie1-19/+19
needed libraries
2010-06-01Comment and remove JScript support. Mono 2.7Dev and 2.8 no longer include theMelanie1-19/+19
needed libraries
2010-04-28Compiler.cs contained method GetCompilerOutput which, apparently,unknown1-4/+7
was not used, but exactly the same path was calculated inline. This patch does some minor refactoring by replacing inline path calculation with GetCompilerOutput. This doesn't actually affect anything, just minor prettifying of the code
2009-12-22FINALLY! Script compile errors now appear in the script error pane,Melanie3-4/+4
not in a funky debug window.
2009-11-20Fix http://opensimulator.org/mantis/view.php?id=3874 - parenthesis in for ↵Justin Clark-Casey (justincc)1-1/+19
statements cause script compile failures This fixes a problem in OpenSim where statements of the form for ((i = 0); (i < 10); (++i)) { ... } do not compile even though they are valid lsl.
2009-10-29* Misc. formatting cleanup for the previous patchJohn Hurliman1-25/+26
* Added the new AppDomainLoading variable to the [XEngine] section in the example config