From d3a4bec34db3092769523437e23a8a5a5d87539a Mon Sep 17 00:00:00 2001 From: Robert-M-Lucas Date: Sun, 28 Jul 2024 00:33:44 +0100 Subject: [PATCH] Begun work towards heap allocation --- .../shelved.patch | 77 ++++++++++++ Cargo.lock | 11 ++ Cargo.toml | 1 + build/out.asm | 114 ++++++------------ build/out.o | Bin 1312 -> 1088 bytes build/out.out | Bin 16840 -> 16832 bytes main.why | 32 ++--- src/root.rs | 13 +- src/root/compiler/assembly/heap.rs | 18 +++ src/root/compiler/assembly/mod.rs | 1 + src/root/compiler/compile_function.rs | 3 +- src/root/compiler/evaluation/into.rs | 20 ++- src/root/compiler/evaluation/new.rs | 40 ++++-- src/root/compiler/evaluation/reference.rs | 8 +- src/root/compiler/evaluation/type_only.rs | 6 +- .../parser/parse_function/parse_evaluable.rs | 1 + .../parse_function/parse_struct_init.rs | 6 +- src/root/runner.rs | 11 +- todo.md | 6 +- 19 files changed, 237 insertions(+), 131 deletions(-) create mode 100644 .idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch create mode 100644 src/root/compiler/assembly/heap.rs 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 new file mode 100644 index 0000000..63fe313 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Update_at_27_07_2024,_23_06_[Changes]/shelved.patch @@ -0,0 +1,77 @@ +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