diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-30 12:44:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:41 +0200 |
commit | 1f543f6eb368c3b23aa1f9cd2d23f0dba1456dec (patch) | |
tree | a3c1b756c2cc27fac0ac392ce8d108e147b23840 /build2/variable | |
parent | b262d2c9c56eed18d043dccefac02b54a6ae2f95 (diff) |
Add notion of load phase generation
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/build2/variable b/build2/variable index 876ae2b..e60c7a1 100644 --- a/build2/variable +++ b/build2/variable @@ -116,9 +116,10 @@ namespace build2 struct variable { string name; - mutable const value_type* type; // If NULL, then not (yet) typed. - mutable unique_ptr<variable> override; + const value_type* type; // If NULL, then not (yet) typed. + unique_ptr<variable> override; variable_visibility visibility; + size_t generation; // load_generation of this variable. }; inline bool @@ -912,11 +913,12 @@ namespace build2 void update (variable&, const build2::value_type*, - const variable_visibility*, - const bool*) const; + const variable_visibility* = nullptr, + const bool* = nullptr) const; // Entities that can access bypassing the lock. // + friend class parser; friend class scope; friend variable_overrides reset (const strings&); |