@@ -43,14 +43,14 @@ if (token == '(') {
43
43
...
44
44
```
45
45
46
- The type for current identifier(i.e. function name) had already been set
47
- correctly. The above chunk of code set the type(i.e. `Fun`) and the
46
+ The type for current identifier (i.e. function name) had already been set
47
+ correctly. The above chunk of code set the type (i.e. `Fun`) and the
48
48
address in `text segment` for the function. Here comes `parameter_decl` and
49
49
`body_decl`.
50
50
51
51
## Parameters and Assembly Output
52
52
53
- Before we get our hand dirty, we have to understand the assembly code that
53
+ Before we get our hands dirty, we have to understand the assembly code that
54
54
will be output for a function. Consider the following:
55
55
56
56
```c
@@ -62,8 +62,8 @@ int demo(int param_a, int *param_b) {
62
62
}
63
63
```
64
64
65
- When ` demo ` is called, its calling frame(states of stack) will look like the
66
- following (please refer the the VM of chapter 2):
65
+ When ` demo ` is called, its calling frame (states of stack) will look like the
66
+ following (please refer to the VM of chapter 2):
67
67
68
68
```
69
69
| .... | high address
@@ -83,7 +83,7 @@ following(please refer the the VM of chapter 2):
83
83
| .... | low address
84
84
```
85
85
86
- The key point here is no matter it is parameter(e.g. ` param_a ` ) or local
86
+ The key point here is no matter if it is a parameter (e.g. ` param_a ` ) or local
87
87
variable (e.g. ` local_1 ` ), they are all store on ** stack** . Thus they are
88
88
referred to by pointer ` new_bp ` and relative shfitment, while global variables
89
89
which are stored in ` text segment ` are refered to by direct address. So we
0 commit comments