aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs40
1 files changed, 0 insertions, 40 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index a1b8d85..b4640ef 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -85,9 +85,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
85 85
86 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); 86 private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider();
87 private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); 87 private static VBCodeProvider VBcodeProvider = new VBCodeProvider();
88// private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider();
89 private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp
90 private static YP2CSConverter YP_Converter = new YP2CSConverter();
91 88
92 // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files 89 // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files
93 private static UInt64 scriptCompileCounter = 0; // And a counter 90 private static UInt64 scriptCompileCounter = 0; // And a counter
@@ -404,12 +401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
404 WriteMapFile(assembly + ".map", linemap); 401 WriteMapFile(assembly + ".map", linemap);
405 } 402 }
406 403
407 if (language == enumCompileType.yp)
408 {
409 // Its YP, convert it to C#
410 compileScript = YP_Converter.Convert(Script);
411 }
412
413 switch (language) 404 switch (language)
414 { 405 {
415 case enumCompileType.cs: 406 case enumCompileType.cs:
@@ -424,13 +415,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
424 compileScript = CreateVBCompilerScript( 415 compileScript = CreateVBCompilerScript(
425 compileScript, m_scriptEngine.ScriptClassName, m_scriptEngine.ScriptBaseClassName); 416 compileScript, m_scriptEngine.ScriptClassName, m_scriptEngine.ScriptBaseClassName);
426 break; 417 break;
427// case enumCompileType.js:
428// compileScript = CreateJSCompilerScript(compileScript, m_scriptEngine.ScriptBaseClassName);
429// break;
430 case enumCompileType.yp:
431 compileScript = CreateYPCompilerScript(
432 compileScript, m_scriptEngine.ScriptClassName,m_scriptEngine.ScriptBaseClassName);
433 break;
434 } 418 }
435 419
436 assembly = CompileFromDotNetText(compileScript, language, asset, assembly); 420 assembly = CompileFromDotNetText(compileScript, language, asset, assembly);
@@ -488,22 +472,6 @@ namespace SecondLife
488 return compileScript; 472 return compileScript;
489 } 473 }
490 474
491 private static string CreateYPCompilerScript(string compileScript, string className, string baseClassName)
492 {
493 compileScript = String.Empty +
494 "using OpenSim.Region.ScriptEngine.Shared.YieldProlog; " +
495 "using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\r\n" +
496 String.Empty + "namespace SecondLife { " +
497 String.Empty + "public class " + className + " : " + baseClassName + " { \r\n" +
498 //@"public Script() { } " +
499 @"static OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP YP=null; " +
500 @"public " + className + "() { YP= new OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP(); } " +
501 compileScript +
502 "} }\r\n";
503
504 return compileScript;
505 }
506
507 private static string CreateVBCompilerScript(string compileScript, string className, string baseClassName) 475 private static string CreateVBCompilerScript(string compileScript, string className, string baseClassName)
508 { 476 {
509 compileScript = String.Empty + 477 compileScript = String.Empty +
@@ -635,14 +603,6 @@ namespace SecondLife
635 } 603 }
636 } while (!complete); 604 } while (!complete);
637 break; 605 break;
638// case enumCompileType.js:
639// results = JScodeProvider.CompileAssemblyFromSource(
640// parameters, Script);
641// break;
642 case enumCompileType.yp:
643 results = YPcodeProvider.CompileAssemblyFromSource(
644 parameters, Script);
645 break;
646 default: 606 default:
647 throw new Exception("Compiler is not able to recongnize " + 607 throw new Exception("Compiler is not able to recongnize " +
648 "language type \"" + lang.ToString() + "\""); 608 "language type \"" + lang.ToString() + "\"");