Skip to content

Conversation

masonwheeler
Copy link
Contributor

Converted booc from C# to Boo.

masonwheeler and others added 11 commits August 16, 2014 15:36
…without the LINQ pseudo-keywords stomping on the rest of the available identifier names, and to declare expressions in booish and debug them. Working on the transformations now.
… makes this much simpler.

Moved query expression transformer to the macro expansion phase of the pipeline and removed all unnecessary type-related code.
SELECT, WHERE, ORDERBY and CAST transformations are working correctly now.  Still poking at transparent identifiers.
…without the LINQ pseudo-keywords stomping on the rest of the available identifier names, and to declare expressions in booish and debug them. Working on the transformations now.
… makes this much simpler.

Moved query expression transformer to the macro expansion phase of the pipeline and removed all unnecessary type-related code.
SELECT, WHERE, ORDERBY and CAST transformations are working correctly now.  Still poking at transparent identifiers.
@drslump
Copy link
Collaborator

drslump commented Oct 13, 2014

In order to make the compiler self hosted we need a bootstrapping compiler, which can simply be a previous binary build of it. I think that before starting to merge the port into the main repository we need to adapt the build system to take this into account so that instead of adding new code to the project we actually replace the old one at the same time.

@masonwheeler
Copy link
Contributor Author

What sort of changes are needed? All of the code compiles under the current (0.9.5) Boo compiler.

@drslump
Copy link
Collaborator

drslump commented Oct 13, 2014

Ideally we should be able to do a checkout of the repository on a brand new computer and just by doing nant build the latest version of the compiler should be generated. By default in .Net we have a C# compiler, which allows to bootstrap the project because the core of Boo is written in that language. Once we start implementing the core in Boo itself we need a Boo bootstraping compiler, something to convert the Boo source code into its runnable form (the assembly).

There are different approaches to solve this issue, some compilers have a specific bootstrapping compiler implemented in a different language (i.e. C) that is able enough to build a version of the target compiler which in turn is used to build the rest of the project. However, since in .Net the binary assemblies are portable, perhaps the easier solution is to include the assemblies for the current compiler and use to bootstrap the compilation of the project.

In essence this should be the flow of the build process:

  • Use bootstrapping compiler to generate the compiler core
  • Use newly generated compiler core to build the rest of the project

So by including a minimum version of the Boo compiler in its binary form (.Net/mono runnable) on the repository, we can use it to build the compiler .boo sources with the only requirement to have a working .Net environment. That's a cleaner solution in my opinion that keeping the current C# sources in the repository just for bootstrapping purposes.

@masonwheeler
Copy link
Contributor Author

The existing C# source should probably be kept around (in a separate section of the repository) for verifiability purposes, (Trusting Trust etc,) but yes, that's basically what I had in mind: use binaries of the current compiler as our bootstrapping compiler.

@masonwheeler masonwheeler deleted the road-to-1.0 branch June 1, 2015 12:29
@masonwheeler masonwheeler restored the road-to-1.0 branch June 1, 2015 12:30
# Conflicts:
#	src/Boo.Lang.Compiler/Steps/InjectCallableConversions.cs
#	src/Boo.Lang.Compiler/TypeSystem/Services/AnonymousCallablesManager.cs
#	src/Boo.Lang.Compiler/TypeSystem/Services/CodeReifier.cs
Adding a tie-breaking rule to type resolution, to select a less generic
concrete type over a more generic concrete type.  For example, prefer
IEnumerable[of int] over IEnumerable[of Nullable[of int]].
Adding a tie-breaking rule to type resolution, to select a less generic
concrete type over a more generic concrete type.  For example, prefer
IEnumerable[of int] over IEnumerable[of Nullable[of int]].
It's not polite to stomp someone else's LexicalInfo
Ensuring that `CheckMembersProtectionLevel` will visit `self` and
`super` method references (constructors) correctly.
Merge pull request boo-lang#145 from masonwheeler/master
# Conflicts:
#	src/Boo.Lang.Compiler/Ast/AstNodePredicates.cs
#	src/Boo.Lang.Compiler/Boo.Lang.Compiler.csproj
#	src/Boo.Lang.Parser/BooExpressionLexer.cs
#	src/Boo.Lang.Parser/BooExpressionLexerTokenTypes.cs
#	src/Boo.Lang.Parser/BooExpressionLexerTokenTypes.txt
#	src/Boo.Lang.Parser/BooLexer.cs
#	src/Boo.Lang.Parser/BooParserBase.cs
#	src/Boo.Lang.Parser/BooTokenTypes.cs
#	src/Boo.Lang.Parser/BooTokenTypes.txt
Ensure that invalid implicit conversions provide useful errors
Synchronizing with Master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants