summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index 20b2ca3841..26d448c450 100644
--- a/src/env.h
+++ b/src/env.h
@@ -450,6 +450,12 @@ struct ContextInfo {
bool is_default = false;
};
+struct CompileFnEntry {
+ Environment* env;
+ uint32_t id;
+ CompileFnEntry(Environment* env, uint32_t id);
+};
+
// Listing the AsyncWrap provider types first enables us to cast directly
// from a provider type to a debug category.
#define DEBUG_CATEGORY_NAMES(V) \
@@ -720,9 +726,12 @@ class Environment {
std::unordered_map<uint32_t, loader::ModuleWrap*> id_to_module_map;
std::unordered_map<uint32_t, contextify::ContextifyScript*>
id_to_script_map;
+ std::unordered_set<CompileFnEntry*> compile_fn_entries;
+ std::unordered_map<uint32_t, Persistent<v8::Function>> id_to_function_map;
inline uint32_t get_next_module_id();
inline uint32_t get_next_script_id();
+ inline uint32_t get_next_function_id();
std::unordered_map<std::string, const loader::PackageConfig>
package_json_cache;
@@ -1006,6 +1015,7 @@ class Environment {
uint32_t module_id_counter_ = 0;
uint32_t script_id_counter_ = 0;
+ uint32_t function_id_counter_ = 0;
AliasedBuffer<uint32_t, v8::Uint32Array> should_abort_on_uncaught_toggle_;
int should_not_abort_scope_counter_ = 0;