Releases: DQNEO/babygo
Releases · DQNEO/babygo
More robust struct field's offset calculation
What's Changed
Full Changelog: v0.4.0...v0.4.1
Redesign types of the type
Support interface method call
- 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
- 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 asbuild
,list
, andcompile
. - Made
os/exec
to execute any linux commands by fork-and-exec mechanism
Separate the main package into several internal ones
- Now the compiler's main code is separated into
internal/
packages - Code generation
codegen
is not depend onast
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
v0.0.3 Fix README explanation
main.go and precompiler.go became same
$ 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
Babygo officially supports self-hosting 🎉
make test-self-host