From: Brendan Hansen Date: Tue, 8 Sep 2020 21:44:31 +0000 (-0500) Subject: various bug improvements X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=52beca3c6a4457072ba1e95c7a786213a63ab25a;p=onyx.git various bug improvements --- diff --git a/Makefile b/Makefile index 4778e4be..8754d4ee 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -RELEASE=0 +RELEASE=1 OBJ_FILES=\ build/onyxlex.o \ diff --git a/core/js/webgl.js b/core/js/webgl.js index 1199e896..a8e727df 100644 --- a/core/js/webgl.js +++ b/core/js/webgl.js @@ -57,6 +57,10 @@ WebGl_Wasm = { const data = new DataView(WASM_MEMORY.buffer, bufferdata, bufferlen); this.gl.bufferSubData(target, offset, data); }, + canvasSize(width, height) { + this.canvas.width = width; + this.canvas.height = height; + }, checkFrameBufferStatus(target) { return this.gl.checkFrameBufferStatus(target); }, clear(bit) { this.gl.clear(bit); }, clearColor(r, g, b, a) { this.gl.clearColor(r, g, b, a); }, diff --git a/core/js/webgl.onyx b/core/js/webgl.onyx index a4d2afea..dbbe978b 100644 --- a/core/js/webgl.onyx +++ b/core/js/webgl.onyx @@ -740,6 +740,7 @@ bufferDataWithData :: proc (target: GLenum, buffer: Buffer, usage: G bufferDataNoData :: proc (target: GLenum, size: GLsizeiptr, usage: GLenum) #foreign "gl" "bufferDataNoData" --- bufferData :: proc #overloaded { bufferDataWithData, bufferDataNoData } bufferSubData :: proc (target: GLenum, offset: GLsizei, data: Buffer) #foreign "gl" "bufferSubData" --- +canvasSize :: proc (width: GLsizei, height: GLsizei) #foreign "gl" "canvasSize" --- checkFrameBufferStatus :: proc (target: GLenum) -> GLenum #foreign "gl" "checkFrameBufferStatus" --- clear :: proc (mask: GLbitfield) #foreign "gl" "clear" --- clearColor :: proc (red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) #foreign "gl" "clearColor" --- diff --git a/docs/plan b/docs/plan index 04eadb19..61ec68d5 100644 --- a/docs/plan +++ b/docs/plan @@ -262,6 +262,10 @@ HOW: [ ] Add SIMD intrinsics - This also requires adding the v128 SIMD type + [ ] Add threading intrinsics + - This will actually be fairly easy since I think all that is needed is + to implement the intrinsics. + [ ] Type parameterized structs [ ] Array literals diff --git a/misc/onyx.vim b/misc/onyx.vim index 1f1c588e..e037825f 100644 --- a/misc/onyx.vim +++ b/misc/onyx.vim @@ -31,6 +31,7 @@ syn keyword onyxConstant true false null syn keyword onyxCommentStart contained TODO NOTE BUG HACK syn region onyxComment start="//" end="$" keepend contains=onyxCommentStart +syn region onyxComment start="/\*" end="\*/" contains=onyxCommentStart syn region onyxDirective start="#" end=" " diff --git a/onyx b/onyx index 8338bfe5..a68a99c1 100755 Binary files a/onyx and b/onyx differ diff --git a/progs/odin_example.onyx b/progs/odin_example.onyx index 7fc7dbcd..62a688d8 100644 --- a/progs/odin_example.onyx +++ b/progs/odin_example.onyx @@ -63,6 +63,8 @@ main :: proc (args: [] cstring) { print("\n"); print_bar(^bar); print_foo(^bar.foo); + print(bar.foo.data1); + print("\n"); program := "+ + * s - /"; accumulator := 0; diff --git a/src/onyxchecker.c b/src/onyxchecker.c index d8862bd0..469a1ca6 100644 --- a/src/onyxchecker.c +++ b/src/onyxchecker.c @@ -1138,6 +1138,8 @@ b32 check_expression(AstTyped** pexpr) { case Ast_Kind_Polymorphic_Proc: break; + case Ast_Kind_Package: break; + case Ast_Kind_Error: break; default: diff --git a/src/onyxsymres.c b/src/onyxsymres.c index 987aab01..9394f9c2 100644 --- a/src/onyxsymres.c +++ b/src/onyxsymres.c @@ -666,6 +666,8 @@ static void symres_enum(AstEnumType* enum_node) { return; } + (*value)->value->type = enum_node->backing_type; + } else { AstNumLit* num = onyx_ast_node_new(semstate.node_allocator, sizeof(AstNumLit), Ast_Kind_NumLit); num->value.l = next_assign_value;