Skip to content

Commit 71af032

Browse files
committed
some lesson 6 grammar fixes
1 parent 827baa7 commit 71af032

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tutorial/en/6-Functions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ if (token == '(') {
4343
...
4444
```
4545
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
4848
address in `text segment` for the function. Here comes `parameter_decl` and
4949
`body_decl`.
5050
5151
## Parameters and Assembly Output
5252
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
5454
will be output for a function. Consider the following:
5555
5656
```c
@@ -62,8 +62,8 @@ int demo(int param_a, int *param_b) {
6262
}
6363
```
6464

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):
6767

6868
```
6969
| .... | high address
@@ -83,7 +83,7 @@ following(please refer the the VM of chapter 2):
8383
| .... | low address
8484
```
8585

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
8787
variable (e.g. `local_1`), they are all store on **stack**. Thus they are
8888
referred to by pointer `new_bp` and relative shfitment, while global variables
8989
which are stored in `text segment` are refered to by direct address. So we

0 commit comments

Comments
 (0)