aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests making sure evering thing is coerently wrong..UbitUmarov2016-09-031-1/+1
|
* <0,0,0,0> is not a rotationUbitUmarov2016-09-031-1/+1
|
* Xengine: and fix line count againUbitUmarov2016-08-312-9/+5
|
* Xengine: put back a newline on scripts preamble, and the ugly filename ↵UbitUmarov2016-08-311-3/+3
| | | | prefix, for now
* Xengine: coment out tests too dependent on precise characters and lines ↵UbitUmarov2016-08-311-2/+5
| | | | generated on code convertion, viewer error position is what matters
* Xengine: also missed a few newlines accountUbitUmarov2016-08-312-3/+7
|
* Xengine: forgot to do the indent on map tooUbitUmarov2016-08-311-0/+3
|
* Xengine: fix intermediate csharpe source identation. Not sure why i care, ↵UbitUmarov2016-08-311-1/+2
| | | | compiler sure doesn't and only we bother to create this files on code gen debug
* Xengine: try to reduce memory pressure of scripts compile. Still ugly code, ↵UbitUmarov2016-08-313-352/+330
| | | | possible mistakes, but i need to share it before i loose it :) )
* Pushed AssemblyVersion up to VersionInfo, so that we don't need to do global ↵Diva Canto2016-02-211-1/+1
| | | | replace anymore.
* On to 0.8.3!Diva Canto2015-10-181-1/+1
| | | | | Conflicts: OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
* Updated all occurrences of AssemblyVersion("0.8.1.*") to ↵Diva Canto2015-04-291-1/+1
| | | | AssemblyVersion("0.8.2.*")
* On a multi-region simulator when AppDomain = true, make sure the DLL from ↵Justin Clark-Casey (justincc)2015-01-261-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.
* When deleting an assembly before re-compile, make sure its attributes allow ↵Justin Clark-Casey (justincc)2015-01-231-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.
* Always close script linemap file after reading and always dispose of other ↵Justin Clark-Casey (justincc)2014-12-031-25/+24
| | | | streams in the script engine even if exceptions are thrown.
* Add LSL transaction_result event.Justin Clark-Casey (justincc)2014-10-042-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!
* Eliminated some warningsOren Hurvitz2014-07-211-1/+1
|
* minor: further cleanup of old vb and yield prolog script engine references ↵Justin Clark-Casey (justincc)2014-07-111-17/+1
| | | | that were removed some time ago
* If [XEngine] ScriptStopStrategy is changed between abort and co-op, for the ↵Justin Clark-Casey (justincc)2014-07-112-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.
* refactor: use existing Compiler.CreateScriptsDirectory() (renamed to ↵Justin Clark-Casey (justincc)2014-07-101-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
* Improved line map heuristics.Aleric Inglewood2014-06-191-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.
* Fix looking up line number and colum when there is no exact match.Aleric Inglewood2014-06-191-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).
* refactor: Simplify compilation result tests by factoring out common code.Justin Clark-Casey (justincc)2014-06-181-71/+45
|
* In compiler regression tests, setup and teardown structures for each test to ↵Justin Clark-Casey (justincc)2014-06-181-1/+5
| | | | avoid any possibility of inter-test inter-ference
* Fix issue with LSL jumps screwing up the C# compiler error -> LSL code ↵Justin Clark-Casey (justincc)2014-06-182-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.
* Change assembly versions to 0.8.1Justin Clark-Casey (justincc)2014-06-171-1/+1
|
* In compiler tests, remove the ResolveEventHandlers after test exitJustin Clark-Casey (justincc)2014-05-271-3/+6
|
* Make CompilerTest add same AssemblyResolver as XEngine to see if this solves ↵Justin Clark-Casey (justincc)2014-05-271-1/+7
| | | | the issue with different AppDomain BaseDirectory in local and Jenkins test runs
* Temporarily print regression TestCastAndConcatString() script compile errors ↵Justin Clark-Casey (justincc)2014-05-271-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.
* Fix issues where reported LSL compiler error line numbers do not match the ↵Justin Clark-Casey (justincc)2014-05-242-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.
* Get regression test TestUseUndeclaredVariable() functional again, though not ↵Justin Clark-Casey (justincc)2014-05-231-8/+19
| | | | | | yet enabled. This reveals the position map problems and will make the fix (and subsequent continual checking) easier.
* Reactivate regression test TestCastAndConcatString() in CompilerTests.Justin Clark-Casey (justincc)2014-05-232-10/+18
|
* Also take YP/commented out JS references from script engine CodeTools.Justin Clark-Casey (justincc)2014-03-262-157/+0
| | | | Fixes build break from d3387d591a2bd496c8315f17b2310d6a6f40a7c3
* Add lsl arg syntax checking for control eventJustin Clark-Casey (justincc)2013-12-212-9386/+9716
|
* refactor: rename internal lsl parser VectorDeclaration -> VecDeclaration for ↵Justin Clark-Casey (justincc)2013-12-211-7907/+7903
| | | | consistency
* Add arg checking for at_target lsl eventJustin Clark-Casey (justincc)2013-12-212-8828/+9158
|
* Add lsl event arg checking for at_rot_targetJustin Clark-Casey (justincc)2013-12-212-8915/+9306
|
* Add lsl event argument checking for attach and on_rezJustin Clark-Casey (justincc)2013-12-212-8593/+8946
|
* Add parameter checking for land_collision, land_collision_start and ↵Justin Clark-Casey (justincc)2013-11-292-7784/+8165
| | | | | | land_collision_end lsl events Wrong number of parmeters now generates syntax error on compile, as seen on LL grid
* Add regression test to check that specifying a non-existent event raise a ↵Justin Clark-Casey (justincc)2013-11-161-0/+9
| | | | | | syntax error This was the case before any of the recent changes
* Add syntax checking for no_sensor() no-arg eventJustin Clark-Casey (justincc)2013-11-162-4970/+4981
|
* refactor common code out of no argument LSL event regression testsJustin Clark-Casey (justincc)2013-11-161-14/+13
|
* If anything other than a single integer is specified for events that only ↵Justin Clark-Casey (justincc)2013-11-162-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
* Make state_exit, moving_end, moving_start, not_at_rot_target, not_at_target ↵Justin Clark-Casey (justincc)2013-11-162-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
* refactor LSL_EventTests.TestStateEntryEvent into single method to test compileJustin Clark-Casey (justincc)2013-11-161-14/+17
|
* refactor: replace verbose checks with String.IsNullOrEmpty where applicable.Justin Clark-Casey (justincc)2013-11-151-1/+1
| | | | Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
* Add initial test for checking that specifying a parameter in LSL ↵Justin Clark-Casey (justincc)2013-11-091-0/+64
| | | | | | state_entry() generates a syntax error. Same for other events to follow at a later date.
* If the LSL state_entry() event definition contains any parameters, then ↵Justin Clark-Casey (justincc)2013-11-024-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.
* Bump OPenSimulator version and assembly versions up to 0.8.0 DevJustin Clark-Casey (justincc)2013-10-041-1/+1
|
* Fix problem with modInvoke defined integer constants being build intoRobert Adams2013-08-021-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.