Skip to content

Commit d48c669

Browse files
aykevldeadprogram
authored andcommitted
compiler-internals: fix bulleted list
They were rendered as one big list while there should have been a nested list.
1 parent adf3eeb commit d48c669

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/docs/concepts/compiler-internals/differences-from-go.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ weight: 8
77
* Interfaces are always represented as a `{typecode, value}` pair. Unlike Go [https://research.swtch.com/interfaces](https://research.swtch.com/interfaces), TinyGo will not precompute a list of function pointers for fast interface method calls. Instead, all interface method calls are looked up where they are used. This may sound expensive, but it sometimes avoids memory allocation at interface creation.
88
* Global variables are computed during compilation whenever possible (unlike Go, which does not have the equivalent of a `.data` section). This is an important optimization for several reasons:
99

10-
- Startup time is reduced. This is nice, but not the main reason.
11-
- Initializing globals by copying the initial data from flash to RAM costs much less flash space as only the actual data needs to be stored, instead of all instructions to initialize these globals.
12-
- Data can often be statically allocated instead of dynamically allocated at startup.
13-
- Dead globals are trivially optimized away by LLVM.
14-
- Constant globals are trivially recognized by LLVM and marked `constant`. This makes sure they can be stored in flash instead of RAM.
15-
- Global constants are useful for constant propagation and thus for dead code elimination (like an `if` that depends on a global variable).
10+
- Startup time is reduced. This is nice, but not the main reason.
11+
- Initializing globals by copying the initial data from flash to RAM costs much less flash space as only the actual data needs to be stored, instead of all instructions to initialize these globals.
12+
- Data can often be statically allocated instead of dynamically allocated at startup.
13+
- Dead globals are trivially optimized away by LLVM.
14+
- Constant globals are trivially recognized by LLVM and marked `constant`. This makes sure they can be stored in flash instead of RAM.
15+
- Global constants are useful for constant propagation and thus for dead code elimination (like an `if` that depends on a global variable).

0 commit comments

Comments
 (0)