From ed8fa311049a69177ce92c3a8268ff09e26ebea2 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 3 Mar 2018 16:15:13 +0000 Subject: [PATCH] more notes --- NOTES | 8 ++++++++ sandbox/c/NOTES.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/NOTES b/NOTES index 65c328a..02cdd7f 100644 --- a/NOTES +++ b/NOTES @@ -1,3 +1,11 @@ +Been thinking about the stack and heap a lot. It would be possible, though +possibly painful, to enforce a language with no global heap. The question really +is: what are the principles which give reason to do so? What are the principles +of this language, period? The principles are different than the use-cases. They +don't need to be logically rigorous (at first anyway). + +########## + I need to prioritize the future of this project a bit more. I've been thinking I'm going to figure this thing out at this level, but I shouldn't even be working here without a higher level view. diff --git a/sandbox/c/NOTES.md b/sandbox/c/NOTES.md index 6e0c81c..3a43cee 100644 --- a/sandbox/c/NOTES.md +++ b/sandbox/c/NOTES.md @@ -258,3 +258,34 @@ void _start() { - The subsequent `mov %rax,-0x8(%rsp)` is moving the pointer (stored in `%rax`) and putting it onto the stack. + +## VLA + +With the following file: + +```c +// main.c +void do_the_thing(int n) { + int arr[n]; + for (int i=0; i