1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Add namespaces to Fift (#641)

* Add fift-based disassembler

* Fift improvements: namespaces, hashmaps, flow controls

* Fift: add lib with better block structuring and more

* Minor changes in fift HashMap + tests (#643)

* Minor changes in fift HashMap

* Add tests for extended fift

---------

Co-authored-by: OmicronTau <omicron@ton.org>
Co-authored-by: Tolya <1449561+tolya-yanot@users.noreply.github.com>
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2023-03-10 14:16:29 +03:00 committed by GitHub
parent 4590ed381b
commit 865ebfce8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 2323 additions and 699 deletions

View file

@ -75,8 +75,8 @@ std::string dump_xchg(CellSlice&, unsigned args) {
if (!x || x >= y) {
return "";
}
std::ostringstream os{"XCHG s"};
os << x << ",s" << y;
std::ostringstream os;
os << "XCHG s" << x << ",s" << y;
return os.str();
}
@ -92,7 +92,7 @@ int exec_xchg1(VmState* st, unsigned args) {
int exec_dup(VmState* st) {
Stack& stack = st->get_stack();
VM_LOG(st) << "execute DUP\n";
VM_LOG(st) << "execute DUP";
stack.check_underflow(1);
stack.push(stack.fetch(0));
return 0;
@ -100,7 +100,7 @@ int exec_dup(VmState* st) {
int exec_over(VmState* st) {
Stack& stack = st->get_stack();
VM_LOG(st) << "execute OVER\n";
VM_LOG(st) << "execute OVER";
stack.check_underflow(2);
stack.push(stack.fetch(1));
return 0;
@ -126,7 +126,7 @@ int exec_push_l(VmState* st, unsigned args) {
int exec_drop(VmState* st) {
Stack& stack = st->get_stack();
VM_LOG(st) << "execute DROP\n";
VM_LOG(st) << "execute DROP";
stack.check_underflow(1);
stack.pop();
return 0;
@ -134,7 +134,7 @@ int exec_drop(VmState* st) {
int exec_nip(VmState* st) {
Stack& stack = st->get_stack();
VM_LOG(st) << "execute NIP\n";
VM_LOG(st) << "execute NIP";
stack.check_underflow(2);
stack.pop(stack[1]);
return 0;