From 1f543f6eb368c3b23aa1f9cd2d23f0dba1456dec Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Jan 2017 12:44:15 +0200 Subject: Add notion of load phase generation --- build2/variable | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'build2/variable') 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 override; + const value_type* type; // If NULL, then not (yet) typed. + unique_ptr 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&); -- cgit v1.1