Releases: bitdotgames/BHL
Releases · bitdotgames/BHL
v2.0.0-beta209
New features
- Adding support for bitwise negation operator:
~0 == -1
- Adding
std.Is(any, Type)
support:
import "std"
class Foo {
}
func bool test()
{
Foo foo = {}
return std.Is(foo, typeof(Foo))
}
v2.0.0-beta208
New features
- Adding
FiberRef.IsRunning
with convenient bindings - Experimenting with usage of yield in while loops. The following code can be used to prevent possible infinite loops without yielding control:
do {
...
} while(yield std.NextTrue())
Optimizations
- Resolving all module's type refs during module loading so that there's no runtime resolving during VM execution
- Storing all constants as an array in compiled module not as a List for less access overhead
- Getting rid of unnecessary type casting when visiting blocks
- Using less abstractions: getting rid of IDeferSupport and IBranchyCoroutine
- Converting ClassSymbol._all_members to an array instead of SymbolStorage
Bug fixes
- Fixing potential bug in TaskManager.RemoveAt(..)
v2.0.0-beta202
Warning: this release breaks BC with previous beta releases
Improvements
- Adding basic support for casting from any array type to []any and back, the following generic array sort implementation is possible now:
func Sort([]any arr, func bool(int, int) cmp) {
int len = arr.Count
for(int i = 1; i <= len - 1; i++) {
for(int j = 0; j < len - i; j++) {
if(cmp(j, j + 1)) {
var temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
}
func test() {
[]int ints = [10, 100, 1]
Sort(ints, func bool(int a, int b) { return ints[b] > ints[a] })
}
- Adding basic support for casting from any map type to [any]any and back
- Removing all copy-value implicit semantics from ValList
- Refactored Val ownership for ValMap making it akin to ValList
- Adding Val.NewNoReset(..) and using it appropriately
- Removing Val.RefMod(..) and replacing it with more specific calls
- Adding basic infrastructure for function trampoline caches
- Adding basic bench infrastructure using BenchmarkDotNet library
v2.0.0-beta193
Warning: this release breaks BC with previous beta releases
Improvements
- Adding initial support for blobs: now it's possible to copy an unmanaged C# struct into a byte array stored in Val using new Val.SetBlob< T >(..)/GetBlob< T > (..) API. This makes it possible to get rid of extra boxing when storing C# structs in Val.
- Removing allocating VM.Start(..) methods
- Adding FiberOptions enum support for extra tweaking of the started fiber
- Adding aggressive inlining hints for C# methods
- Using faster C# unsafe decoding of the bytecode
- Introducing optional bool argument: Fiber.Stop(.., bool with_children = false)
- Getting rid of 'frame0' in Fiber
- Optimizing frame exit routines
- Cleaning up unclaimed Fiber's results upon its restart
- Adding RefcList< T > convenience wrapper around List< T > with refcounting support which allows to pool lists
- Pre-allocating defer blocks for Frame and SeqBlock
- Getting rid of all code duplication related to execution of module's init code
- Cleaning FixedStack< T >, starting to use C# return ref semantics
- Improving compiler error handling and reporting
BC breaks
- ProxyType now uses NamePath for path instead of just a string. NamePath contains a list of path items.
Bugfixes
- Fixing Fiber double stop bug
- Fixing stale frame reference bug when starting a fiber via FuncPtr
v2.0.0-beta165
Warning: this release breaks BC with previous beta releases
Improvements
- Adding highly optimized 'instant-exec' FiberResult VM.Execute(FuncSymbolScript fs, FuncArgsInfo args_info, StackList args) method
- Adding convenience methods to start a fiber by FuncSymbolScript
- Making null reference exceptions more obvious during casts
- More flexible support of Types.Any being cast to INativeType
- Making LSP server 'more async'
- Making stack traces output compact by default (omitting ip info)
BC breaks
- Removing VM.OnNewFiber event
Bugfixes
- Fixing an improper resolving of symbols using namespace prefix
v2.0.0-beta153
Warning: this release breaks BC with previous beta releases
Improvements
- Completely migrating to dotnet from mono
- Moving dev.only tasks from bhl build tool to a Makefile
- Unifying output of internal exceptions as errors
Bugfixes
- Fixing 'missing map key variable' bug
v2.0.0-beta145
Improvements
- Unifying addressing and lookup of 'native' and 'userland' functions
- Getting rid of Opcodes.ExitFrame opcode, replacing it with a special ip address VM.EXIT_FRAME_IP
- Opcode.Return now is emitted always to mark the end of Frame
- Adding Opcodes.Nop opcode which does nothing
v2.0.0-beta141
Improvements
- Optimizing the amount of persisted data for linked namespaces
Bug fixes
- Fixing potentially broken setup of class symbols in cached modules which depend on parsed modules through indirect dependency
v2.0.0-beta136
Improvements
- Complete overhaul of namespace linkage resulting in better isolation of modules and better compile-time error reporting
v2.0.0-beta135
New Features
- Making json-like initialization more flexible, adding support for collections (arrays and maps):
var arr = new []int [1, 2, 3]
var kv = new [string]int [["a", 1], ["b", 10], ["c", 100]]
Improvements
- Bumping ANTLR runtime to 4.13.11
- Speeding up parsing phase up to 10x by using ANTLR BailErrorStrategy by default and switching to standard strategy in case of errors only
- Adding 'object GetNativeObject(Val v)' to INativeType interface and using it for more robust Type.Is(..) checks
Bugfixes
- Fixing escaping of double quotes within strings
- Making foreach(..) array type check more generic
- Fixing bug related to static methods calls
- Fixing lookup of symbols from class static methods