Skip to content

Commit

Permalink
docs: fix typos (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
omahs authored Jul 14, 2024
1 parent b780547 commit ef1e842
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ to compile Wasm or HIR modules/programs to Miden Assembly and test them.

> [!TIP]
> We've published initial [documentation](https://0xpolygonmiden.github.io/compiler)
> in mdBook format for easier reading, also accesible in the `docs` directory. This documentation
> in mdBook format for easier reading, also accessible in the `docs` directory. This documentation
> covers how to get started with the compiler, provides a couple guides for currently supported
> use cases, and contains appendices that go into detail about various design aspects of the
> toolchain.
Expand Down
8 changes: 4 additions & 4 deletions docs/src/appendix/calling_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Interacting with memory in Miden is quite similar to WebAssembly in some ways:

* The address space is linear, with addresses starting at zero, and ranging up to 2^32-1
* There is no memory protection per se, you either have full read/write access, or no access to a specific memory context
* How memory is used is completely up the program being executed
* How memory is used is completely up to the program being executed

This is where it begins to differ though, and takes on qualities unique to Miden (in part, or whole):

Expand Down Expand Up @@ -194,10 +194,10 @@ are allocated space in a reserved region of linear memory in a single consecutiv
and because Miden is a Harvard architecture machine, there are no return addresses. Instead, languages (such as C) which have the concept
of a stack frame with implications for the semantics of say, taking the address of a local variable, will need to emit code in function
prologues and epilogues to maintain a shadow stack in Miden's linear memory. If all you need is local variables, you can get away with
leaning on Miden's notion of local variables without implenting a shadow stack.
leaning on Miden's notion of local variables without implementing a shadow stack.

Because there are no registers, the notion of callee-saved or caller-saved registers does not have a direct equivalent in Miden. However,
in its place, a somewhat equivalent set of rules defines the contract betweeen caller and callee in terms of the state of the operand stack,
in its place, a somewhat equivalent set of rules defines the contract between caller and callee in terms of the state of the operand stack,
those are described below in the section covering the operand stack.

### The shadow stack
Expand Down Expand Up @@ -257,7 +257,7 @@ Functions in Miden IR always have a signature, which specify the following:

* The calling convention required to call the function
* The number and types of the function arguments
* The type of value, if any, returned by by the function, and whether it is returned by value or reference
* The type of value, if any, returned by the function, and whether it is returned by value or reference

The following table relates IR types to how they are expected to be passed from the caller to the callee, and vice versa:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/guides/rust_to_wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ modules and compile them on to Miden Assembly, which will be covered in the next
## Setup

First, let's set up a simple Rust project that contains an implementation of the Fibonacci
function (I know, its overdone, but we're trying to keep things as simple as possible to
function (I know, it's overdone, but we're trying to keep things as simple as possible to
make it easier to show the results at each step, so bear with me):

Start by creating a new library crate:
Expand Down Expand Up @@ -41,7 +41,7 @@ crate-type = ["cdylib"]
[dependencies]
# Use a tiny allocator in place of the default one, if we want
# to make use of types in the `alloc` crate, e.g. String. We
# don't need that now, but its good information to have in hand.
# don't need that now, but it's good information to have in hand.
#wee_alloc = "0.4"

# When we build for Wasm, we'll use the release profile
Expand Down
4 changes: 2 additions & 2 deletions docs/src/guides/wasm_to_masm.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Compiling WebAssembly to Miden Assembly

This chapter will walk you through compiling a WebAssembly (Wasm) module, in binary form
(i.e. a `.wasm` file), to an corresponding Miden Assembly (Masm) module (i.e. a `.masm` file).
(i.e. a `.wasm` file), to a corresponding Miden Assembly (Masm) module (i.e. a `.masm` file).

## Setup

Expand Down Expand Up @@ -80,7 +80,7 @@ the code we generate will match what you would write by hand.
> [!NOTE]
> This example is more complicated than it needs to be at the moment, bear with us!
Assuming you have followed the instruction for installing the Miden VM locally,
Assuming you have followed the instructions for installing the Miden VM locally,
we can test this program out as follows:

First, we need to define a program to link our `wasm_fib.masm` module into, since
Expand Down

0 comments on commit ef1e842

Please sign in to comment.