Skip to content

Instantly share code, notes, and snippets.

@tomstuart
Created April 12, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomstuart/fb81c71a3c472c62d03c to your computer and use it in GitHub Desktop.
Save tomstuart/fb81c71a3c472c62d03c to your computer and use it in GitHub Desktop.
before function call: at start of function call:
ARG: args for caller args for caller
saved state for caller saved state for caller
LCL: locals for caller locals for caller
stack for caller stack for caller
args for callee --> ARG: args for callee
SP: saved state for callee
LCL: locals for callee
SP:
|
V
after function call: at finish of function call:
ARG: args for caller args for caller
saved state for caller saved state for caller
LCL: locals for caller locals for caller
stack for caller stack for caller
return value for callee <-- ARG: args for callee
SP: saved state for callee
LCL: locals for callee
stack for callee
return value for callee
SP:
before function call: | at start of function call: | at finish of function call: | after function call:
| | |
ARG: args for caller | args for caller | args for caller | ARG: args for caller
saved state for caller | saved state for caller | saved state for caller | saved state for caller
LCL: locals for caller | locals for caller | locals for caller | LCL: locals for caller
stack for caller | stack for caller | stack for caller | stack for caller
args for callee | ARG: args for callee | ARG: args for callee | return value for callee
SP: | saved state for callee | saved state for callee | SP:
| LCL: locals for callee | LCL: locals for callee |
| SP: | stack for callee |
| | return value for callee |
| | SP: |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment