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 d110022731
[Tolk] Implement logical operators && ||
Unary logical NOT was already implemented earlier.
Logical AND OR are expressed via conditional expression:
* a && b  ->  a ? (b != 0) : 0
* a || b  ->  a ? 1 : (b != 0)
They work as expected in any expressions. For instance, having
`cond && f()`, f is called only if cond is true.
For primitive cases, like `a > 0 && b > 0`, Fift code is not optimal,
it could potentially be without IFs.
These are moments of future optimizations. For now, it's more than enough.
2024-11-02 03:44:14 +04:00
..
abscode.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
analyzer.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
asmops.cpp [Tolk] Tolk v0.5.0 as FunC v0.5.0 could have been like 2024-11-02 01:33:08 +04:00
ast-from-tokens.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
ast-from-tokens.h [Tolk] Compilation pipeline, register global symbols in advance 2024-11-02 01:33:09 +04:00
ast-replacer.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
ast-stringifier.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
ast-visitor.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
ast.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
ast.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
builtins.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
CMakeLists.txt [Tolk] Get rid of ton_crypto dependency, embed address parsing 2024-11-02 03:44:14 +04:00
codegen.cpp [Tolk] v0.6 syntax: fun, import, var, types on the right, etc. 2024-11-02 03:44:13 +04:00
compiler-state.cpp [Tolk] v0.6 syntax: fun, import, var, types on the right, etc. 2024-11-02 03:44:13 +04:00
compiler-state.h [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
gen-abscode.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
lexer.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
lexer.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
optimize.cpp [Tolk] Embedded stdlib.tolk, CompilerState, strict includes 2024-11-02 01:33:08 +04:00
pipe-ast-to-legacy.cpp [Tolk] Implement logical operators && || 2024-11-02 03:44:14 +04:00
pipe-discover-parse-sources.cpp [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
pipe-find-unused-symbols.cpp [Tolk] v0.6 syntax: fun, import, var, types on the right, etc. 2024-11-02 03:44:13 +04:00
pipe-generate-fif-output.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
pipe-register-symbols.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
pipeline.h [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
platform-utils.h [Tolk] Rewrite lexer, spaces are not mandatory anymore 2024-11-02 01:33:08 +04:00
src-file.cpp [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
src-file.h [Tolk] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04: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] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
symtable.h [Tolk] Implement logical operators && || 2024-11-02 03:44:14 +04: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] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +04:00
tolk.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
type-expr.h [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00
unify-types.cpp [Tolk] Get rid of ~tilda with mutate and self methods 2024-11-02 03:44:14 +04:00