Browse Source

Upgrade to Boo 0.9.4 for .NET 4.0 (unreleased version 7e610f8)

pull/2/head
Daniel Grunwald 15 years ago
parent
commit
d2a9d5758a
  1. 7
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BindNamespacesWithoutRemovingErrors.cs
  2. 26
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooParser.cs
  3. 14
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/InteractiveInterpreter.cs
  4. 9
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/ConvertVisitor.cs
  5. 10
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/ExpressionTests.cs
  6. 2
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/RemoveRedundantTypeReferencesTest.cs
  7. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.CodeDom.dll
  8. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Compiler.dll
  9. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Extensions.dll
  10. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Interpreter.dll
  11. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Parser.dll
  12. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.PatternMatching.dll
  13. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Useful.dll
  14. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.dll
  15. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Microsoft.Build.Tasks.dll
  16. 1
      src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Microsoft.Build.targets
  17. BIN
      src/AddIns/BackendBindings/Boo/RequiredLibraries/booc.exe
  18. 4
      src/AddIns/BackendBindings/Boo/RequiredLibraries/booc.exe.config

7
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BindNamespacesWithoutRemovingErrors.cs

@ -6,16 +6,17 @@ using Boo.Lang.Compiler.Steps; @@ -6,16 +6,17 @@ using Boo.Lang.Compiler.Steps;
namespace Grunwald.BooBinding.CodeCompletion
{
/*
/// <summary>
/// The Boo 'BindNamespaces' step will remove imports that cannot be resolved.
/// The Boo 'ResolveImports' step will remove imports that cannot be resolved.
/// However, we need to keep those imports available for use inside SharpDevelop.
/// </summary>
public class BindNamespacesWithoutRemovingErrors : BindNamespaces
public class ResolveImportsWithoutRemovingErrors : ResolveImports
{
public override void OnImport(Boo.Lang.Compiler.Ast.Import import)
{
base.OnImport(import);
ReplaceCurrentNode(import); // prevent removal of import
}
}
}*/
}

26
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooParser.cs

@ -162,11 +162,10 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -162,11 +162,10 @@ namespace Grunwald.BooBinding.CodeCompletion
compiler.Parameters.OutputWriter = new StringWriter();
compiler.Parameters.TraceLevel = System.Diagnostics.TraceLevel.Off;
// Compile pipeline as of Boo 0.9.2:
// Compile pipeline as of Boo 0.9.4:
// Boo.Lang.Compiler.Pipelines.Parse:
// Boo.Lang.Parser.BooParsingStep
// Boo.Lang.Compiler.Steps.Parsing
// Boo.Lang.Compiler.Pipelines.ExpandMacros:
// Boo.Lang.Compiler.Steps.InitializeTypeSystemServices
// Boo.Lang.Compiler.Steps.PreErrorChecking
// Boo.Lang.Compiler.Steps.MergePartialClasses
// Boo.Lang.Compiler.Steps.InitializeNameResolutionService
@ -174,7 +173,7 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -174,7 +173,7 @@ namespace Grunwald.BooBinding.CodeCompletion
// Boo.Lang.Compiler.Steps.TransformCallableDefinitions
// Boo.Lang.Compiler.Steps.BindTypeDefinitions
// Boo.Lang.Compiler.Steps.BindGenericParameters
// Boo.Lang.Compiler.Steps.BindNamespaces
// Boo.Lang.Compiler.Steps.ResolveImports
// Boo.Lang.Compiler.Steps.BindBaseTypes
// Boo.Lang.Compiler.Steps.MacroAndAttributeExpansion
// Boo.Lang.Compiler.Pipelines.ResolveExpressions:
@ -182,7 +181,7 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -182,7 +181,7 @@ namespace Grunwald.BooBinding.CodeCompletion
// Boo.Lang.Compiler.Steps.IntroduceModuleClasses
// Boo.Lang.Compiler.Steps.NormalizeStatementModifiers
// Boo.Lang.Compiler.Steps.NormalizeTypeAndMemberDefinitions
// Boo.Lang.Compiler.Steps.NormalizeOmittedExpressions
// Boo.Lang.Compiler.Steps.NormalizeExpressions
// Boo.Lang.Compiler.Steps.BindTypeDefinitions
// Boo.Lang.Compiler.Steps.BindGenericParameters
// Boo.Lang.Compiler.Steps.BindEnumMembers
@ -195,10 +194,12 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -195,10 +194,12 @@ namespace Grunwald.BooBinding.CodeCompletion
// Boo.Lang.Compiler.Steps.ProcessInheritedAbstractMembers
// Boo.Lang.Compiler.Steps.CheckMemberNames
// Boo.Lang.Compiler.Steps.ProcessMethodBodiesWithDuckTyping
// Boo.Lang.Compiler.Steps.PreProcessExtensionMethods
// Boo.Lang.Compiler.Steps.ReifyTypes
// Boo.Lang.Compiler.Steps.VerifyExtensionMethods
// Boo.Lang.Compiler.Steps.TypeInference
// Boo.Lang.Compiler.Pipelines.Compile:
// Boo.Lang.Compiler.Steps.ConstantFolding
// Boo.Lang.Compiler.Steps.NormalizeLiterals
// Boo.Lang.Compiler.Steps.CheckLiteralValues
// Boo.Lang.Compiler.Steps.OptimizeIterationStatements
// Boo.Lang.Compiler.Steps.BranchChecking
// Boo.Lang.Compiler.Steps.CheckIdentifiers
@ -206,8 +207,7 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -206,8 +207,7 @@ namespace Grunwald.BooBinding.CodeCompletion
// Boo.Lang.Compiler.Steps.CheckAttributesUsage
// Boo.Lang.Compiler.Steps.ExpandDuckTypedExpressions
// Boo.Lang.Compiler.Steps.ProcessAssignmentsToValueTypeMembers
// Boo.Lang.Compiler.Steps.ExpandProperties
// Boo.Lang.Compiler.Steps.RemoveDeadCode
// Boo.Lang.Compiler.Steps.ExpandPropertiesAndEvents
// Boo.Lang.Compiler.Steps.CheckMembersProtectionLevel
// Boo.Lang.Compiler.Steps.NormalizeIterationStatements
// Boo.Lang.Compiler.Steps.ProcessSharedLocals
@ -216,6 +216,7 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -216,6 +216,7 @@ namespace Grunwald.BooBinding.CodeCompletion
// Boo.Lang.Compiler.Steps.ExpandVarArgsMethodInvocations
// Boo.Lang.Compiler.Steps.InjectCallableConversions
// Boo.Lang.Compiler.Steps.ImplementICallableOnCallableDefinitions
// Boo.Lang.Compiler.Steps.RemoveDeadCode
// Boo.Lang.Compiler.Steps.CheckNeverUsedMembers
// Boo.Lang.Compiler.Pipelines.CompileToMemory:
// Boo.Lang.Compiler.Steps.EmitAssembly
@ -224,7 +225,6 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -224,7 +225,6 @@ namespace Grunwald.BooBinding.CodeCompletion
CompilerPipeline compilePipe = new Parse();
compilePipe.Add(new InitializeTypeSystemServices());
compilePipe.Add(new PreErrorChecking());
compilePipe.Add(new MergePartialClasses());
compilePipe.Add(new InitializeNameResolutionService());
@ -232,13 +232,13 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -232,13 +232,13 @@ namespace Grunwald.BooBinding.CodeCompletion
// TransformCallableDefinitions: not used for CC
compilePipe.Add(new BindTypeDefinitions());
compilePipe.Add(new BindGenericParameters());
compilePipe.Add(new BindNamespacesWithoutRemovingErrors());
compilePipe.Add(new ResolveImports());
compilePipe.Add(new BindBaseTypes());
compilePipe.Add(new MacroAndAttributeExpansion());
compilePipe.Add(new IntroduceModuleClasses());
BooParsingStep parsingStep = (BooParsingStep)compilePipe[0];
parsingStep.TabSize = 1;
var parsingStep = compilePipe[0];
//compiler.Parameters.Environment.Provide<ParserSettings>().TabSize = 1;
ConvertVisitor visitor = new ConvertVisitor(lineLength, projectContent);
visitor.Cu.FileName = fileName;

14
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/InteractiveInterpreter.cs

@ -59,20 +59,20 @@ namespace Grunwald.BooBinding @@ -59,20 +59,20 @@ namespace Grunwald.BooBinding
if (interpreter == null) {
interpreter = new InteractiveInterpreter();
interpreter.RememberLastValue = true;
interpreter.Print = PrintLine;
//interpreter.Print = PrintLine; TODO reimplement print
interpreter.SetValue("cls", new Action(Clear));
AddReference(typeof(WorkbenchSingleton).Assembly);
interpreter.LoopEval("import System\n" +
"import System.Collections.Generic\n" +
"import System.IO\n" +
"import System.Text\n" +
"import System.Linq.Enumerable");
interpreter.Eval("import System\n" +
"import System.Collections.Generic\n" +
"import System.IO\n" +
"import System.Text\n" +
"import System.Linq.Enumerable");
}
processing = true;
try {
interpreter.LoopEval(command);
interpreter.Eval(command);
} catch (System.Reflection.TargetInvocationException ex) {
PrintLine(ex.InnerException);
}

9
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/ConvertVisitor.cs

@ -162,15 +162,6 @@ namespace NRefactoryToBooConverter @@ -162,15 +162,6 @@ namespace NRefactoryToBooConverter
Dictionary<string, string> intrinsicTypeDictionary;
class BooTypeSystemServices : Boo.Lang.Compiler.TypeSystem.TypeSystemServices
{
public System.Collections.Hashtable Primitives {
get {
return _primitives;
}
}
}
string GetIntrinsicTypeName(string typeName)
{
if (settings.SimplifyTypeNames) {

10
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/ExpressionTests.cs

@ -30,7 +30,7 @@ namespace NRefactoryToBooConverter.Tests @@ -30,7 +30,7 @@ namespace NRefactoryToBooConverter.Tests
[Test]
public void CastExpression()
{
TestExpr("(TargetType)var", "cast(TargetType, var)");
TestExpr("(TargetType)var", "(var cast TargetType)");
}
[Test]
@ -48,7 +48,7 @@ namespace NRefactoryToBooConverter.Tests @@ -48,7 +48,7 @@ namespace NRefactoryToBooConverter.Tests
[Test]
public void CastExpressionComplexType()
{
TestExpr("(List<T>[,])var", "cast((List[of T], 2), var)");
TestExpr("(List<T>[,])var", "(var cast (List[of T], 2))");
}
[Test]
@ -228,19 +228,19 @@ namespace NRefactoryToBooConverter.Tests @@ -228,19 +228,19 @@ namespace NRefactoryToBooConverter.Tests
[Test]
public void AnonymousMethod()
{
TestExpr("delegate { }", "def ():\n\tpass");
TestExpr("delegate { }", "{ return }");
}
[Test]
public void AnonymousMethodWithEmptyParameterList()
{
TestExpr("delegate () { }", "def ():\n\tpass");
TestExpr("delegate () { }", "{ return }");
}
[Test]
public void AnonymousMethodWithParameters()
{
TestExpr("delegate (int a, string b) { }", "def (a as System.Int32, b as System.String):\n\tpass");
TestExpr("delegate (int a, string b) { }", "{ a as System.Int32, b as System.String | return }");
}
[Test]

2
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/RemoveRedundantTypeReferencesTest.cs

@ -31,7 +31,7 @@ namespace NRefactoryToBooConverter.Tests @@ -31,7 +31,7 @@ namespace NRefactoryToBooConverter.Tests
[Test]
public void Cast()
{
TestStatement("MyClass m = (MyClass)variable;", "m = cast(MyClass, variable)");
TestStatement("MyClass m = (MyClass)variable;", "m = (variable cast MyClass)");
TestStatement("MyClass m = variable as MyClass;", "m = (variable as MyClass)");
}

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.CodeDom.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Compiler.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Extensions.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Interpreter.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Parser.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.PatternMatching.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.Useful.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Lang.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Microsoft.Build.Tasks.dll

Binary file not shown.

1
src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Microsoft.Build.targets

@ -216,6 +216,7 @@ @@ -216,6 +216,7 @@
Outputs="@(IntermediateAssembly)"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<Warning Text="This version of Boo does not support compiling for .NET $(TargetFrameworkVersion); the project will be compiled for .NET 4.0 instead." Condition=" '$(TargetFrameworkVersion)' != 'v4.0' "/>
<Booc
AllowUnsafeBlocks="$(AllowUnsafeBlocks)"

BIN
src/AddIns/BackendBindings/Boo/RequiredLibraries/booc.exe

Binary file not shown.

4
src/AddIns/BackendBindings/Boo/RequiredLibraries/booc.exe.config

@ -1,5 +1,9 @@ @@ -1,5 +1,9 @@
<configuration>
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true" />
</runtime>
<startup>
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v1.1.4322"/>
</startup>

Loading…
Cancel
Save