1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00
ton/tolk
tolk-vm 974d76c5f6
[Tolk] bool type (-1/0 int under the hood)
Comparison operators `== / >= /...` return `bool`.
Logical operators `&& ||` return bool.
Constants `true` and `false` have the `bool` type.
Lots of stdlib functions return `bool`, not `int`.

Operator `!x` supports both `int` and `bool`.
Condition of `if` accepts both `int` and `bool`.
Arithmetic operators are restricted to integers.
Logical `&&` and `||` accept both `bool` and `int`.

No arithmetic operations with bools allowed (only bitwise and logical).
2025-01-15 15:38:47 +03:00
..
abscode.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
analyzer.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
asmops.cpp [Tolk] AST-based semantic analysis, get rid of Expr 2025-01-13 20:28:44 +07:00
ast-from-tokens.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
ast-from-tokens.h [Tolk] AST-based semantic analysis, get rid of Expr 2025-01-13 20:28:44 +07:00
ast-replacer.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
ast-replicator.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
ast-stringifier.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
ast-visitor.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
ast.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
ast.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
builtins.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
CMakeLists.txt [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
codegen.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
compiler-state.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
compiler-state.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
constant-evaluator.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
constant-evaluator.h [Tolk] AST-based semantic analysis, get rid of Expr 2025-01-13 20:28:44 +07:00
fwd-declarations.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
generics-helpers.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
generics-helpers.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
lexer.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
lexer.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
optimize.cpp [Tolk] Embedded stdlib.tolk, CompilerState, strict includes 2024-11-02 01:33:08 +04:00
pipe-ast-to-legacy.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
pipe-calc-rvalue-lvalue.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-check-pure-impure.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-check-rvalue-lvalue.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-constant-folding.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
pipe-detect-unreachable.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-discover-parse-sources.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-find-unused-symbols.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-generate-fif-output.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-infer-types-and-calls.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
pipe-optimize-boolean-expr.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
pipe-refine-lvalue-for-mutate.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-register-symbols.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
pipe-resolve-identifiers.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
pipeline.h [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
platform-utils.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
src-file.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
src-file.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
stack-transform.cpp [Tolk] Initial commit of TOLK Language: fork all sources from FunC 2024-11-02 01:33:08 +04:00
symtable.cpp [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
symtable.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
tolk-main.cpp [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
tolk-version.h [Tolk] v0.6 syntax: fun, import, var, types on the right, etc. 2024-11-02 03:44:13 +04:00
tolk-wasm.cpp [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
tolk.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
tolk.h [Tolk] Rewrite the type system from Hindley-Milner to static typing 2025-01-15 15:38:43 +03:00
type-system.cpp [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00
type-system.h [Tolk] bool type (-1/0 int under the hood) 2025-01-15 15:38:47 +03:00