Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 8182532039996035798764d6f4fb56f0fd5f8a5c..a859a0bf25e351340a77dad804e87a2e5b74e63b 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); |
}; |