aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Massive tab and trailing space cleanupMelanie Thielker2017-01-051-13/+13
|
* Xengine: and fix line count againUbitUmarov2016-08-311-8/+4
|
* Xengine: also missed a few newlines accountUbitUmarov2016-08-311-0/+4
|
* 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-311-315/+231
| | | | possible mistakes, but i need to share it before i loose it :) )
* Fix issue with LSL jumps screwing up the C# compiler error -> LSL code ↵Justin Clark-Casey (justincc)2014-06-181-3/+3
| | | | | | | | 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.
* Fix issues where reported LSL compiler error line numbers do not match the ↵Justin Clark-Casey (justincc)2014-05-241-1/+1
| | | | | | | 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.
* 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.
* Fix issue where lsl -> c# generation in co-operative termination mode did ↵Justin Clark-Casey (justincc)2013-01-301-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.
* Fix bug in generating termination checks in compound statement for loop.Justin Clark-Casey (justincc)2013-01-221-1/+1
| | | | Add regression test for this case.
* Implement non-wait co-operative termination of scripts for XEngine in ↵Justin Clark-Casey (justincc)2013-01-171-45/+88
| | | | | | | | | | | | | 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.
* Adds support to ScriptModuleComms for region modules to exportMic Bowman2012-07-311-2/+37
| | | | constants to the script engine.
* Protect the scriptmodulecomms interface.Mic Bowman2012-03-151-1/+4
|
* Adds a new script command 'modInvoke' to invoke registered functionsMic Bowman2012-03-151-2/+26
| | | | | | | | | 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", ...)
* Fix off by one error in script error reporting.Justin Clark-Casey (justincc)2012-03-061-1/+1
|
* Add a regression test to compile and start a script. Remove ↵Justin Clark-Casey (justincc)2012-02-071-0/+6
| | | | | | | | 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.
* FINALLY! Script compile errors now appear in the script error pane,Melanie2009-12-221-1/+1
| | | | not in a funky debug window.
* Fix http://opensimulator.org/mantis/view.php?id=3874 - parenthesis in for ↵Justin Clark-Casey (justincc)2009-11-201-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.
* Formatting cleanup.Jeff Ames2009-06-101-6/+6
|
* Skip lone ident statments or for-loop assignmentsMike Mazur2009-06-071-3/+14
| | | | | | | | | | | | | | | | | SL's LSL supports lone idents: integer x; x; as well as lone idents in for-loop assignments: for (x; x < 10; x++) { ... } while those are errors in C# (MONO at least). This patch skips lone idents in such places. Fixes Mantis #3042.
* Allow empty assignment in for-loopMike Mazur2009-06-071-1/+7
| | | | | | | | | | | | For loops with no assignment are no longer syntax errors. For example, this is now valid: for ( ; i < 10; i++) { ... } Corresponding changes to lsl.{lexer,parser} in r99 in opensim-libs. Fixes Mantis #2501. Fixes Mantis #2884.
* Minor: Change OpenSim to OpenSimulator in older copyright headers and ↵Jeff Ames2009-06-011-1/+1
| | | | LICENSE.txt.
* Fixes Mantis #3187. Thank you kindly, DoranZemlja for a patch that:Charles Krinke2009-02-251-0/+1
| | | | | Deals with the multiple warning side affect introduced earlier.
* Mantis#3187. Thank you kindly, DoranZemlja for a patch that:Charles Krinke2009-02-231-0/+77
| | | | | | | Adds a warning for an LSL construct that exploits a popular list memory saving hack.
* Thanks DoranZemlja for a patch implementing non-shortcircuiting inMike Mazur2009-02-201-4/+19
| | | | | logical and and logical or in LSL. Fixes Mantis #3174.
* Thanks Tommi Laukkanen for a patch that allows theMike Mazur2009-02-091-3/+7
| | | | | | CSCodeGeneratorTest.TestStringsWithEscapedQuotesAndComments unit test to pass on Windows. Fixes Mantis #3104.
* Mantis #2571Melanie Thielker2008-11-061-2/+2
| | | | | | Thank you, idb, for a patch that fixes the jump function in LSL.
* Prefix LSL variables which are C# keywords with @ instead of _ when ↵Mike Mazur2008-11-041-1/+1
| | | | translating from LSL to C#. Thanks idb for the patch. Fix issue 2546.
* Mantis #2518Melanie Thielker2008-11-011-9/+30
| | | | | | | Thank you, idb, for a patch that fixes the conflicts of lsl identifiers with c# keywords
* Restore "friendly errors" to the XEngineMelanie Thielker2008-10-071-2/+11
|
* Add friendly error messages to both engines.Melanie Thielker2008-09-271-1/+18
|
* Update svn properties, formatting cleanup.Jeff Ames2008-09-231-2/+2
|
* Refactor XEngine parser as per suggestions from mikemMelanie Thielker2008-09-231-8/+9
|
* First batch of the unit test changes for the new constants semanticsMelanie Thielker2008-09-021-1/+1
| | | | | | in XEngine. This turned out to be a lot of work to catch up.
* Remove the ((bool)()) cast, since it can make c# barfMelanie Thielker2008-09-021-2/+2
|
* Add an explicit cast to bool for the if expression so that any base typesMelanie Thielker2008-09-021-2/+2
| | | | | | that slip in will not cause it to break
* This is an attempt to fix the handling of constants in LSL.Melanie Thielker2008-09-011-4/+7
| | | | | | | | | | It wraps constants in new LSLType(x), so that lists with constant values are processed correctly. Contains changes to the lsl.parser.cs that are not (yet) reflected in opensim-libs, since this experimental patch affects XEngine only. Also contains nuts.
* Fix issue 1860; exception thrown in the parser on if/if-else/for/while/do-whileMike Mazur2008-07-311-5/+9
| | | | | | statements with no body.
* First version of position mapping between LSL <-> C# implemented.Mike Mazur2008-07-231-111/+246
|
* Patch #9142 (No mantis)Melanie Thielker2008-07-121-7/+7
| | | | | | | | | Add a config option to OpenSim.ini to select between script compilers in the XEngine without recompile. Set UseNewCompiler=true in OpenSim.ini and try it out. Creates the ICodeConverter interface and adapts the new compiler to it.
* Patch from Mike: errors from the LSL/C# compilers are now reported to the ↵Johan Berntsson2008-07-101-1/+1
| | | | user in-world
* another patch from Mike: the llscript compiler is now available in XEngine ↵Johan Berntsson2008-07-081-0/+803
as well. Thanks Mike