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

Unified Diff: src/contexts.h

Issue 2302783002: [modules] Basic support of exports (Closed)
Patch Set: . Created 4 years, 3 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/ast/variables.h ('k') | src/contexts.cc » ('j') | src/contexts.cc » ('J')
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 406ae28c7242a3bbabea381261f9f02101cdf5cc..b32725b03f16e857e92a8b0dd2f3ade4f935d9b9 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -227,6 +227,7 @@ enum ContextLookupFlags {
V(UINT8_ARRAY_FUN_INDEX, JSFunction, uint8_array_fun) \
V(UINT8_CLAMPED_ARRAY_FUN_INDEX, JSFunction, uint8_clamped_array_fun) \
V(UINT8X16_FUNCTION_INDEX, JSFunction, uint8x16_function) \
+ V(CURRENT_MODULE_INDEX, JSModule, current_module) \
NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \
NATIVE_CONTEXT_IMPORTED_FIELDS(V)
@@ -310,6 +311,7 @@ class ScriptContextTable : public FixedArray {
// block scopes, it may also be a struct being a
// SloppyBlockWithEvalContextExtension, pairing the ScopeInfo
// with an extension object.
+// XXX module
//
// [ native_context ] A pointer to the native context.
//
@@ -387,9 +389,13 @@ class Context: public FixedArray {
ScopeInfo* scope_info();
String* catch_name();
+ // Find the module context (assuming there is one) and return the associated
+ // module object.
+ JSModule* module();
+
// Get the context where var declarations will be hoisted to, which
// may be the context itself.
- Context* declaration_context();
+ Context* declaration_context(); // XXX should this return a module context?
bool is_declaration_context();
// Get the next closure's context on the context chain.
« no previous file with comments | « src/ast/variables.h ('k') | src/contexts.cc » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698