From f85cb9346dc6755010a01af5696d3236fc5e5d3f Mon Sep 17 00:00:00 2001 From: Robert-M-Lucas <100799838+Robert-M-Lucas@users.noreply.github.com> Date: Sat, 17 Aug 2024 15:50:59 +0100 Subject: [PATCH 1/2] Import improvements --- .../shelved.patch | 141 --------- ...heckout_at_06_08_2024__15_37__Changes_.xml | 4 - .../shelved.patch | 96 ------ ..._Update_at_06_08_2024__15_37__Changes_.xml | 4 - .../out.o | Bin 4688 -> 0 bytes .../out.out | Bin 18224 -> 0 bytes .../shelved.patch | 284 ------------------ ..._Update_at_07_08_2024__15_58__Changes_.xml | 14 - .idea/workspace.xml | 101 +++---- build/out.asm | 29 ++ build/out.o | Bin 528 -> 960 bytes main.why | 20 +- src/root/compiler/compile.rs | 17 +- src/root/compiler/compile_function.rs | 5 +- src/root/compiler/evaluation/function_only.rs | 61 +++- src/root/compiler/evaluation/into.rs | 16 +- src/root/compiler/evaluation/new.rs | 16 +- src/root/compiler/evaluation/reference.rs | 14 +- src/root/compiler/evaluation/type_only.rs | 105 +++++-- src/root/errors/evaluable_errors.rs | 4 + src/root/errors/name_resolver_errors.rs | 2 +- src/root/name_resolver/name_resolvers.rs | 203 ++++++++++--- src/root/name_resolver/resolve.rs | 14 +- .../resolve_function_signatures.rs | 5 +- src/root/name_resolver/resolve_names.rs | 10 +- src/root/parser/parse.rs | 1 - std/linked_list.why | 2 - std/test.why | 4 + 28 files changed, 452 insertions(+), 720 deletions(-) delete mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024,_15_37_[Changes]/shelved.patch delete mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024__15_37__Changes_.xml delete mode 100644 .idea/shelf/Uncommitted_changes_before_Update_at_06_08_2024,_15_37_[Changes]/shelved.patch delete mode 100644 .idea/shelf/Uncommitted_changes_before_Update_at_06_08_2024__15_37__Changes_.xml delete mode 100644 .idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024,_15_58_[Changes]/out.o delete mode 100755 .idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024,_15_58_[Changes]/out.out delete mode 100644 .idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024,_15_58_[Changes]/shelved.patch delete mode 100644 .idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024__15_58__Changes_.xml create mode 100644 std/test.why diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024,_15_37_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024,_15_37_[Changes]/shelved.patch deleted file mode 100644 index 9f1e4c7..0000000 --- a/.idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024,_15_37_[Changes]/shelved.patch +++ /dev/null @@ -1,141 +0,0 @@ -Index: .idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch -=================================================================== -diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch -deleted file mode 100644 ---- a/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch (revision a072c6e81c1091b995ab0d7dda77e8cc5c7c5f5e) -+++ /dev/null (revision a072c6e81c1091b995ab0d7dda77e8cc5c7c5f5e) -@@ -1,77 +0,0 @@ --Index: .idea/workspace.xml --IDEA additional info: --Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP --<+>\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n "lastFilter": {\n "state": "OPEN",\n "assignee": "Robert-M-Lucas"\n }\n}\n \n \n {\n "selectedUrlAndAccountId": {\n "url": "https://github.com/Robert-M-Lucas/whython-8.git",\n "accountId": "dcb8df19-0b39-47e1-9073-4a54f7034be8"\n }\n}\n \n \n \n \n {\n "customColor": "",\n "associatedIndex": 4\n}\n \n \n \n {\n "keyToString": {\n "Cargo.Build `Run whython-8`.executor": "Run",\n "Cargo.Run whython-8.executor": "Run",\n "Cargo.Test whython-8.executor": "Run",\n "RunOnceActivity.OpenProjectViewOnStart": "true",\n "RunOnceActivity.ShowReadmeOnStart": "true",\n "RunOnceActivity.rust.reset.selective.auto.import": "true",\n "Shell Script.Test Asm.executor": "Run",\n "git-widget-placeholder": "master",\n "ignore.virus.scanning.warn.message": "true",\n "last_opened_file_path": "/home/robertlucas/RustroverProjects/trace",\n "node.js.detected.package.eslint": "true",\n "node.js.detected.package.tslint": "true",\n "node.js.selected.package.eslint": "(autodetect)",\n "node.js.selected.package.tslint": "(autodetect)",\n "nodejs_package_manager_path": "npm",\n "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true",\n "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "",\n "org.rust.first.attach.projects": "true",\n "settings.editor.selected.configurable": "preferences.pluginManager",\n "vue.rearranger.settings.migration": "true"\n },\n "keyToStringList": {\n "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [\n "Rust"\n ]\n }\n}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 1714088144106\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/.idea/workspace.xml b/.idea/workspace.xml ---- a/.idea/workspace.xml (revision a072c6e81c1091b995ab0d7dda77e8cc5c7c5f5e) -+++ b/.idea/workspace.xml (date 1722642752537) -@@ -7,12 +7,7 @@ - - - -- -- -- -- -- -- -+ - - diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024__15_37__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024__15_37__Changes_.xml deleted file mode 100644 index 89ae3b6..0000000 --- a/.idea/shelf/Uncommitted_changes_before_Checkout_at_06_08_2024__15_37__Changes_.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_06_08_2024,_15_37_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Update_at_06_08_2024,_15_37_[Changes]/shelved.patch deleted file mode 100644 index 8dd88a6..0000000 --- a/.idea/shelf/Uncommitted_changes_before_Update_at_06_08_2024,_15_37_[Changes]/shelved.patch +++ /dev/null @@ -1,96 +0,0 @@ -Index: .idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024__23_06__Changes_.xml -=================================================================== -diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024__23_06__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024__23_06__Changes_.xml -deleted file mode 100644 ---- a/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024__23_06__Changes_.xml (revision d7abd142d3530f02bec11beab0cb81b23b907ad7) -+++ /dev/null (revision d7abd142d3530f02bec11beab0cb81b23b907ad7) -@@ -1,4 +0,0 @@ -- -- -\ No newline at end of file -Index: .idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch -=================================================================== -diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch -deleted file mode 100644 ---- a/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch (revision d7abd142d3530f02bec11beab0cb81b23b907ad7) -+++ /dev/null (revision d7abd142d3530f02bec11beab0cb81b23b907ad7) -@@ -1,77 +0,0 @@ --Index: .idea/workspace.xml --IDEA additional info: --Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP --<+>\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n "lastFilter": {\n "state": "OPEN",\n "assignee": "Robert-M-Lucas"\n }\n}\n \n \n {\n "selectedUrlAndAccountId": {\n "url": "https://github.com/Robert-M-Lucas/whython-8.git",\n "accountId": "dcb8df19-0b39-47e1-9073-4a54f7034be8"\n }\n}\n \n \n \n \n {\n "customColor": "",\n "associatedIndex": 4\n}\n \n \n \n {\n "keyToString": {\n "Cargo.Build `Run whython-8`.executor": "Run",\n "Cargo.Run whython-8.executor": "Run",\n "Cargo.Test whython-8.executor": "Run",\n "RunOnceActivity.OpenProjectViewOnStart": "true",\n "RunOnceActivity.ShowReadmeOnStart": "true",\n "RunOnceActivity.rust.reset.selective.auto.import": "true",\n "Shell Script.Test Asm.executor": "Run",\n "git-widget-placeholder": "master",\n "ignore.virus.scanning.warn.message": "true",\n "last_opened_file_path": "/home/robertlucas/RustroverProjects/trace",\n "node.js.detected.package.eslint": "true",\n "node.js.detected.package.tslint": "true",\n "node.js.selected.package.eslint": "(autodetect)",\n "node.js.selected.package.tslint": "(autodetect)",\n "nodejs_package_manager_path": "npm",\n "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true",\n "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "",\n "org.rust.first.attach.projects": "true",\n "settings.editor.selected.configurable": "preferences.pluginManager",\n "vue.rearranger.settings.migration": "true"\n },\n "keyToStringList": {\n "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [\n "Rust"\n ]\n }\n}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 1714088144106\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/.idea/workspace.xml b/.idea/workspace.xml ---- a/.idea/workspace.xml (revision 6a59973c20052dc147b44a0ab3d6d213f79b9664) -+++ b/.idea/workspace.xml (date 1723042691279) -@@ -7,14 +7,13 @@ - - - -- -+ - - - - -- -- -- -+ -+ - - - -@@ -729,7 +728,6 @@ - - - -- - - - -@@ -754,7 +752,8 @@ - - - -- - - -Index: build/out.asm -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP -<+> global main\n\nsection .text\n\nmain:\n push rbp\n mov rbp, rsp\n sub rsp, 0x0000000000000018\n call _10\n add rsp, 0x0000000000000018\n mov rax, qword [rbp-24]\n mov qword [rbp-8], rax\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-32], rax\n mov qword [rbp-40], 12\n mov rax, qword [rbp-40]\n mov qword [rbp-64], rax\n mov rax, qword [rbp-32]\n mov qword [rbp-72], rax\n sub rsp, 0x0000000000000048\n call _11\n add rsp, 0x0000000000000048\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-64], rax\n mov qword [rbp-72], 7\n mov rax, qword [rbp-72]\n mov qword [rbp-96], rax\n mov rax, qword [rbp-64]\n mov qword [rbp-104], rax\n sub rsp, 0x0000000000000068\n call _11\n add rsp, 0x0000000000000068\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-96], rax\n mov qword [rbp-104], 8\n mov rax, qword [rbp-104]\n mov qword [rbp-128], rax\n mov rax, qword [rbp-96]\n mov qword [rbp-136], rax\n sub rsp, 0x0000000000000088\n call _11\n add rsp, 0x0000000000000088\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-128], rax\n mov rax, qword [rbp-128]\n mov qword [rbp-136], rax\n sub rsp, 0x0000000000000088\n call _14\n add rsp, 0x0000000000000088\n mov rdi, __42_fstr\n mov al, 0\n sub rsp, 128\n extern printf\n call printf\n add rsp, 128\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-144], rax\n mov qword [rbp-152], 1\n mov rax, qword [rbp-152]\n mov qword [rbp-176], rax\n mov rax, qword [rbp-144]\n mov qword [rbp-184], rax\n sub rsp, 0x00000000000000b8\n call _12\n add rsp, 0x00000000000000b8\n mov rax, qword [rbp-168]\n mov qword [rbp-136], rax\n mov rdi, __8_fstr\n mov rsi, [rbp-136]\n mov al, 0\n sub rsp, 168\n extern printf\n call printf\n add rsp, 168\n mov rdi, __42_fstr\n mov al, 0\n sub rsp, 168\n extern printf\n call printf\n add rsp, 168\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-184], rax\n mov rax, qword [rbp-184]\n mov qword [rbp-200], rax\n sub rsp, 0x00000000000000c8\n call _13\n add rsp, 0x00000000000000c8\n mov rax, qword [rbp-192]\n mov qword [rbp-176], rax\n mov rdi, __8_fstr\n mov rsi, [rbp-176]\n mov al, 0\n sub rsp, 192\n extern printf\n call printf\n add rsp, 192\n mov rdi, __42_fstr\n mov al, 0\n sub rsp, 192\n extern printf\n call printf\n add rsp, 192\n mov rax, rbp\n add rax, 0xfffffffffffffff8\n mov qword [rbp-200], rax\n mov rax, qword [rbp-200]\n mov qword [rbp-208], rax\n sub rsp, 0x00000000000000d0\n call _14\n add rsp, 0x00000000000000d0\n mov qword [rbp-208], 8\n mov rax, qword [rbp-208]\n leave\n ret\n\n\n_10:\n push rbp\n mov rbp, rsp\n mov qword [rbp+16], 0\n leave\n ret\n\n\n_11:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-17], rax\n mov rdx, qword [rbp-17]\n mov rax, qword [rdx+0]\n mov qword [rbp-9], rax\n mov rax, qword [rbp-9]\n cmp rax, 0\n jz __36_24\n mov byte [rbp-1], 0\n jmp __36_25\n __36_24:\n mov byte [rbp-1], 1\n __36_25:\n cmp byte [rbp-1], 0\n jz _11_27\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-25], rax\n mov rax, qword [rbp+24]\n mov qword [rbp-41], rax\n mov rax, qword [rbp-41]\n mov qword [rbp-57], rax\n sub rsp, 0x0000000000000039\n call _15\n add rsp, 0x0000000000000039\n mov rax, qword [rbp-49]\n mov qword [rbp-33], rax\n mov rdx, qword [rbp-25]\n mov rax, qword [rbp-33]\n mov qword [rdx+0], rax\n jmp _11_26\n _11_27:\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-25], rax\n mov rdx, qword [rbp-25]\n mov rax, qword [rdx+0]\n mov qword [rbp-33], rax\n mov rax, qword [rbp+24]\n mov qword [rbp-41], rax\n mov rax, qword [rbp-41]\n mov qword [rbp-65], rax\n mov rax, qword [rbp-33]\n mov qword [rbp-73], rax\n sub rsp, 0x0000000000000049\n call _16\n add rsp, 0x0000000000000049\n _11_28:\n _11_26:\n\nleave\nret\n\n_12:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-8], rax\n mov rdx, qword [rbp-8]\n mov rax, qword [rdx+0]\n mov qword [rbp-16], rax\n mov rax, qword [rbp+24]\n mov qword [rbp-24], rax\n mov rax, qword [rbp-24]\n mov qword [rbp-48], rax\n mov rax, qword [rbp-16]\n mov qword [rbp-56], rax\n sub rsp, 0x0000000000000038\n call _17\n add rsp, 0x0000000000000038\n mov rax, qword [rbp-40]\n mov qword [rbp+32], rax\n leave\n ret\n\n\n_13:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-17], rax\n mov rdx, qword [rbp-17]\n mov rax, qword [rdx+0]\n mov qword [rbp-25], rax\n mov rax, [rbp-25]\n add rax, 0x0000000000000008\n mov qword [rbp-33], rax\n mov rdx, qword [rbp-33]\n mov rax, qword [rdx+0]\n mov qword [rbp-9], rax\n mov rax, qword [rbp-9]\n cmp rax, 0\n jz __36_0\n mov byte [rbp-1], 0\n jmp __36_1\n __36_0:\n mov byte [rbp-1], 1\n __36_1:\n cmp byte [rbp-1], 0\n jz _13_2\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-49], rax\n mov rdx, qword [rbp-49]\n mov rax, qword [rdx+0]\n mov qword [rbp-57], rax\n mov rax, [rbp-57]\n add rax, 0x0000000000000000\n mov qword [rbp-65], rax\n mov rdx, qword [rbp-65]\n mov rax, qword [rdx+0]\n mov qword [rbp-41], rax\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-81], rax\n mov rdx, qword [rbp-81]\n mov rax, qword [rdx+0]\n mov qword [rbp-73], rax\n mov rdi, qword [rbp-73]\n sub rsp, 81\n extern free\n call free\n add rsp, 81\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-89], rax\n mov qword [rbp-97], 0\n mov rdx, qword [rbp-89]\n mov rax, qword [rbp-97]\n mov qword [rdx+0], rax\n mov rax, qword [rbp-41]\n mov qword [rbp+24], rax\n leave\n ret\n _13_3:\n _13_2:\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-41], rax\n mov rdx, qword [rbp-41]\n mov rax, qword [rdx+0]\n mov qword [rbp-49], rax\n mov rax, qword [rbp-49]\n mov qword [rbp-65], rax\n sub rsp, 0x0000000000000041\n call _18\n add rsp, 0x0000000000000041\n mov rax, qword [rbp-57]\n mov qword [rbp+24], rax\n leave\n ret\n\n\n_14:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-18], rax\n mov rdx, qword [rbp-18]\n mov rax, qword [rdx+0]\n mov qword [rbp-10], rax\n mov rax, qword [rbp-10]\n cmp rax, 0\n jz __36_4\n mov byte [rbp-2], 0\n jmp __36_5\n __36_4:\n mov byte [rbp-2], 1\n __36_5:\n mov al, byte [rbp-2]\n cmp al, 0\n jz __23_6\n mov byte [rbp-1], 0\n jmp __23_7\n __23_6:\n mov byte [rbp-1], 1\n __23_7:\n cmp byte [rbp-1], 0\n jz _14_8\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-26], rax\n mov rdx, qword [rbp-26]\n mov rax, qword [rdx+0]\n mov qword [rbp-34], rax\n mov rax, qword [rbp-34]\n mov qword [rbp-42], rax\n sub rsp, 0x000000000000002a\n call _19\n add rsp, 0x000000000000002a\n _14_9:\n _14_8:\n\nleave\nret\n\n_15:\n push rbp\n mov rbp, rsp\n mov rax, qword [rbp+16]\n mov qword [rbp-16], rax\n mov qword [rbp-8], 0\n mov rdi, 16\n sub rsp, 16\n extern malloc\n call malloc\n add rsp, 16\n mov qword [rbp-24], rax\n mov rdx, qword [rbp-24]\n mov rax, qword [rbp-16]\n mov qword [rdx+0], rax\n mov rax, qword [rbp-8]\n mov qword [rdx+8], rax\n mov rax, qword [rbp-24]\n mov qword [rbp+24], rax\n leave\n ret\n\n\n_16:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-17], rax\n mov rdx, qword [rbp-17]\n mov rax, qword [rdx+0]\n mov qword [rbp-9], rax\n mov rax, qword [rbp-9]\n cmp rax, 0\n jz __36_29\n mov byte [rbp-1], 0\n jmp __36_30\n __36_29:\n mov byte [rbp-1], 1\n __36_30:\n cmp byte [rbp-1], 0\n jz _16_32\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-25], rax\n mov rax, qword [rbp+24]\n mov qword [rbp-41], rax\n mov rax, qword [rbp-41]\n mov qword [rbp-57], rax\n sub rsp, 0x0000000000000039\n call _15\n add rsp, 0x0000000000000039\n mov rax, qword [rbp-49]\n mov qword [rbp-33], rax\n mov rdx, qword [rbp-25]\n mov rax, qword [rbp-33]\n mov qword [rdx+0], rax\n jmp _16_31\n _16_32:\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-25], rax\n mov rdx, qword [rbp-25]\n mov rax, qword [rdx+0]\n mov qword [rbp-33], rax\n mov rax, qword [rbp+24]\n mov qword [rbp-41], rax\n mov rax, qword [rbp-41]\n mov qword [rbp-65], rax\n mov rax, qword [rbp-33]\n mov qword [rbp-73], rax\n sub rsp, 0x0000000000000049\n call _16\n add rsp, 0x0000000000000049\n _16_33:\n _16_31:\n\nleave\nret\n\n_17:\n push rbp\n mov rbp, rsp\n mov rax, qword [rbp+24]\n mov qword [rbp-9], rax\n mov qword [rbp-17], 0\n mov rax, qword [rbp-9]\n cmp rax, qword [rbp-17]\n jz __16_20\n mov byte [rbp-1], 0\n jmp __16_21\n __16_20:\n mov byte [rbp-1], 1\n __16_21:\n cmp byte [rbp-1], 0\n jz _17_22\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-25], rax\n mov rdx, qword [rbp-25]\n mov rax, qword [rdx+0]\n mov qword [rbp+32], rax\n leave\n ret\n _17_23:\n _17_22:\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-25], rax\n mov rdx, qword [rbp-25]\n mov rax, qword [rdx+0]\n mov qword [rbp-33], rax\n mov rax, qword [rbp+24]\n mov qword [rbp-49], rax\n mov qword [rbp-57], 1\n mov rax, qword [rbp-49]\n sub rax, qword [rbp-57]\n mov qword [rbp-41], rax\n mov rax, qword [rbp-41]\n mov qword [rbp-81], rax\n mov rax, qword [rbp-33]\n mov qword [rbp-89], rax\n sub rsp, 0x0000000000000059\n call _17\n add rsp, 0x0000000000000059\n mov rax, qword [rbp-73]\n mov qword [rbp+32], rax\n leave\n ret\n\n\n_18:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-17], rax\n mov rdx, qword [rbp-17]\n mov rax, qword [rdx+0]\n mov qword [rbp-25], rax\n mov rax, [rbp-25]\n add rax, 0x0000000000000008\n mov qword [rbp-33], rax\n mov rdx, qword [rbp-33]\n mov rax, qword [rdx+0]\n mov qword [rbp-9], rax\n mov rax, qword [rbp-9]\n cmp rax, 0\n jz __36_16\n mov byte [rbp-1], 0\n jmp __36_17\n __36_16:\n mov byte [rbp-1], 1\n __36_17:\n cmp byte [rbp-1], 0\n jz _18_18\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-49], rax\n mov rdx, qword [rbp-49]\n mov rax, qword [rdx+0]\n mov qword [rbp-57], rax\n mov rax, [rbp-57]\n add rax, 0x0000000000000000\n mov qword [rbp-65], rax\n mov rdx, qword [rbp-65]\n mov rax, qword [rdx+0]\n mov qword [rbp-41], rax\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-81], rax\n mov rdx, qword [rbp-81]\n mov rax, qword [rdx+0]\n mov qword [rbp-73], rax\n mov rdi, qword [rbp-73]\n sub rsp, 81\n extern free\n call free\n add rsp, 81\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-89], rax\n mov qword [rbp-97], 0\n mov rdx, qword [rbp-89]\n mov rax, qword [rbp-97]\n mov qword [rdx+0], rax\n mov rax, qword [rbp-41]\n mov qword [rbp+24], rax\n leave\n ret\n _18_19:\n _18_18:\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-41], rax\n mov rdx, qword [rbp-41]\n mov rax, qword [rdx+0]\n mov qword [rbp-49], rax\n mov rax, qword [rbp-49]\n mov qword [rbp-65], rax\n sub rsp, 0x0000000000000041\n call _18\n add rsp, 0x0000000000000041\n mov rax, qword [rbp-57]\n mov qword [rbp+24], rax\n leave\n ret\n\n\n_19:\n push rbp\n mov rbp, rsp\n mov rax, [rbp+16]\n add rax, 0x0000000000000000\n mov qword [rbp-16], rax\n mov rdx, qword [rbp-16]\n mov rax, qword [rdx+0]\n mov qword [rbp-8], rax\n mov rdi, __8_fstr\n mov rsi, [rbp-8]\n mov al, 0\n sub rsp, 16\n extern printf\n call printf\n add rsp, 16\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-34], rax\n mov rdx, qword [rbp-34]\n mov rax, qword [rdx+0]\n mov qword [rbp-26], rax\n mov rax, qword [rbp-26]\n cmp rax, 0\n jz __36_10\n mov byte [rbp-18], 0\n jmp __36_11\n __36_10:\n mov byte [rbp-18], 1\n __36_11:\n mov al, byte [rbp-18]\n cmp al, 0\n jz __23_12\n mov byte [rbp-17], 0\n jmp __23_13\n __23_12:\n mov byte [rbp-17], 1\n __23_13:\n cmp byte [rbp-17], 0\n jz _19_14\n mov rax, [rbp+16]\n add rax, 0x0000000000000008\n mov qword [rbp-42], rax\n mov rdx, qword [rbp-42]\n mov rax, qword [rdx+0]\n mov qword [rbp-50], rax\n mov rax, qword [rbp-50]\n mov qword [rbp-58], rax\n sub rsp, 0x000000000000003a\n call _19\n add rsp, 0x000000000000003a\n _19_15:\n _19_14:\n\nleave\nret\n\nsection .data_readonly\n __42_fstr db `\\n`,0\n __8_fstr db `Integer: %ld\\n`,0 -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/build/out.asm b/build/out.asm ---- a/build/out.asm (revision 6a59973c20052dc147b44a0ab3d6d213f79b9664) -+++ b/build/out.asm (date 1722972940448) -@@ -139,14 +139,14 @@ - mov qword [rbp-9], rax - mov rax, qword [rbp-9] - cmp rax, 0 -- jz __36_24 -+ jz __36_16 - mov byte [rbp-1], 0 -- jmp __36_25 -- __36_24: -+ jmp __36_17 -+ __36_16: - mov byte [rbp-1], 1 -- __36_25: -+ __36_17: - cmp byte [rbp-1], 0 -- jz _11_27 -+ jz _11_19 - mov rax, [rbp+16] - add rax, 0x0000000000000000 - mov qword [rbp-25], rax -@@ -162,8 +162,8 @@ - mov rdx, qword [rbp-25] - mov rax, qword [rbp-33] - mov qword [rdx+0], rax -- jmp _11_26 -- _11_27: -+ jmp _11_18 -+ _11_19: - mov rax, [rbp+16] - add rax, 0x0000000000000000 - mov qword [rbp-25], rax -@@ -179,8 +179,8 @@ - sub rsp, 0x0000000000000049 - call _16 - add rsp, 0x0000000000000049 -- _11_28: -- _11_26: -+ _11_20: -+ _11_18: - - leave - ret -@@ -226,14 +226,14 @@ - mov qword [rbp-9], rax - mov rax, qword [rbp-9] - cmp rax, 0 -- jz __36_0 -+ jz __36_26 - mov byte [rbp-1], 0 -- jmp __36_1 -- __36_0: -+ jmp __36_27 -+ __36_26: - mov byte [rbp-1], 1 -- __36_1: -+ __36_27: - cmp byte [rbp-1], 0 -- jz _13_2 -+ jz _13_28 - mov rax, [rbp+16] - add rax, 0x0000000000000000 - mov qword [rbp-49], rax -@@ -268,8 +268,8 @@ - mov qword [rbp+24], rax - leave - ret -- _13_3: -- _13_2: -+ _13_29: -+ _13_28: - mov rax, [rbp+16] - add rax, 0x0000000000000000 - mov qword [rbp-41], rax -@@ -365,14 +365,14 @@ - mov qword [rbp-9], rax - mov rax, qword [rbp-9] - cmp rax, 0 -- jz __36_29 -+ jz __36_21 - mov byte [rbp-1], 0 -- jmp __36_30 -- __36_29: -+ jmp __36_22 -+ __36_21: - mov byte [rbp-1], 1 -- __36_30: -+ __36_22: - cmp byte [rbp-1], 0 -- jz _16_32 -+ jz _16_24 - mov rax, [rbp+16] - add rax, 0x0000000000000008 - mov qword [rbp-25], rax -@@ -388,8 +388,8 @@ - mov rdx, qword [rbp-25] - mov rax, qword [rbp-33] - mov qword [rdx+0], rax -- jmp _16_31 -- _16_32: -+ jmp _16_23 -+ _16_24: - mov rax, [rbp+16] - add rax, 0x0000000000000008 - mov qword [rbp-25], rax -@@ -405,8 +405,8 @@ - sub rsp, 0x0000000000000049 - call _16 - add rsp, 0x0000000000000049 -- _16_33: -- _16_31: -+ _16_25: -+ _16_23: - - leave - ret -@@ -419,14 +419,14 @@ - mov qword [rbp-17], 0 - mov rax, qword [rbp-9] - cmp rax, qword [rbp-17] -- jz __16_20 -+ jz __16_0 - mov byte [rbp-1], 0 -- jmp __16_21 -- __16_20: -+ jmp __16_1 -+ __16_0: - mov byte [rbp-1], 1 -- __16_21: -+ __16_1: - cmp byte [rbp-1], 0 -- jz _17_22 -+ jz _17_2 - mov rax, [rbp+16] - add rax, 0x0000000000000000 - mov qword [rbp-25], rax -@@ -435,8 +435,8 @@ - mov qword [rbp+32], rax - leave - ret -- _17_23: -- _17_22: -+ _17_3: -+ _17_2: - mov rax, [rbp+16] - add rax, 0x0000000000000008 - mov qword [rbp-25], rax -@@ -479,14 +479,14 @@ - mov qword [rbp-9], rax - mov rax, qword [rbp-9] - cmp rax, 0 -- jz __36_16 -+ jz __36_30 - mov byte [rbp-1], 0 -- jmp __36_17 -- __36_16: -+ jmp __36_31 -+ __36_30: - mov byte [rbp-1], 1 -- __36_17: -+ __36_31: - cmp byte [rbp-1], 0 -- jz _18_18 -+ jz _18_32 - mov rax, [rbp+16] - add rax, 0x0000000000000008 - mov qword [rbp-49], rax -@@ -521,8 +521,8 @@ - mov qword [rbp+24], rax - leave - ret -- _18_19: -- _18_18: -+ _18_33: -+ _18_32: - mov rax, [rbp+16] - add rax, 0x0000000000000008 - mov qword [rbp-41], rax diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024__15_58__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024__15_58__Changes_.xml deleted file mode 100644 index bd6e261..0000000 --- a/.idea/shelf/Uncommitted_changes_before_Update_at_07_08_2024__15_58__Changes_.xml +++ /dev/null @@ -1,14 +0,0 @@ - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 86fb287..7712e5e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -8,55 +8,33 @@ + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - - - { - "keyToString": { - "Cargo.Build `Run whython-8`.executor": "Run", - "Cargo.Run whython-8.executor": "Run", - "Cargo.Test whython-8.executor": "Run", - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.rust.reset.selective.auto.import": "true", - "Shell Script.Test Asm.executor": "Run", - "git-widget-placeholder": "dev", - "ignore.virus.scanning.warn.message": "true", - "last_opened_file_path": "/home/robertlucas/RustroverProjects/whython-8/src/root/builtin/functions", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", - "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "", - "org.rust.first.attach.projects": "true", - "settings.editor.selected.configurable": "tasks", - "vue.rearranger.settings.migration": "true" + +}]]> @@ -238,7 +216,7 @@ - @@ -334,6 +312,9 @@ + + +