Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: src/contexts.h

Issue 696783005: harmony-scoping: Implement LoadIC handler for loads from global contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback + rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698