Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 716682d2739ed57829cef5eae8ae1289b543735a..6f070234d2cb1ade73625f9e029ae7e56b41bedc 100644 |
--- a/src/contexts.h |
+++ b/src/contexts.h |
@@ -229,8 +229,14 @@ class GlobalContextTable : public FixedArray { |
static Handle<GlobalContextTable> Extend(Handle<GlobalContextTable> table, |
Handle<Context> global_context); |
+ static int GetContextOffset(int context_index) { |
+ return kFirstContextOffset + context_index * kPointerSize; |
+ } |
+ |
private: |
static const int kUsedSlot = 0; |
+ static const int kFirstContextOffset = |
+ FixedArray::kHeaderSize + (kUsedSlot + 1) * kPointerSize; |
DISALLOW_IMPLICIT_CONSTRUCTORS(GlobalContextTable); |
}; |