Grades:
- I am not asking what are the differences between dynamically typed and statically typed, be they advantages or disadvantages.
Can someone tell me how dynamic typing works in relation to the memory manager?
How the memory manager (or the part in charge) works to decide if it needs another memory address etc. (to store the data), creating it or expanding the current one if possible (speculation) etc.
For example (speculation): when the variable x = 5
is initialized and assigned to it x = "dynamically"
, the Z
manager part verifies that there is space for the new type, and acts accordingly, reserving a new memory address for the new type and assigning the new address to the initial variable. This is speculation because I don't know how it works exactly "I know there will be different implementations for the same thing" depending on the interpreter/compiler/etc.
What I would like to know is the general idea of Z
-> interpreter/compiler/etc. and the code in charge of such a task.
I've looked at some projects, including Google's V8 , but it's not a small project and I haven't been able to find the part that deals with such an issue, to figure out what the idea is of how it works Z
for the case of V8
.
The answer does not have to be based on V8
it can be on another language, interpreter etc, what interests me is the idea of how it works in x case, or in most cases, (but not a speculation about how it works) , and if possible I would like a reference to the part of the code that reflects the above idea.