Perl virtual machine: Difference between revisions

Content deleted Content added
Data structures
Stacks
Line 37:
 
The internal data structures can be examined with B Perl module<ref name="B" /> or other specialized tools like Devel::Peek Perl module<ref>{{cite web | url=http://search.cpan.org/perldoc?Devel::Peek | title=Devel::Peek - A data debugging tool for the XS programmer}}</ref>.
 
===Stacks===
Perl has a number of stacks to store things it's currently working on.
 
====Argument stack====
Arguments are passed to opcode and returned from opcode using the argument stack. The typical way to handle arguments is to pop them off the stack, and then push the result back onto the stack.
 
====Mark stack====
This stack saves bookmarks to locations in the argument stack usable by each function so the functions doesn't necessarily get the whole argument stack to itself.
 
====Save stack====
This stack is used for saving and restoring a value of dynamically [[Scope (programming)|scoped]] local variable.
 
====Scope stack====
This stack stores information about actual scope and it is used only for debugging purposes.
 
===Other implementations===