Chapter 11 Flashcards

1
Q

What are the variable properties that have to be known inorder to compile variables?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The compiler uses variable tables to save variable properties.

Complete the blanks:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Methods must alwasys return something in Jack.

When compiling a void method, what should be pushed on to the stack before the return statment.

A

At the end of the copiled code, do:

push constant zero

return

This is a dummy value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Compile this expression:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Compile this expression:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly