-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Tun #1666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xssnick
wants to merge
605
commits into
ton-blockchain:testnet-tunnel
Choose a base branch
from
xssnick:tun
base: testnet-tunnel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Tun #1666
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* not always gh mac runners have nproc utility * deprecate Ubuntu 20.04 * fix linking issues of portable tonlibjson.dylib * fix libemulator.dylib linking issues
Merge developing branch
Now, only VarDescr::int_const represents whether it's a constant, without being combined (and potentially become unsync) val bit.
Support declaring structures with arbitrary fields and creating objects very similar to TS syntax. Structs are actually tensors on a stack, and accessing their fields behave exactly as accessing tensor's elements by index. As a consequence, recurring struct fields doesn't work; it will lead to infinity size. All features of type system (nullables, unions) seamlessly work with structures. A struct with 1 field has no extra overhead, it's just a field on a stack.
Now fields can have default values, even complex ones: > tensor: (int, coins) = (2, ton("0.05")) Initial value must be a constant expression. Global constants can also now be of any type, including tensors and nullables. Constant evaluator was almost dropped off, evaluation is now done at IR (Ops) level.
Until this MR, parsing any type from tokens immediately resulted in TypePtr. This MR introduces an intermediate AST representation for types, which are resolved at a later step. It's a necessary refactoring towards generics.
Now structures can be generic: Container<T> and similar. The same goes for type aliases: type A<T> = Container<T>. Like generic functions, every struct is instantiated, "Container<int>" and "Container<slice>" become different symbols, and on instantiation they walk though the pipeline. Type inferring and checking are done only upon instantiation.
This update greatly enhances reading Fift output: 1) stack comments are aligned 2) original lines from .tolk files are output as comments, grouping asm instructions Internally, every AsmOp now has SrcLocation. When outputting them one by one, an original .tolk line is inserted if locations differ. This can be optimized later by storing an index to fast mapping of location (offset) into a line in a file.
In FunC, any function could be called `f(arg)` or `arg.f()`. You had to call `cell.cell_hash()` / `slice.slice_hash()`: these were two different global-scope functions. Now, Tolk, as other languages, separates functions from methods. It drops the ability to call a function via dot; you can only call a method (for an object type). > fun cell.hash(self): int ... > fun slice.hash(self): int ... With methods, stdlib functions became short: `t.size()` instead of `t.tupleSize()`, and so on. Methods can be declared for any type, including generics. Calling a method, the compiler does type matching to detect the only method from many equally named. This could be generalized to functions overloading some day.
This is now valid: > struct Container<T = int?> { item: T = null } > Container{} // does Container<int?> Defaults for Ts work both for functions and structs. Their main purpose is to have the `never` default: > struct WithOptField<T = never> { f: T; } I've added a rule that if a struct has the `never` field, it can be missed out from a literal while creation (like it doesn't exist at all). This will be used in stdlib later.
This partially "reverts" the behavior of pragma 'compute-asm-ltr' from FunC, which was always on in Tolk. Now, if it's safe, for asm functions with arg_order, arguments are evaluated and placed onto the stack in a desired order. When it's unsafe (the purpose of this pragma, actually), arguments are evaluated left-to-right.
Tolk v0.12: structures, generics, and methods
ArchiveFile::start_up() truncates packfiles unconditionally, causing unneeded filesystem writes (mtime) and complicating auditing on file level. Co-authored-by: mkiesel <[email protected]>
Previously, `never` could be specified, but was not auto-inferred. (because it's done the same way in TypeScript) Now, it's auto-inferred, which is more expected in our case.
…#1800) * add libgslcblas into portable binaries * remove commented line * update target OSX for macos 15 * ensure system headers come from the right macOS SDK.
…#1800) * add libgslcblas into portable binaries * remove commented line * update target OSX for macos 15 * ensure system headers come from the right macOS SDK.
Fix failing Github MacOS actions due to updated XCode (ton-blockchain#1800)
Tolk v1.1: built-in map<K,V>, enums, private and readonly fields, methods overloading
…on-blockchain#1808) * add libgslcblas into portable binaries * remove commented line * fix portable linux binaries * force llvm jammy installation on ubuntu 22.04
Version 12: new bounce, BTOS, HASHBU opcodes
…lator (ton-blockchain#1814) Co-authored-by: SpyCheese <[email protected]>
Co-authored-by: SpyCheese <[email protected]>
Leave HASHSU gas coas as is (ton-blockchain#1818)
test-smartcont: decrease number of keys in multisig
Merge Tolk 1.1 to testnet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.