updated CHANGELOG; minor bug fixes
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 12 Jan 2021 22:23:08 +0000 (16:23 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 12 Jan 2021 22:23:08 +0000 (16:23 -0600)
CHANGELOG
bin/onyx
core/io/stream.onyx
include/bh.h
onyx.exe
src/onyxchecker.c

index c549e76d04ae751d604b0b89262480c0b2338cbd..5c831d9942243ea4a5d8b24fd4b2f4220a36deb3 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,12 +4,17 @@ Additions:
 * Compilation on Windows. All you should need is `cl.exe` in the current environment,
     and then simply run `build.bat`. I haven't thoroughly tested this, but I believe
     it will work on many systems. ARM / PowerPC may not work correctly.
+* procedures can be polymorphic on an array size.
+* structures can be polymorphic on any compile-time known value.
+* basics of operator overloading using `#operator +`.
+* multiple return values and multiple assignment / declarations.
 * #solidify directive for explicitly specifying type variables in polymorphic procs.
 * properly different kinds of allocators in core/alloc/.
 * `null_proc` in builtin.onyx type matches against all procedure types, allowing for a
     'null' procedure.
-* '-VV' for very verbose printing. Easier to nail down compiler issues because it stops
+* '-VV' and '-VVV' for very verbose printing. Easier to nail down compiler issues because it stops
     printing in the entity where the problem is.
+* `io.Stream` API with `io.Reader` and `io.Writer`.
 * `map.empty`
 * `string.compare`
 * `array.copy`
@@ -19,6 +24,7 @@ Additions:
 
 Removals:
 * struct literals can no longer specify values for members brought in through a `use`.
+* Makefile; just use ./build.sh or ./build.bat
 
 Changes:
 * `::` declarations in a procedure are treated differently now. They used to represent a constant
@@ -43,6 +49,8 @@ Bug fixes:
 * struct member defaults were processed too early in the pipeline, causing errors.
 * assignment of array type with array literal optimization.
 * probably many more since everything is compiled with warnings now.
+* deferred statements are correctly executed with break, continue and fallthrough.
+* `0..10` was not parsed correctly.
 
 
 Release v0.0.5
index edc6920523395906a88a6fd93e86c4f5a8968cd6..c76a84058a8c3ed3488b0dc8ae03fcf2e905fb9e 100755 (executable)
Binary files a/bin/onyx and b/bin/onyx differ
index 2a43d372ae37c03efeefc39dee67bf02ef265572..d6abe0c80669afc0746541f10da8c7f552c06b1a 100644 (file)
@@ -117,10 +117,7 @@ stream_size :: proc (use s: ^Stream) -> i32 {
 }
 
 stream_peek_byte :: proc (use s: ^Stream) -> (Error, u8) {
-    out : u8;
-    err : io.Error;
-
-    err, out = stream_read_byte(s);
+    err, out := stream_read_byte(s);
     if err != Error.None do return err, 0;
 
     err = stream_unread_byte(s);
index 417672cf8dbf6dfb5d68e1f36f90ceb77f3787a4..5b708de9628a50f9e69bc69cbe993af2862e793d 100644 (file)
@@ -184,7 +184,7 @@ u8* double_to_ieee754(f64 f, b32 reverse);
 
 #define fori(var, lo, hi)                 for (i64 var = (lo); var < (hi); var++)
 #define forir(var, hi, lo)                for (i64 var = (hi); var >= (lo); var--)
-#define forll(T, var, start, step)        for (T* var = (start); var != NULL; var = var->step)
+#define forll(T, var, start, step)        for (T* var = (start); var != NULL; var = (T *) var->step)
 
 #if defined(BH_DEBUG) && !defined(_BH_WINDOWS)
     #define DEBUG_HERE                        __asm("int $3")
index 9f716f7f34115eea1845752bafce3da4b29d8de1..003fe740b02990f84878d8b64c8dc960d25eb13a 100644 (file)
Binary files a/onyx.exe and b/onyx.exe differ
index 324be12bfa358cb94008b749e0f181266f52d167..233917b71571db1379650ad51c25a6105c6801d3 100644 (file)
@@ -93,7 +93,7 @@ CheckStatus check_return(AstReturn* retnode) {
         CHECK(expression, &retnode->expr);
 
         if (!type_check_or_auto_cast(&retnode->expr, semstate.expected_return_type)) {
-            onyx_report_error(retnode->expr->token->pos,
+            onyx_report_error(retnode->token->pos,
                     "Expected to return a value of type '%s', returning value of type '%s'.",
                     type_get_name(semstate.expected_return_type),
                     type_get_name(retnode->expr->type));