tiny changes
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 12 Jul 2021 04:03:39 +0000 (23:03 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 12 Jul 2021 04:03:39 +0000 (23:03 -0500)
site/js/js_events.js
src/main.onyx

index a60a716b8238d4edd8086d02e2d564012f9a8b85..8363914596fa0ed0eea3e667e2e4a1ec4e568935 100644 (file)
@@ -140,7 +140,6 @@ window.ONYX_MODULES.push({
 
         var path_memory = new Uint8Array(ONYX_MEMORY.buffer, filename_ptr, filename_len);
         var path = new TextDecoder("utf-8").decode(path_memory);
-        console.log(path);
 
         fetch(path)
             .then(response => response.arrayBuffer())
index 2aeedc13ec259165ccc9034e62ab3ca2696e0986..31945e4f006b4f1c5bf9f8959a9db1dbf61a00a0 100644 (file)
@@ -157,6 +157,11 @@ poll_events :: () -> bool {
                 for ^entry: wasm_module.sections.entries {
                     printf("Section: {}\nOffset: {}\n", entry.key, entry.value);
                 }
+
+                wasm_sections := wasm.parse_sections(^wasm_module);
+                for instr: wasm.instruction_iterator(^wasm_module, ^wasm_sections.code_section[1]) {
+                    printf("{}\n", instr);
+                }
             }
         }
     }
@@ -268,6 +273,8 @@ load_colors :: (event: ^events.Event) {
     assert(event.kind == .FileRequest, "Bad event type");
     assert(event.file.status == .Success, "Failed to load color file");
 
+    println("Reloading colorscheme...");
+
     color_data := memory.make_slice(u8, event.file.size);
     defer if color_data.count > 0 do cfree(color_data.data);
     events.get_requested_file_data(event.file.file_id, color_data);