Skip to content

Releases: DQNEO/babygo

More robust struct field's offset calculation

22 Aug 10:42
Compare
Choose a tag to compare

What's Changed

  • Improve struct field offset calculation by @DQNEO in #113

Full Changelog: v0.4.0...v0.4.1

Redesign types of the type

20 Aug 15:52
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.0...v0.4.0

Support interface method call

12 Aug 12:13
Compare
Choose a tag to compare
  • Support interface method call
  • Add io.Writer interface type
  • Support error.Error() method
  • Add babygo build -x option for verbose log
  • Rename dtype labels to itab (interface table)
  • Handle implicit conversion to interface more smartly
  • Support hex digits number literals

Support separate compilation and cache build

05 Aug 09:48
Compare
Choose a tag to compare
  • Support separate compilation
  • Compiled package objects are stored into a .dcl.go file as forward declarations so that a later compilation can reuse them.
  • Introduce subcommand system
  • Features of babygo are now split into subcommands such as build , list, and compile.
  • Made os/exec to execute any linux commands by fork-and-exec mechanism

Separate the main package into several internal ones

05 Aug 09:21
Compare
Choose a tag to compare
  • Now the compiler's main code is separated into internal/ packages
  • Code generation codegen is not depend on ast any more, but on semantic analyzer (sema) and intermediate representation (ir) objects.
  • Move a lot of logic from code generator to semantic analyzer
  • Adopted DWARF2 debug info https://sourceware.org/binutils/docs/as.html#Loc
  • Adopted token.Pos and fileset position mechanism
  • Removed pre compiler. It is now generated automatically in test.

Output separate assembly files per package

13 Sep 14:26
Compare
Choose a tag to compare
v0.0.3

Fix README explanation

main.go and precompiler.go became same

10 Mar 10:03
Compare
Choose a tag to compare
$ diff -U 0 pre/precompiler.go main.go
--- pre/precompiler.go	2021-03-09 09:31:23.000000000 +0900
+++ main.go	2021-03-09 09:30:50.000000000 +0900
@@ -8,3 +8,2 @@
-	"go/ast"
-	"go/parser"
-	"go/token"
+	"github.com/DQNEO/babygo/lib/ast"
+	"github.com/DQNEO/babygo/lib/token"
@@ -20 +19 @@
-const ProgName string = "pre"
+const ProgName string = "babygo"
@@ -4399,7 +4397,0 @@
-
-// tweak to reduce diff with main.go
-const parserImportsOnly = parser.ImportsOnly
-
-func parserParseFile(fset *token.FileSet, filename string, src interface{}, mode parser.Mode) (*ast.File, error) {
-	return parser.ParseFile(fset, filename, src, mode)
-}

Achieved self hosting

29 Jul 13:30
Compare
Choose a tag to compare

Babygo officially supports self-hosting 🎉

make test-self-host