8 #include "src/base/macros.h" 31 #if !V8_TARGET_ARCH_ARM64 35 Label(
Label&& other) V8_NOEXCEPT { *
this = std::move(other); }
38 near_link_pos_ = other.near_link_pos_;
45 Label& operator=(
Label&&) V8_NOEXCEPT =
default;
51 DCHECK(!is_near_linked());
54 V8_INLINE
void Unuse() { pos_ = 0; }
55 V8_INLINE
void UnuseNear() { near_link_pos_ = 0; }
57 V8_INLINE
bool is_bound()
const {
return pos_ < 0; }
58 V8_INLINE
bool is_unused()
const {
return pos_ == 0 && near_link_pos_ == 0; }
59 V8_INLINE
bool is_linked()
const {
return pos_ > 0; }
60 V8_INLINE
bool is_near_linked()
const {
return near_link_pos_ > 0; }
65 if (pos_ < 0)
return -pos_ - 1;
66 if (pos_ > 0)
return pos_ - 1;
70 int near_link_pos()
const {
return near_link_pos_ - 1; }
82 int near_link_pos_ = 0;
84 void bind_to(
int pos) {
88 void link_to(
int pos, Distance distance = kFar) {
89 if (distance == kNear) {
90 near_link_pos_ = pos + 1;
91 DCHECK(is_near_linked());
100 friend class RegExpMacroAssemblerIrregexp;
104 DISALLOW_COPY_AND_ASSIGN(
Label);
110 #endif // V8_LABEL_H_