Skip to content

Commit

Permalink
Merge pull request #3 from Dar9586/patch-1
Browse files Browse the repository at this point in the history
Update spec.md
  • Loading branch information
genkami authored Dec 29, 2020
2 parents b6f94b9 + 725135e commit a915d79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ push(-x);
```

### Isht
Isht pops two Ints `x` and `y`, and then pushes `x << y`.
Isht pops two Ints `y` and `x`, and then pushes `x << y`.

Pseudo code:

Expand Down Expand Up @@ -154,15 +154,15 @@ push("");
```

### Sadd
Sadd pops a String `s` and an Int `x`, appends the lowest 8 bits of `x` to `s`, then pushes `s`.
Sadd pops an Int `x` and a String `s`, appends the lowest 8 bits of `x` to `s`, then pushes `s`.

Pseudo code:

```
x: Int = pop();
s: String = pop();
s += (lowest 8 bits of x);
push(t);
push(s);
```

### Onew
Expand All @@ -175,7 +175,7 @@ push({});
```

### Oadd
Oadd pops an Object `o`, a String `k`, and an arbitrary value `v`, then sets `v` to `o[k]`, and then pushes `o`.
Oadd pops an arbitrary value `v`, a String `k` and an Object `o` , then sets `v` to `o[k]`, and then pushes `o`.

Pseudo code:

Expand All @@ -197,7 +197,7 @@ push([]);
```

### Aadd
Aadd pops an Array `a` and an arbitrary value `x`, appends `x` to `a`, and then pushes `a`.
Aadd pops an arbitrary value `x` and an Array `a`, appends `x` to `a`, and then pushes `a`.

Pseudo code:

Expand Down

0 comments on commit a915d79

Please sign in to comment.