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

pow-testgiver support

This commit is contained in:
ton 2020-07-06 17:07:20 +03:00
parent dbde9c1c40
commit f064b1047a
257 changed files with 6665 additions and 2608 deletions

View file

@ -35,6 +35,8 @@
#include "td/utils/Span.h"
#include <functional>
namespace td {
extern template class td::Cnt<std::string>;
extern template class td::Ref<td::Cnt<std::string>>;
@ -186,7 +188,7 @@ class StackEntry {
private:
static bool is_list(const StackEntry* se);
template <typename T, Type tag>
Ref<T> dynamic_as() const & {
Ref<T> dynamic_as() const& {
return tp == tag ? static_cast<Ref<T>>(ref) : td::Ref<T>{};
}
template <typename T, Type tag>
@ -198,7 +200,7 @@ class StackEntry {
return tp == tag ? static_cast<Ref<T>>(std::move(ref)) : td::Ref<T>{};
}
template <typename T, Type tag>
Ref<T> as() const & {
Ref<T> as() const& {
return tp == tag ? Ref<T>{td::static_cast_ref(), ref} : td::Ref<T>{};
}
template <typename T, Type tag>
@ -230,31 +232,31 @@ class StackEntry {
return ref;
}
}
td::RefInt256 as_int() const & {
td::RefInt256 as_int() const& {
return as<td::CntInt256, t_int>();
}
td::RefInt256 as_int() && {
return move_as<td::CntInt256, t_int>();
}
Ref<Cell> as_cell() const & {
Ref<Cell> as_cell() const& {
return as<Cell, t_cell>();
}
Ref<Cell> as_cell() && {
return move_as<Cell, t_cell>();
}
Ref<CellBuilder> as_builder() const & {
Ref<CellBuilder> as_builder() const& {
return as<CellBuilder, t_builder>();
}
Ref<CellBuilder> as_builder() && {
return move_as<CellBuilder, t_builder>();
}
Ref<CellSlice> as_slice() const & {
Ref<CellSlice> as_slice() const& {
return as<CellSlice, t_slice>();
}
Ref<CellSlice> as_slice() && {
return move_as<CellSlice, t_slice>();
}
Ref<Continuation> as_cont() const &;
Ref<Continuation> as_cont() const&;
Ref<Continuation> as_cont() &&;
Ref<Cnt<std::string>> as_string_ref() const {
return as<Cnt<std::string>, t_string>();
@ -269,16 +271,16 @@ class StackEntry {
std::string as_bytes() const {
return tp == t_bytes ? *as_bytes_ref() : "";
}
Ref<Box> as_box() const &;
Ref<Box> as_box() const&;
Ref<Box> as_box() &&;
Ref<Tuple> as_tuple() const &;
Ref<Tuple> as_tuple() const&;
Ref<Tuple> as_tuple() &&;
Ref<Tuple> as_tuple_range(unsigned max_len = 255, unsigned min_len = 0) const &;
Ref<Tuple> as_tuple_range(unsigned max_len = 255, unsigned min_len = 0) const&;
Ref<Tuple> as_tuple_range(unsigned max_len = 255, unsigned min_len = 0) &&;
Ref<Atom> as_atom() const &;
Ref<Atom> as_atom() const&;
Ref<Atom> as_atom() &&;
template <class T>
Ref<T> as_object() const & {
Ref<T> as_object() const& {
return dynamic_as<T, t_object>();
}
template <class T>
@ -444,7 +446,7 @@ class Stack : public td::CntObject {
}
return *this;
}
std::vector<StackEntry> extract_contents() const & {
std::vector<StackEntry> extract_contents() const& {
return stack;
}
std::vector<StackEntry> extract_contents() && {