summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-25 15:23:05 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-25 15:23:05 (GMT)
commit518d6b22f6705c4747c713031587705641540364 (patch)
tree0cbf97517daef0ec545fa39961177cf0e6b4096c /Source/cmState.cxx
parent32edac6fddfbe91e47b34506cda855232d5a9e2c (diff)
downloadCMake-518d6b22f6705c4747c713031587705641540364.zip
CMake-518d6b22f6705c4747c713031587705641540364.tar.gz
CMake-518d6b22f6705c4747c713031587705641540364.tar.bz2
cmLinkedTree: Rename 'Extend' method to 'Push'
Logically the method pushes a nested scope on top of a given scope because the "up" pointer sequence forms a stack independent of any other branches of the tree.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index e20ac89..3c96d46 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -288,7 +288,7 @@ cmState::Snapshot cmState::Reset()
assert(pos->Policies.IsValid());
assert(pos->PolicyRoot.IsValid());
this->VarTree.Clear();
- pos->Vars = this->VarTree.Extend(this->VarTree.Root());
+ pos->Vars = this->VarTree.Push(this->VarTree.Root());
pos->Parent = this->VarTree.Root();
pos->Root = this->VarTree.Root();
@@ -751,14 +751,14 @@ void cmState::Directory::ComputeRelativePathTopBinary()
cmState::Snapshot cmState::CreateBaseSnapshot()
{
- PositionType pos = this->SnapshotData.Extend(this->SnapshotData.Root());
+ PositionType pos = this->SnapshotData.Push(this->SnapshotData.Root());
pos->DirectoryParent = this->SnapshotData.Root();
pos->ScopeParent = this->SnapshotData.Root();
pos->SnapshotType = BaseType;
pos->BuildSystemDirectory =
- this->BuildsystemDirectory.Extend(this->BuildsystemDirectory.Root());
+ this->BuildsystemDirectory.Push(this->BuildsystemDirectory.Root());
pos->ExecutionListFile =
- this->ExecutionListFiles.Extend(this->ExecutionListFiles.Root());
+ this->ExecutionListFiles.Push(this->ExecutionListFiles.Root());
pos->IncludeDirectoryPosition = 0;
pos->CompileDefinitionsPosition = 0;
pos->CompileOptionsPosition = 0;
@@ -768,7 +768,7 @@ cmState::Snapshot cmState::CreateBaseSnapshot()
pos->PolicyScope = this->PolicyStack.Root();
assert(pos->Policies.IsValid());
assert(pos->PolicyRoot.IsValid());
- pos->Vars = this->VarTree.Extend(this->VarTree.Root());
+ pos->Vars = this->VarTree.Push(this->VarTree.Root());
assert(pos->Vars.IsValid());
pos->Parent = this->VarTree.Root();
pos->Root = this->VarTree.Root();
@@ -781,17 +781,17 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
long entryPointLine)
{
assert(originSnapshot.IsValid());
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position);
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->DirectoryParent = originSnapshot.Position;
pos->ScopeParent = originSnapshot.Position;
pos->SnapshotType = BuildsystemDirectoryType;
pos->BuildSystemDirectory =
- this->BuildsystemDirectory.Extend(
+ this->BuildsystemDirectory.Push(
originSnapshot.Position->BuildSystemDirectory);
pos->ExecutionListFile =
- this->ExecutionListFiles.Extend(
+ this->ExecutionListFiles.Push(
originSnapshot.Position->ExecutionListFile);
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->Policies = originSnapshot.Position->Policies;
@@ -804,7 +804,7 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
originSnapshot.Position->Vars;
pos->Parent = origin;
pos->Root = origin;
- pos->Vars = this->VarTree.Extend(origin);
+ pos->Vars = this->VarTree.Push(origin);
cmState::Snapshot snapshot = cmState::Snapshot(this, pos);
originSnapshot.Position->BuildSystemDirectory->Children.push_back(snapshot);
return snapshot;
@@ -816,13 +816,13 @@ cmState::CreateFunctionCallSnapshot(cmState::Snapshot originSnapshot,
long entryPointLine,
std::string const& fileName)
{
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
- *originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position,
+ *originSnapshot.Position);
pos->ScopeParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = FunctionCallType;
- pos->ExecutionListFile = this->ExecutionListFiles.Extend(
+ pos->ExecutionListFile = this->ExecutionListFiles.Push(
originSnapshot.Position->ExecutionListFile, fileName);
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->PolicyScope = originSnapshot.Position->Policies;
@@ -830,7 +830,7 @@ cmState::CreateFunctionCallSnapshot(cmState::Snapshot originSnapshot,
cmLinkedTree<cmDefinitions>::iterator origin =
originSnapshot.Position->Vars;
pos->Parent = origin;
- pos->Vars = this->VarTree.Extend(origin);
+ pos->Vars = this->VarTree.Push(origin);
return cmState::Snapshot(this, pos);
}
@@ -841,12 +841,12 @@ cmState::CreateMacroCallSnapshot(cmState::Snapshot originSnapshot,
long entryPointLine,
std::string const& fileName)
{
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
- *originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position,
+ *originSnapshot.Position);
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = MacroCallType;
- pos->ExecutionListFile = this->ExecutionListFiles.Extend(
+ pos->ExecutionListFile = this->ExecutionListFiles.Push(
originSnapshot.Position->ExecutionListFile, fileName);
assert(originSnapshot.Position->Vars.IsValid());
pos->BuildSystemDirectory->DirectoryEnd = pos;
@@ -860,12 +860,12 @@ cmState::CreateCallStackSnapshot(cmState::Snapshot originSnapshot,
long entryPointLine,
const std::string& fileName)
{
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
- *originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position,
+ *originSnapshot.Position);
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = CallStackType;
- pos->ExecutionListFile = this->ExecutionListFiles.Extend(
+ pos->ExecutionListFile = this->ExecutionListFiles.Push(
originSnapshot.Position->ExecutionListFile, fileName);
assert(originSnapshot.Position->Vars.IsValid());
pos->BuildSystemDirectory->DirectoryEnd = pos;
@@ -878,8 +878,8 @@ cmState::CreateVariableScopeSnapshot(cmState::Snapshot originSnapshot,
std::string const& entryPointCommand,
long entryPointLine)
{
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
- *originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position,
+ *originSnapshot.Position);
pos->ScopeParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
@@ -890,7 +890,7 @@ cmState::CreateVariableScopeSnapshot(cmState::Snapshot originSnapshot,
cmLinkedTree<cmDefinitions>::iterator origin =
originSnapshot.Position->Vars;
pos->Parent = origin;
- pos->Vars = this->VarTree.Extend(origin);
+ pos->Vars = this->VarTree.Push(origin);
assert(pos->Vars.IsValid());
return cmState::Snapshot(this, pos);
}
@@ -901,12 +901,12 @@ cmState::CreateInlineListFileSnapshot(cmState::Snapshot originSnapshot,
long entryPointLine,
const std::string& fileName)
{
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
- *originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position,
+ *originSnapshot.Position);
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = InlineListFileType;
- pos->ExecutionListFile = this->ExecutionListFiles.Extend(
+ pos->ExecutionListFile = this->ExecutionListFiles.Push(
originSnapshot.Position->ExecutionListFile, fileName);
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->PolicyScope = originSnapshot.Position->Policies;
@@ -916,8 +916,8 @@ cmState::CreateInlineListFileSnapshot(cmState::Snapshot originSnapshot,
cmState::Snapshot
cmState::CreatePolicyScopeSnapshot(cmState::Snapshot originSnapshot)
{
- PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
- *originSnapshot.Position);
+ PositionType pos = this->SnapshotData.Push(originSnapshot.Position,
+ *originSnapshot.Position);
pos->SnapshotType = PolicyScopeType;
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->PolicyScope = originSnapshot.Position->Policies;
@@ -1113,8 +1113,8 @@ void cmState::Snapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak)
{
PositionType pos = this->Position;
pos->Policies =
- this->State->PolicyStack.Extend(pos->Policies,
- PolicyStackEntry(entry, weak));
+ this->State->PolicyStack.Push(pos->Policies,
+ PolicyStackEntry(entry, weak));
}
bool cmState::Snapshot::PopPolicy()