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

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: 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
Index: src/contexts.h
diff --git a/src/contexts.h b/src/contexts.h
index 9271b06dcff8c099520837f805e6e7a48047cc2c..f36a0d0478230a8fb12f6af9e4c40bc82b873b55 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -294,8 +294,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
@@ -365,9 +368,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); }
@@ -375,6 +382,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') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698