aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs38
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs7
2 files changed, 24 insertions, 21 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index d8c0ba5..959164b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -32,7 +32,7 @@ using System.Globalization;
32using System.Reflection; 32using System.Reflection;
33using System.IO; 33using System.IO;
34using Microsoft.CSharp; 34using Microsoft.CSharp;
35using Microsoft.JScript; 35//using Microsoft.JScript;
36using Microsoft.VisualBasic; 36using Microsoft.VisualBasic;
37using log4net; 37using log4net;
38using OpenSim.Region.Framework.Interfaces; 38using OpenSim.Region.Framework.Interfaces;
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
82 82
83 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); 83 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider();
84 private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); 84 private static VBCodeProvider VBcodeProvider = new VBCodeProvider();
85 private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider(); 85// private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider();
86 private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp 86 private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp
87 private static YP2CSConverter YP_Converter = new YP2CSConverter(); 87 private static YP2CSConverter YP_Converter = new YP2CSConverter();
88 88
@@ -395,9 +395,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
395 case enumCompileType.vb: 395 case enumCompileType.vb:
396 compileScript = CreateVBCompilerScript(compileScript); 396 compileScript = CreateVBCompilerScript(compileScript);
397 break; 397 break;
398 case enumCompileType.js: 398// case enumCompileType.js:
399 compileScript = CreateJSCompilerScript(compileScript); 399// compileScript = CreateJSCompilerScript(compileScript);
400 break; 400// break;
401 case enumCompileType.yp: 401 case enumCompileType.yp:
402 compileScript = CreateYPCompilerScript(compileScript); 402 compileScript = CreateYPCompilerScript(compileScript);
403 break; 403 break;
@@ -420,16 +420,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
420 } 420 }
421 } 421 }
422 422
423 private static string CreateJSCompilerScript(string compileScript) 423// private static string CreateJSCompilerScript(string compileScript)
424 { 424// {
425 compileScript = String.Empty + 425// compileScript = String.Empty +
426 "import OpenSim.Region.ScriptEngine.Shared; import System.Collections.Generic;\r\n" + 426// "import OpenSim.Region.ScriptEngine.Shared; import System.Collections.Generic;\r\n" +
427 "package SecondLife {\r\n" + 427// "package SecondLife {\r\n" +
428 "class Script extends OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + 428// "class Script extends OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" +
429 compileScript + 429// compileScript +
430 "} }\r\n"; 430// "} }\r\n";
431 return compileScript; 431// return compileScript;
432 } 432// }
433 433
434 private static string CreateCSCompilerScript(string compileScript) 434 private static string CreateCSCompilerScript(string compileScript)
435 { 435 {
@@ -580,10 +580,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
580 } 580 }
581 } while (!complete); 581 } while (!complete);
582 break; 582 break;
583 case enumCompileType.js: 583// case enumCompileType.js:
584 results = JScodeProvider.CompileAssemblyFromSource( 584// results = JScodeProvider.CompileAssemblyFromSource(
585 parameters, Script); 585// parameters, Script);
586 break; 586// break;
587 case enumCompileType.yp: 587 case enumCompileType.yp:
588 results = YPcodeProvider.CompileAssemblyFromSource( 588 results = YPcodeProvider.CompileAssemblyFromSource(
589 parameters, Script); 589 parameters, Script);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 6ecafd4..a299dba 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -542,7 +542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
542 m_CurrentResult = null; 542 m_CurrentResult = null;
543 } 543 }
544 544
545 return true; 545 return false;
546 } 546 }
547 547
548 [DebuggerNonUserCode] //Prevents the debugger from farting in this function 548 [DebuggerNonUserCode] //Prevents the debugger from farting in this function
@@ -998,7 +998,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
998 public string GetXMLState() 998 public string GetXMLState()
999 { 999 {
1000 bool run = Running; 1000 bool run = Running;
1001 Stop(100); 1001 bool stopped = Stop(100);
1002 Running = run; 1002 Running = run;
1003 1003
1004 // We should not be doing this, but since we are about to 1004 // We should not be doing this, but since we are about to
@@ -1009,6 +1009,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1009 1009
1010 // Force an update of the in-memory plugin data 1010 // Force an update of the in-memory plugin data
1011 // 1011 //
1012 if (!stopped)
1013 return String.Empty;
1014
1012 PluginData = AsyncCommandManager.GetSerializationData(m_Engine, m_ItemID); 1015 PluginData = AsyncCommandManager.GetSerializationData(m_Engine, m_ItemID);
1013 1016
1014 return ScriptSerializer.Serialize(this); 1017 return ScriptSerializer.Serialize(this);