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_CONTEXTS_H_ | 5 #ifndef V8_CONTEXTS_H_ |
6 #define V8_CONTEXTS_H_ | 6 #define V8_CONTEXTS_H_ |
7 | 7 |
8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 | 10 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 // the subsequent slots 1..used contain ScriptContexts. | 295 // the subsequent slots 1..used contain ScriptContexts. |
296 class ScriptContextTable : public FixedArray { | 296 class ScriptContextTable : public FixedArray { |
297 public: | 297 public: |
298 // Conversions. | 298 // Conversions. |
299 static inline ScriptContextTable* cast(Object* context); | 299 static inline ScriptContextTable* cast(Object* context); |
300 | 300 |
301 struct LookupResult { | 301 struct LookupResult { |
302 int context_index; | 302 int context_index; |
303 int slot_index; | 303 int slot_index; |
304 VariableMode mode; | 304 VariableMode mode; |
305 VariableLocation location; | |
306 InitializationFlag init_flag; | 305 InitializationFlag init_flag; |
307 MaybeAssignedFlag maybe_assigned_flag; | 306 MaybeAssignedFlag maybe_assigned_flag; |
308 }; | 307 }; |
309 | 308 |
310 inline int used() const; | 309 inline int used() const; |
311 inline void set_used(int used); | 310 inline void set_used(int used); |
312 | 311 |
313 static inline Handle<Context> GetContext(Handle<ScriptContextTable> table, | 312 static inline Handle<Context> GetContext(Handle<ScriptContextTable> table, |
314 int i); | 313 int i); |
315 | 314 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 581 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
583 #endif | 582 #endif |
584 | 583 |
585 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 584 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
586 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 585 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
587 }; | 586 }; |
588 | 587 |
589 } } // namespace v8::internal | 588 } } // namespace v8::internal |
590 | 589 |
591 #endif // V8_CONTEXTS_H_ | 590 #endif // V8_CONTEXTS_H_ |
OLD | NEW |