Permalink
Browse files

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

  • Loading branch information...
1 parent bb227db commit d2a9d5758a8fd21aaae0b43ec0a63741e8fc0209 @dgrunwald dgrunwald committed Oct 21, 2010
Showing with 35 additions and 38 deletions.
  1. +4 −3 .../BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BindNamespacesWithoutRemovingErrors.cs
  2. +13 −13 src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooParser.cs
  3. +7 −7 src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/InteractiveInterpreter.cs
  4. +0 −9 src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/ConvertVisitor.cs
  5. +5 −5 src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Test/ExpressionTests.cs
  6. +1 −1 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 −0 src/AddIns/BackendBindings/Boo/RequiredLibraries/Boo.Microsoft.Build.targets
  17. BIN src/AddIns/BackendBindings/Boo/RequiredLibraries/booc.exe
  18. +4 −0 src/AddIns/BackendBindings/Boo/RequiredLibraries/booc.exe.config
@@ -6,16 +6,17 @@
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
}
- }
+ }*/
}
@@ -162,27 +162,26 @@ private ICompilationUnit Parse(IProjectContent projectContent, string fileName,
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
// Boo.Lang.Compiler.Steps.IntroduceGlobalNamespaces
// 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:
// Boo.Lang.Compiler.Steps.ExpandAstLiterals
// 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,19 +194,20 @@ private ICompilationUnit Parse(IProjectContent projectContent, string fileName,
// 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
// Boo.Lang.Compiler.Steps.StricterErrorChecking
// 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 @@ private ICompilationUnit Parse(IProjectContent projectContent, string fileName,
// 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,21 +225,20 @@ private ICompilationUnit Parse(IProjectContent projectContent, string fileName,
CompilerPipeline compilePipe = new Parse();
- compilePipe.Add(new InitializeTypeSystemServices());
compilePipe.Add(new PreErrorChecking());
compilePipe.Add(new MergePartialClasses());
compilePipe.Add(new InitializeNameResolutionService());
compilePipe.Add(new IntroduceGlobalNamespaces());
// 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;
@@ -59,20 +59,20 @@ void ProcessCommand(string command)
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);
}
@@ -162,15 +162,6 @@ void ConvertTypeReferences(List<TypeReference> input, B.TypeReferenceCollection
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) {
@@ -30,7 +30,7 @@ public void Super()
[Test]
public void CastExpression()
{
- TestExpr("(TargetType)var", "cast(TargetType, var)");
+ TestExpr("(TargetType)var", "(var cast TargetType)");
}
[Test]
@@ -48,7 +48,7 @@ public void TypeTestExpression()
[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 @@ public void CreateArrayWithTwoElements()
[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]
@@ -31,7 +31,7 @@ public void ConstructorCall()
[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)");
}
Binary file not shown.
@@ -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)"
Binary file not shown.
@@ -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>

0 comments on commit d2a9d57

Please sign in to comment.