mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated fift/func
This commit is contained in:
parent
b6f6788532
commit
d41ce55305
31 changed files with 717 additions and 66 deletions
|
@ -102,13 +102,15 @@ unsigned long long get_special_value(std::string str) {
|
|||
unsigned long long val = 0;
|
||||
int bits = 0;
|
||||
if (str[0] == '#') {
|
||||
while (i < n) {
|
||||
int c = str[i++];
|
||||
for (; i < n; i++) {
|
||||
int c = str[i];
|
||||
if (c == '_') {
|
||||
break;
|
||||
}
|
||||
if (c >= '0' && c <= '9') {
|
||||
c -= '0';
|
||||
} else if (c >= 'A' && c <= 'F') {
|
||||
c -= 'A' - 10;
|
||||
} else if (c >= 'a' && c <= 'f') {
|
||||
c -= 'a' - 10;
|
||||
} else {
|
||||
|
@ -146,6 +148,9 @@ unsigned long long get_special_value(std::string str) {
|
|||
while (bits && !((val >> (64 - bits)) & 1)) {
|
||||
--bits;
|
||||
}
|
||||
if (bits) {
|
||||
--bits;
|
||||
}
|
||||
}
|
||||
if (bits == 64) {
|
||||
return 0;
|
||||
|
|
|
@ -33,6 +33,12 @@ const NatWidth t_Nat{32};
|
|||
const Anything t_Anything;
|
||||
const RefAnything t_RefCell;
|
||||
|
||||
std::string TLB::get_type_name() const {
|
||||
std::ostringstream os;
|
||||
print_type(os);
|
||||
return os.str();
|
||||
}
|
||||
|
||||
bool Bool::print_skip(PrettyPrinter& pp, vm::CellSlice& cs) const {
|
||||
int t = get_tag(cs);
|
||||
return cs.advance(1) && pp.out(t ? "bool_true" : "bool_false");
|
||||
|
|
|
@ -196,6 +196,7 @@ class TLB {
|
|||
virtual std::ostream& print_type(std::ostream& os) const {
|
||||
return os << "<unknown-TLB-type>";
|
||||
}
|
||||
std::string get_type_name() const;
|
||||
virtual bool print_skip(PrettyPrinter& pp, vm::CellSlice& cs) const;
|
||||
virtual bool print(PrettyPrinter& pp, const vm::CellSlice& cs) const {
|
||||
vm::CellSlice cs_copy{cs};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue