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

Unified Diff: src/contexts.h

Issue 10876067: Introduce global contexts to represent lexical global scope(s). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Sven's comments. Created 8 years, 4 months 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/arm/full-codegen-arm.cc ('k') | src/contexts.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 8df16dd50ac47f897720f1d1c738944e3043c396..cfc576cecb6fedb6d83d893650824f39ed55cccf 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -190,7 +190,8 @@ enum BindingFlags {
// Dynamically declared variables/functions are also added
// to lazily allocated extension object. Context::Lookup
// searches the extension object for properties.
-// For block contexts, contains the respective ScopeInfo.
+// For global and block contexts, contains the respective
+// ScopeInfo.
// For module contexts, points back to the respective JSModule.
//
// [ global_object ] A pointer to the global object. Provided for quick
@@ -363,6 +364,10 @@ class Context: public FixedArray {
Map* map = this->map();
return map == map->GetHeap()->module_context_map();
}
+ bool IsGlobalContext() {
+ Map* map = this->map();
+ return map == map->GetHeap()->global_context_map();
+ }
// Tells whether the native context is marked with out of memory.
inline bool has_out_of_memory();
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698