aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-01-05Massive tab and trailing space cleanupMelanie Thielker8-929/+929
2016-09-03tests making sure evering thing is coerently wrong..UbitUmarov1-1/+1
2016-09-03<0,0,0,0> is not a rotationUbitUmarov1-1/+1
2016-08-31Xengine: and fix line count againUbitUmarov2-9/+5
2016-08-31Xengine: put back a newline on scripts preamble, and the ugly filename ↵UbitUmarov1-3/+3
prefix, for now
2016-08-31Xengine: coment out tests too dependent on precise characters and lines ↵UbitUmarov1-2/+5
generated on code convertion, viewer error position is what matters
2016-08-31Xengine: also missed a few newlines accountUbitUmarov2-3/+7
2016-08-31Xengine: forgot to do the indent on map tooUbitUmarov1-0/+3
2016-08-31Xengine: fix intermediate csharpe source identation. Not sure why i care, ↵UbitUmarov1-1/+2
compiler sure doesn't and only we bother to create this files on code gen debug
2016-08-31Xengine: try to reduce memory pressure of scripts compile. Still ugly code, ↵UbitUmarov3-352/+330
possible mistakes, but i need to share it before i loose it :) )
2016-02-21Pushed AssemblyVersion up to VersionInfo, so that we don't need to do global ↵Diva Canto1-1/+1
replace anymore.
2015-10-18On to 0.8.3!Diva Canto1-1/+1
Conflicts: OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
2015-10-18On to 0.8.3!Diva Canto1-1/+1
2015-04-29Updated all occurrences of AssemblyVersion("0.8.1.*") to ↵Diva Canto1-1/+1
AssemblyVersion("0.8.2.*")
2015-01-26On a multi-region simulator when AppDomain = true, make sure the DLL from ↵Justin Clark-Casey (justincc)1-1/+7
the appropriate script engines subdir is loaded rather than always that of the first engine to load the DLL. This resolves a DLL load failure on my Linux box when an attachment script was present on another region before the avatar arrived.
2015-01-23When deleting an assembly before re-compile, make sure its attributes allow ↵Justin Clark-Casey (justincc)1-1/+5
deletion. This is to see if this helps with the problem in http://opensimulator.org/mantis/view.php?id=7278 where some DLLs are not allowing this. Since OpenSim created the file it should always be allowed to delete it.
2014-12-03Always close script linemap file after reading and always dispose of other ↵Justin Clark-Casey (justincc)1-25/+24
streams in the script engine even if exceptions are thrown.
2014-10-04Add LSL transaction_result event.Justin Clark-Casey (justincc)2-10406/+11379
This is cinderblocks' transaction_result.diff from http://opensimulator.org/mantis/view.php?id=7329 but I have used lsl.parser.cs and lsl.lexer.cs files generated directly from opensim-libs rather than those supplied in the patch. I also added scriptEvents.transaction_reuslt. The required parser/lexer generation file changes were made in commit d564f28 in the opensim-libs repo. Thanks!
2014-07-21Eliminated some warningsOren Hurvitz1-1/+1
2014-07-11minor: further cleanup of old vb and yield prolog script engine references ↵Justin Clark-Casey (justincc)1-17/+1
that were removed some time ago
2014-07-11If [XEngine] ScriptStopStrategy is changed between abort and co-op, for the ↵Justin Clark-Casey (justincc)2-20/+23
existing session use the previous strategy for that script rather than not starting the script at all. We have to do this since we can't unload existing DLLs if they're all in the same AppDomain. But we can still update the underlying DLL which will be used in the next simulator session.
2014-07-10refactor: use existing Compiler.CreateScriptsDirectory() (renamed to ↵Justin Clark-Casey (justincc)1-26/+4
CheckOrCreateScriptsDirectory()) when checking that scripts directory exists on compile. Code was identical apart from error logging, but if there are failures creating these directories then you'll be seeing lots of errors anyway, and these will be more informative
2014-06-19Improved line map heuristics.Aleric Inglewood1-16/+40
If the C# column can't be found in the positionMap (but the line can), use the map immediately after it while correcting for the offset, unless that results in an LSL position before the previous LSL position in the positionMap. The idea behind this heuristic is that in most, if not all cases C# consumes more characters than LSL (for example LSL_Types.LSLInteger instead of just 'integer'). Thus if the distance between the columns of two markers differ in the C# and LSL file, the distance in the C# file will be larger. Moreover, we can assume that every time this happens we will have a marker at the beginning of the longer 'keyword', because those keywords were generated by us in the first place. For example: C#: LSL_Types.LSLInteger f2(LSL_Types.LSLString s) ^ ^ 1 2 will always have markers at the beginning of the long keywords 'LSL_Types.LSLInteger' and 'LSL_Types.LSLString'. If an error is generated in between (for example at the beginning of the function name 'f2') then the correct position is found by using an offset relative to 2 rather than 1. Note that a case where this isn't working correctly is when the user adds extra spaces. For example: LSL: integer f2( string s) would still use the start of 'string' as reference and then go backwards 3 characters only because the corresponding C# still looks like C#: LSL_Types.LSLInteger f2(LSL_Types.LSLString s) ^ ^ only 3 chars difference and the reported error at 'f2' would be here: LSL: integer f2( string s) ^ This can only be fixed by generating a mapping for 'f2' itself, or generating a mapping whenever the amount of spaces is changed.
2014-06-19Fix looking up line number and colum when there is no exact match.Aleric Inglewood1-18/+11
When a compile error reports a colum/error that is not an exact match in the positionMap dictionary, the last position in the map with a line number and position before the reported error should be returned. The old code had the following problems: 1) It returns l,c - which are line and column of the C# file, not LSL. 2) It doesn't set l to 'line' when the map has an entry with 'line'. 3) It sorts the map without taking columns into account, which may result in a random order of the columns. With my mono implementation the columns were reversed in order. For example, if the map contains the following lines: 99,5,49,10 100,30,50,10 100,40,1,0 101,5,51,10 and a translation of 100,35 was requested, then the old code would compare '100' with the keys in the first column - setting l to that key while it is smaller. Hence, l is set to 99. Then it finds the key 100 and doesn't update l. Because of the reversed sort order, it first compares the column 35 with 40, finding that it is smaller and therefore it stops; returning 99,1 instead of finding the correct 100,30 entry and returning 50,10. This patch causes 50,10 to be returned. The remaining problems after this patch are: 1) The sorting might not be necessary at all. 2) The is code duplication (I fixed both instances, but really there should be no code duplication imho).
2014-06-18refactor: Simplify compilation result tests by factoring out common code.Justin Clark-Casey (justincc)1-71/+45
2014-06-18In compiler regression tests, setup and teardown structures for each test to ↵Justin Clark-Casey (justincc)1-1/+5
avoid any possibility of inter-test inter-ference
2014-06-18Fix issue with LSL jumps screwing up the C# compiler error -> LSL code ↵Justin Clark-Casey (justincc)2-8/+55
position map and leading to invalid error line numbers/columns This is because jump statement generation was mistakenly inserting its own line without updating the csharp positions in CSCodeGenerator. This is Aleric Inglewood's patch in http://opensimulator.org/mantis/view.php?id=7195 but applied to opensim itself rather than the defunct code generation in opensim-libs. Thanks! This patch also adds a regression test for this case from myself.
2014-06-17Change assembly versions to 0.8.1Justin Clark-Casey (justincc)1-1/+1
2014-05-27In compiler tests, remove the ResolveEventHandlers after test exitJustin Clark-Casey (justincc)1-3/+6
2014-05-27Make CompilerTest add same AssemblyResolver as XEngine to see if this solves ↵Justin Clark-Casey (justincc)1-1/+7
the issue with different AppDomain BaseDirectory in local and Jenkins test runs
2014-05-27Temporarily print regression TestCastAndConcatString() script compile errors ↵Justin Clark-Casey (justincc)1-4/+5
out to console to get a handle on what's going wrong. Does not fail for me locally and I failed to notice this test was failing on Jenkins.
2014-05-24Fix issues where reported LSL compiler error line numbers do not match the ↵Justin Clark-Casey (justincc)2-16/+16
script. This is probably due to changes in the layout of the generated script preamble (using statements etc, ) in c8afc852 (Jan 17 2013). Re-enabled existing regression test that exercises at least one case of this.
2014-05-23Get regression test TestUseUndeclaredVariable() functional again, though not ↵Justin Clark-Casey (justincc)1-8/+19
yet enabled. This reveals the position map problems and will make the fix (and subsequent continual checking) easier.
2014-05-23Reactivate regression test TestCastAndConcatString() in CompilerTests.Justin Clark-Casey (justincc)2-10/+18
2014-03-26Also take YP/commented out JS references from script engine CodeTools.Justin Clark-Casey (justincc)2-157/+0
Fixes build break from d3387d591a2bd496c8315f17b2310d6a6f40a7c3
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.