From: Brendan Hansen Date: Mon, 12 Jul 2021 04:03:39 +0000 (-0500) Subject: tiny changes X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=238477bbe0a423204df0374d36b96a741990ee10;p=onyx-wasm-analyzer.git tiny changes --- diff --git a/site/js/js_events.js b/site/js/js_events.js index a60a716..8363914 100644 --- a/site/js/js_events.js +++ b/site/js/js_events.js @@ -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()) diff --git a/src/main.onyx b/src/main.onyx index 2aeedc1..31945e4 100644 --- a/src/main.onyx +++ b/src/main.onyx @@ -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);