Click here to Skip to main content
15,881,413 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Debate reactive programming with me! Pin
Gerry Schmitz18-Jan-23 5:16
mveGerry Schmitz18-Jan-23 5:16 
AnswerRe: Debate reactive programming with me! Pin
jschell22-Jan-23 8:50
jschell22-Jan-23 8:50 
AnswerRe: Debate reactive programming with me! Pin
jochance7-Mar-23 9:38
jochance7-Mar-23 9:38 
QuestionHeap stack allocation Pin
trønderen15-Jan-23 13:10
trønderen15-Jan-23 13:10 
AnswerRe: Heap stack allocation Pin
jschell22-Jan-23 9:08
jschell22-Jan-23 9:08 
GeneralRe: Heap stack allocation Pin
trønderen23-Jan-23 4:26
trønderen23-Jan-23 4:26 
GeneralRe: Heap stack allocation Pin
jschell24-Jan-23 10:09
jschell24-Jan-23 10:09 
GeneralRe: Heap stack allocation Pin
jsc4225-Jan-23 1:15
professionaljsc4225-Jan-23 1:15 
trønderen wrote:
In languages with a static link (I haven't been working with any more recent one than Pascal; most newer languages don't have a static link), code of an inner function may address locations in frames lower on the stack. However, they do not do this by negative offsets (or positive, if the stack is growing downwards) from their own frame pointer. Rather, they use the static link to find the stack frame of the outer function, and do relative addressing from that frame base address - as if it was a pointer to a struct. The addressing never goes outside that frame.

In the late 1970s, I had a project to optimise expression evaluation in Pascal (based on the Pascal PCode compiler). As you surmised, in the PCode compiler, accessing higher nested values from lower nested functions did skip down the stack frame back pointers (one skip per depth of nesting); but that is an implementation technique, it is not part of the language definition. I guessed that it could be improved by maintaining a vector of nested stack frame start locations to access stack specific offsets directly using this vector. This proved to be a useful optimisation for evaluating expressions. However, when I ran comparisons on a large Pascal program (my test large program was the original version of the PCode compiler) I discovered that whilst the overheads for evaluating expressions were reduced, the number of times that the test program actually accessed variables in higher scopes was so low that the overhead of maintaining the vector outweighed the advantages of having the vector.
GeneralRe: Heap stack allocation Pin
harold aptroot23-Jan-23 1:03
harold aptroot23-Jan-23 1:03 
GeneralRe: Heap stack allocation Pin
trønderen23-Jan-23 4:46
trønderen23-Jan-23 4:46 
GeneralRe: Heap stack allocation Pin
jschell24-Jan-23 10:12
jschell24-Jan-23 10:12 
QuestionSetting Up Client Test Environments Pin
Kevin Marois28-Dec-22 9:48
professionalKevin Marois28-Dec-22 9:48 
AnswerRe: Setting Up Client Test Environments Pin
jschell17-Jan-23 4:34
jschell17-Jan-23 4:34 
AnswerRe: Setting Up Client Test Environments Pin
jochance7-Mar-23 19:23
jochance7-Mar-23 19:23 
QuestionHas x:bind in WinUI 3 effectively killed commanding and converters? Pin
greatoceansoftware23-Dec-22 5:53
greatoceansoftware23-Dec-22 5:53 
AnswerRe: Has x:bind in WinUI 3 effectively killed commanding and converters? Pin
Gerry Schmitz28-Dec-22 16:24
mveGerry Schmitz28-Dec-22 16:24 
GeneralRe: Has x:bind in WinUI 3 effectively killed commanding and converters? Pin
greatoceansoftware29-Dec-22 14:56
greatoceansoftware29-Dec-22 14:56 
QuestionImplementing Google Contacts in WPF App Pin
Kevin Marois13-Dec-22 6:31
professionalKevin Marois13-Dec-22 6:31 
AnswerRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz14-Dec-22 9:08
mveGerry Schmitz14-Dec-22 9:08 
GeneralRe: Implementing Google Contacts in WPF App Pin
Kevin Marois14-Dec-22 10:22
professionalKevin Marois14-Dec-22 10:22 
GeneralRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz15-Dec-22 8:07
mveGerry Schmitz15-Dec-22 8:07 
GeneralRe: Implementing Google Contacts in WPF App Pin
Kevin Marois15-Dec-22 12:27
professionalKevin Marois15-Dec-22 12:27 
GeneralRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz15-Dec-22 16:30
mveGerry Schmitz15-Dec-22 16:30 
GeneralRe: Implementing Google Contacts in WPF App Pin
Kevin Marois15-Dec-22 18:15
professionalKevin Marois15-Dec-22 18:15 
GeneralRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz16-Dec-22 2:06
mveGerry Schmitz16-Dec-22 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.