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

Unified Diff: src/contexts.h

Issue 1292753007: [es6] Parameter scopes for sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments Created 5 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/compiler/ast-graph-builder.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 edc5091a93bf7fa34af6507dfe28d4ffbfbb5276..78c2048f2b29dd3084966c2c2545e610b2fc3c91 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -299,8 +299,11 @@ class ScriptContextTable : public FixedArray {
// Dynamically declared variables/functions are also added
// to lazily allocated extension object. Context::Lookup
// searches the extension object for properties.
-// For global and block contexts, contains the respective
-// ScopeInfo.
+// For script and block contexts, contains the respective
+// ScopeInfo. For block contexts representing sloppy declaration
+// block scopes, it may also be a struct being a
+// SloppyBlockWithEvalContextExtension, pairing the ScopeInfo
+// with an extension object.
// For module contexts, points back to the respective JSModule.
//
// [ global_object ] A pointer to the global object. Provided for quick
@@ -370,9 +373,13 @@ class Context: public FixedArray {
}
void set_previous(Context* context) { set(PREVIOUS_INDEX, context); }
- bool has_extension() { return extension() != NULL; }
+ bool has_extension() { return extension() != nullptr; }
Object* extension() { return get(EXTENSION_INDEX); }
void set_extension(Object* object) { set(EXTENSION_INDEX, object); }
+ JSObject* extension_object();
+ JSReceiver* extension_receiver();
+ ScopeInfo* scope_info();
+ String* catch_name();
JSModule* module() { return JSModule::cast(get(EXTENSION_INDEX)); }
void set_module(JSModule* module) { set(EXTENSION_INDEX, module); }
@@ -380,6 +387,7 @@ class Context: public FixedArray {
// Get the context where var declarations will be hoisted to, which
// may be the context itself.
Context* declaration_context();
+ bool is_declaration_context();
GlobalObject* global_object() {
Object* result = get(GLOBAL_OBJECT_INDEX);
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698