OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_INTERFACE_H_ | 5 #ifndef V8_INTERFACE_H_ |
6 #define V8_INTERFACE_H_ | 6 #define V8_INTERFACE_H_ |
7 | 7 |
8 #include "src/ast-value-factory.h" | 8 #include "src/ast-value-factory.h" |
9 #include "src/zone-inl.h" // For operator new. | 9 #include "src/zone-inl.h" // For operator new. |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 || (this->IsValue() == that->IsValue() && | 116 || (this->IsValue() == that->IsValue() && |
117 this->IsConst() == that->IsConst()); | 117 this->IsConst() == that->IsConst()); |
118 } | 118 } |
119 | 119 |
120 int Length() { | 120 int Length() { |
121 DCHECK(IsModule() && IsFrozen()); | 121 DCHECK(IsModule() && IsFrozen()); |
122 ZoneHashMap* exports = Chase()->exports_; | 122 ZoneHashMap* exports = Chase()->exports_; |
123 return exports ? exports->occupancy() : 0; | 123 return exports ? exports->occupancy() : 0; |
124 } | 124 } |
125 | 125 |
126 // The context slot in the hosting global context pointing to this module. | 126 // The context slot in the hosting script context pointing to this module. |
127 int Index() { | 127 int Index() { |
128 DCHECK(IsModule() && IsFrozen()); | 128 DCHECK(IsModule() && IsFrozen()); |
129 return Chase()->index_; | 129 return Chase()->index_; |
130 } | 130 } |
131 | 131 |
132 // Look up an exported name. Returns NULL if not (yet) defined. | 132 // Look up an exported name. Returns NULL if not (yet) defined. |
133 Interface* Lookup(Handle<String> name, Zone* zone); | 133 Interface* Lookup(Handle<String> name, Zone* zone); |
134 | 134 |
135 // --------------------------------------------------------------------------- | 135 // --------------------------------------------------------------------------- |
136 // Iterators. | 136 // Iterators. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 void DoAdd(const void* name, uint32_t hash, Interface* interface, Zone* zone, | 208 void DoAdd(const void* name, uint32_t hash, Interface* interface, Zone* zone, |
209 bool* ok); | 209 bool* ok); |
210 void DoUnify(Interface* that, bool* ok, Zone* zone); | 210 void DoUnify(Interface* that, bool* ok, Zone* zone); |
211 }; | 211 }; |
212 | 212 |
213 } } // namespace v8::internal | 213 } } // namespace v8::internal |
214 | 214 |
215 #endif // V8_INTERFACE_H_ | 215 #endif // V8_INTERFACE_H_ |
OLD | NEW |