blob: fb452325cdc05a13f887025222b077c44090a084 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!--
SPDX-FileCopyrightText: 2024 Himbeer <himbeer@disroot.org>
SPDX-License-Identifier: CC-BY-NC-SA-4.0
-->
# Primitive types
* int8, uint8 -> QBE b, w
* int16, uint16 -> QBE h, w
* int32, uint32 -> QBE w, w
* int64, uint64 -> QBE l, l
# Coercion
* Integer widening
# Declaration and mutability
* Variables need to be declared before being used
* All declarations (including globals and implicit declarations from imports) must be above their first use
* Redeclarations ("shadowing") are forbidden
* Variables may be changed using the "assign" statement
* Constants cannot be changed, but mutables can
* Local mutables are allocated on the stack, local constants are QBE temporaries
|