aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler
diff options
context:
space:
mode:
authorMike Mazur2008-07-27 23:53:18 +0000
committerMike Mazur2008-07-27 23:53:18 +0000
commit9e58ce60c0ff21043779c55460de9234d658fe4c (patch)
tree6565d9c3c7fe29ce666022ceaf754d29ea256c4f /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler
parentRe-fix r5681. Sorry for the inconvenience. We will now return you (diff)
downloadopensim-SC_OLD-9e58ce60c0ff21043779c55460de9234d658fe4c.zip
opensim-SC_OLD-9e58ce60c0ff21043779c55460de9234d658fe4c.tar.gz
opensim-SC_OLD-9e58ce60c0ff21043779c55460de9234d658fe4c.tar.bz2
opensim-SC_OLD-9e58ce60c0ff21043779c55460de9234d658fe4c.tar.xz
Use new LSL compiler by default in DotNetEngine and XEngine. Fix issues 1651, 1339.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs39
1 files changed, 19 insertions, 20 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
index d5271a1..06c7387 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
@@ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
72 private string FilePrefix; 72 private string FilePrefix;
73 private string ScriptEnginesPath = "ScriptEngines"; 73 private string ScriptEnginesPath = "ScriptEngines";
74 74
75 private static LSL2CSConverter LSL_Converter = new LSL2CSConverter(); 75 //private static LSL2CSConverter LSL_Converter = new LSL2CSConverter();
76 //private static CSCodeGenerator LSL_Converter = new CSCodeGenerator(); 76 private static CSCodeGenerator LSL_Converter = new CSCodeGenerator();
77 //private static Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> m_positionMap; // mapping between LSL and C# line/column numbers 77 private static Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> m_positionMap; // mapping between LSL and C# line/column numbers
78 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); 78 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider();
79 private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); 79 private static VBCodeProvider VBcodeProvider = new VBCodeProvider();
80 private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider(); 80 private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider();
@@ -277,8 +277,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
277 { 277 {
278 // Its LSL, convert it to C# 278 // Its LSL, convert it to C#
279 compileScript = LSL_Converter.Convert(Script); 279 compileScript = LSL_Converter.Convert(Script);
280 //compileScript = LSL_Converter.Convert(Script); 280 m_positionMap = LSL_Converter.PositionMap;
281 //m_positionMap = LSL_Converter.PositionMap;
282 l = enumCompileType.cs; 281 l = enumCompileType.cs;
283 } 282 }
284 283
@@ -483,24 +482,24 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
483 string errtext = String.Empty; 482 string errtext = String.Empty;
484 foreach (CompilerError CompErr in results.Errors) 483 foreach (CompilerError CompErr in results.Errors)
485 { 484 {
486 //KeyValuePair<int, int> lslPos; 485 KeyValuePair<int, int> lslPos;
487 486
488 //try 487 try
489 //{ 488 {
490 // lslPos = m_positionMap[new KeyValuePair<int, int>(CompErr.Line, CompErr.Column)]; 489 lslPos = m_positionMap[new KeyValuePair<int, int>(CompErr.Line, CompErr.Column)];
491 //} 490 }
492 //catch (KeyNotFoundException) // we don't have this line/column mapped 491 catch (KeyNotFoundException) // we don't have this line/column mapped
493 //{ 492 {
494 // m_scriptEngine.Log.Debug(String.Format("[{0}]: Lookup of C# line {1}, column {2} failed.", m_scriptEngine.ScriptEngineName, CompErr.Line, CompErr.Column)); 493 m_scriptEngine.Log.Debug(String.Format("[{0}]: Lookup of C# line {1}, column {2} failed.", m_scriptEngine.ScriptEngineName, CompErr.Line, CompErr.Column));
495 // lslPos = new KeyValuePair<int, int>(-CompErr.Line, -CompErr.Column); 494 lslPos = new KeyValuePair<int, int>(-CompErr.Line, -CompErr.Column);
496 //} 495 }
497 496
498 // The Second Life viewer's script editor begins 497 // The Second Life viewer's script editor begins
499 // countingn lines and columns at 0, so we subtract 1. 498 // countingn lines and columns at 0, so we subtract 1.
500 //errtext += String.Format("Line {0}, column {1}, Error Number: {2}, '{3}'\r\n", lslPos.Key - 1, lslPos.Value - 1, CompErr.ErrorNumber, CompErr.ErrorText); 499 errtext += String.Format("Line {0}, column {1}, Error Number: {2}, '{3}'\r\n", lslPos.Key - 1, lslPos.Value - 1, CompErr.ErrorNumber, CompErr.ErrorText);
501 errtext += "Line number " + (CompErr.Line - LinesToRemoveOnError) + 500 //errtext += "Line number " + (CompErr.Line - LinesToRemoveOnError) +
502 ", Error Number: " + CompErr.ErrorNumber + 501 // ", Error Number: " + CompErr.ErrorNumber +
503 ", '" + CompErr.ErrorText + "'\r\n"; 502 // ", '" + CompErr.ErrorText + "'\r\n";
504 } 503 }
505 Console.WriteLine("[COMPILER ERROR]:" + errtext); 504 Console.WriteLine("[COMPILER ERROR]:" + errtext);
506 if (!File.Exists(OutFile)) 505 if (!File.Exists(OutFile))