I read thoughts in C ++ (volume 2):
Whenever a function is called, information about this function is pushed onto the run-time stack in an instance of an activation record (ARI), also called a stack frame. A typical stack frame contains (1) the address of the calling function (therefore, execution can return to it), (2) a pointer to the ORI of the static parent function (which lexically contains the called function, so global variables can be accessed by the function), and (3) a pointer to the function that he called (his dynamic parent). A path that follows logically from a dynamic chain or call chain repeated after dynamic parent relationships
I cannot understand what the author means as a function of static and dynamic parent. Also, I cannot distinguish between objects 1, 2, or 3. They all seem the same. Can someone explain this passage to me?
All this sounds very strange to me. Static frame pointers are commonly used in lexical-spoken languages such as functional languages and the pascal family with their nested functions. Globals are bound once at compile time or run time and do not need frame pointers. (1) but (2) does not exist in C ++, AFAIK.
, (3) . , , .
, ++, . 1) - - call . , pop ed , ( ++) 2) 3) , . (, ), , ( ) , ,
call
pop
Source: https://habr.com/ru/post/1738656/More articles:A regular expression that includes an exception (that is, "Does not contain") for grep - regexHow can I extract all links from a page except one using Perl WWW :: Mechanize? - perliphone - using UISwitch - iphonemercurial fails with a file named ---. config - in any way? - mercurialjQuery Toggle with Cookie - jqueryOpenStreetMap and Hadoop - postgresqlASP.NET - what happens when the HttpCookie expires - asp.netкак запустить цикл foreach с тройным условием - loopsWhat is the correct way to set the size of GUI elements? - javaПроверка формы с использованием Javascript внутри PHP - javascriptAll Articles