Lines Matching refs:Scope
18 V8_EXPORT_PRIVATE typename Variable::Scope*& ContextualVariableTop();
22 // a variable in a well-nested fashion via the {Scope} class.
24 // is stored in a {Scope} object. The most recent value can be retrieved
25 // via Get(). Because only {Scope} has actual storage, there must be at
26 // least one active {Scope} (i.e. in a surrounding C++ scope), whenever Get()
29 // i.e. {Scope} and Get() have to be in the same thread.
33 // A {Scope} contains a new object of type {VarType} and gives
35 // variable is restored to the state before the {Scope} was created. Scopes
36 // have to follow a stack discipline: A {Scope} has to be destructed before
38 class V8_NODISCARD Scope {
41 explicit Scope(Args&&... args)
45 ~Scope() {
50 Scope(const Scope&) = delete;
51 Scope& operator=(const Scope&) = delete;
57 Scope* previous_;
65 // Access the most recent active {Scope}. There has to be an active {Scope}
74 friend V8_EXPORT_PRIVATE typename T::Scope*& ContextualVariableTop();
75 static Scope*& Top() { return ContextualVariableTop<Derived>(); }
88 V8_EXPORT_PRIVATE VarName::Scope*& ContextualVariableTop<VarName>() { \
89 static thread_local VarName::Scope* top = nullptr; \