Home | History | Annotate | Download | only in src

Lines Matching defs:interface

16 //   interface ::= UNDETERMINED | VALUE | CONST | MODULE(exports)
17 // exports ::= {name : interface, ...}
34 class Interface : public ZoneObject {
39 static Interface* NewUnknown(Zone* zone) {
40 return new(zone) Interface(NONE);
43 static Interface* NewValue() {
44 static Interface value_interface(VALUE + FROZEN); // Cached.
48 static Interface* NewConst() {
49 static Interface value_interface(VALUE + CONST + FROZEN); // Cached.
53 static Interface* NewModule(Zone* zone) {
54 return new(zone) Interface(MODULE);
61 // interface, otherwise insert unless this is closed.
62 void Add(Handle<String> name, Interface* interface, Zone* zone, bool* ok) {
63 DoAdd(name.location(), name->Hash(), interface, zone, ok);
66 // Unify with another interface. If successful, both interface objects will
68 void Unify(Interface* that, Zone* zone, bool* ok);
70 // Determine this interface to be a value interface.
76 // Determine this interface to be an immutable interface.
82 // Determine this interface to be a module interface.
118 bool IsUnified(Interface* that) {
137 Interface* Lookup(Handle<String> name, Zone* zone);
143 // for (auto it = interface->iterator(); !it.done(); it.Advance()) {
144 // ... it.name() ... it.interface() ...
153 Interface* interface() const {
155 return static_cast<Interface*>(entry_->value);
160 friend class Interface;
188 Interface* forward_; // Unification link
192 explicit Interface(int flags)
203 Interface* Chase() {
204 Interface* result = this;
210 void DoAdd(void* name, uint32_t hash, Interface* interface, Zone* zone,
212 void DoUnify(Interface* that, bool* ok, Zone* zone);