1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
prefix notation. What would be the expression in postfix notation?
OO language: Class-level vs. Method-level variables and their corresponding memory segment NAME
Class-level:
Static = Static variable (class-level)
this = Private Variable (object-level)
Method-level:
local = local variable
argument = argument variable
HIGHER-LEVEL JACK:
Prior calling a method with n arguments, the compiler has to push … arguments to the stack.
n+1 arguments [this, nArgs]
In Jack, what does “this” point to?
What about LCL and ARG?
this points to the base address of an OBJECTS field variables, stored in the heap.
LCL and ARG point to local variables and argument variables of method/function, stored in the stack.
Define scope, segment of the following Jack language syntax:
static
field
var
argument
static: class-level, static segment RAM[16–255]
field: object-level, heap
var: subroutine-level, stack
argument: subroutine-level, stack