1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 19:22:37 +00:00
ton/tolk
tolk-vm d9dba320cc
[Tolk] Get rid of ~tilda with mutate and self methods
This is a very big change.
If FunC has `.methods()` and `~methods()`, Tolk has only dot,
one and only way to call a `.method()`.
A method may mutate an object, or may not.
It's a behavioral and semantic difference from FunC.

- `cs.loadInt(32)` modifies a slice and returns an integer
- `b.storeInt(x, 32)` modifies a builder
- `b = b.storeInt()` also works, since it not only modifies, but returns
- chained methods also work, they return `self`
- everything works exactly as expected, similar to JS
- no runtime overhead, exactly same Fift instructions
- custom methods are created with ease
- tilda `~` does not exist in Tolk at all
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] Completely rework stdlib: multiple files and renaming 2024-11-02 03:44:13 +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] Get rid of ~tilda with mutate and self methods 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] Get rid of ~tilda with mutate and self methods 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