Releases: bitdotgames/BHL
v2.0.0-beta97
New Features
- Adding basic support for preprocessing and conditional compilation. For example:
#if SERVER
ProjectileShoot()
#else
ProjectileShow()
#endif
#if !CLIENT
ProjectileShoot()
#endif
Defines are declared in a project manifest bhl.proj as follows:
{
...
"defines" : ["CLIENT"]
...
}
Bugfixes
- Fixing rare bug related to object instance casting
v2.0.0-beta94
- Fixing 'as' casting for native types
- Adding parent and children tracking to fibers
- Improving error handling for unresolved types
- Adding 'inc_dirs' property to bhl.proj manifests for more flexible configuration of include path for imported modules resolving
{
"inc_dirs" : ["../"],
"src_dirs" : ["./", "../Shared"],
...
}
- Adding support for negative numbers in enums
- Adding implicit casting from enum to int type
- Fixing some parsing ambiguities
- VM.Null special case value now has Types.Null type for consistency
- LSP related miscellaneous fixes
- Adding static functions and variables support which are only visible in the current module
- Adding support for automatic initialization of modules once they are loaded via static init() function
static int HashAnimIdle
static func init() {
HashAnimIdle = Animator.MakeHash("Idle")
}
v2.0.0-beta80
- Added actually working built-in function: wait(milliseconds):
yield wait(100)
- Added InsertAt(idx, value) method for arrays (thanks @MaxShcherbakov) :
[]int arr = [14]
arr.InsertAt(0, 42)
-
Added C# API to access global variables
-
Numerous LSP fault tolerant parsing improvements
-
Fixing potential bug related to order of release calls for Frame instances
-
Fixing bug related to super class and implemented interfaces setup for native class symbols
-
Adding C# VM.OnNewFiber public event
-
Added C# ValList.GetEnumerator() implementation (thanks @Greysnek)
v2.0.0-beta69
- Adding initial support for 'capture list' semantics in lambdas similar to Swift:
for(int i=0;i<3;i++)
{
start(func() [i] { // Here we explicitly say we want a copy of the i variable. By default all variables are captured by reference.
trace((string)i)
})
}
- Adding a basic built-in debugger() function which will make the C# debugger stop (if it's attached) on the line.
func test() {
debugger()
}
This allows for example to inspect local function variables.
There's no a full blown BHL debugger yet but it's better than nothing.
-
Adding a compile time check for potentially ambiguous import paths. If several files might be imported using the same import path (via project's search path) the compile time error is triggered
-
Adding native C# type to all native symbols for better reflection inspection
-
Fixing stack trace retrieval for some edge cases in paral blocks
-
Fixing potential bug when a module imports itself
-
Fixing unserialisation of generic arrays and maps from compiled modules
-
Adding better validation of static methods and attributes calls during compilation
-
Adding basic support for LSP diagnostics
-
Improving LSP server support on Windows
v2.0.0-beta57
- Adding more strict parsing of statements expected to be separated with newlines or ';'. For example the following code will trigger a parsing error now:
int a, int b FooBar()
There's '=' missing but the previous parser would consider this to be a valid code:
- declaration of int a, int b
- FooBar() call
The new parser now requires an explicit separator between these statements: newline or ';'
- Removing "circular references" detection heuristics since it's not generic enough. It will be fixed with introduction of "weak references" semantics (like in Swift)
- Splitting namespaces linking during imports into 2 phases: pre-linking and actual linking for proper order-independent imports
- Adding draft version of LSP hover support
- Adding string methods: .Count, .At(i) and .IndexOf(str)
func string Reverse(string a) {
string b = ""
for(int i=a.Count-1;i>=0;i--) {
b += a.At(i)
}
return b
}
func int IndexOfBar(string a) {
return a.IndexOf("Bar")
}
v2.0.0-beta52
- Parser fixes for some edge cases related to return statement
- Initial implementation of LSP's 'Find references'
- LSP's 'Go To Definition' now properly jumps to native C# bindings
- Draft version of LSP's semantic tokens
- Fix for a possible memory Val leak due to self circular references in cases as follows:
class Bar {
func() ptr
func Dummy() {}
}
func test() {
Bar b = {}
b.ptr = func() {
b.Dummy() //<-- b 'upvalue' self reference, b wouldn't be properly released upon scope exit
}
}
v2.0.0-beta42
- Wrapping VM.Stop(..) with proper stack trace reporter in case of an error
- Introducing project build manifest bhl.proj file. Instead of passing build arguments using command line options now it's possible to specify them in bhl.proj file.
Here's an example of such a file:
configs/bhl.proj
{
"src_dirs" : ["./"],
"result_file" : "../build/bhl.bytes",
"error_file" : "../build/bhl.error",
"tmp_dir" : "../build/bhl/",
"max_threads" : 4,
"deterministic" : true,
"bindings_sources" : [
"../bhl/register.cs",
"../bhl/autobind.cs"
],
"bindings_dll" : "../build/bhl_bindings.dll",
"postproc_sources" : [
"../bhl/postproc.cs"
],
"postproc_dll" : "../build/bhl_postproc.dll"
}
The project can be built as follows then:
$ bhl compile -p configs/bhl.proj
The upcoming LSP server will also use the project file.
v2.0.0-beta39
- Fixing issues related to casting of native classes
- Fixing implicit casting to string for complex statements
- Adding initial support for comparison of enum values with int values without casting
if(Foo.Bar == 1) {
...
}
- Using invariant culture when casting numbers to string
- Fixing execution of global statement expressions for some cases
- Moving and renaming type(..) function to std module as std.GetType(..)
- Fixing tests runner for Windows
- Further making the parser more fault tolerant
v2.0.0-beta30
- Adding initial support for implicit casting to string of numeric types in concat alike expressions:
trace("The answer: " + 42)
- Adding parse time error for class instance function pointers usage (since they're not supported by VM at the moment anyway)
- Coroutine pools are now stored in a static thread local storage
- Numerous fixes of parser minor bugs
v2.0.0-beta26
Warning: this release breaks BC with previous beta releases
- Gradually implementing a fault tolerant parser which will be used for LSP
- Parser doesn't stop parsing upon the first error. It tries to parse as much as possible collecting and outputting all errors
- Parser now recognises much more sophisticated expressions
- More optimal implementation of coroutine pools: new/del operations are now O(1) and don't require reflection
- Allowing to use this inside of lambdas within class methods
- Fixing incremental builds which were broken
- Fibers now use refcounting mechanism for proper ownership handling
- Empty namespaces are supported now
- Properly preserving the order of symbols declarations
- --deterministic command line option was not properly declared