Home | History | Annotate | Download | only in common

Lines Matching refs:binding

47 Label::Label() : value_(new Binding()) { }
48 Label::Label(uint64_t value) : value_(new Binding(value)) { }
105 Binding *base;
115 Binding *label_base, *this_base;
127 Label::Binding::Binding() : base_(this), addend_(), reference_count_(1) { }
129 Label::Binding::Binding(uint64_t addend)
132 Label::Binding::~Binding() {
138 void Label::Binding::Set(Binding *binding, uint64_t addend) {
139 if (!base_ && !binding) {
143 // We are a known constant, but BINDING may not be, so turn the
144 // tables and try to set BINDING's value instead.
145 binding->Set(NULL, addend_ - addend);
147 if (binding) {
148 // Find binding's final value. Since the final value is always either
154 binding->Get(&binding, &binding_addend);
158 // It seems likely that setting a binding to itself is a bug
161 assert(binding != this);
165 // is sufficient even though binding relationships form trees:
166 // All binding operations traverse their chains to the end, and
169 base_->Set(binding, addend - addend_);
174 // Adopt BINDING as our base. Note that it should be correct to
178 // complained if BINDING were 'this' or anywhere along our chain,
179 // so we didn't release BINDING.
180 if (binding) binding->Acquire();
181 base_ = binding;
186 void Label::Binding::Get(Binding **base, uint64_t *addend) {
189 // tree), and then rewrite every binding along the chain to refer
192 Binding *final_base;