1
- // ===--- ExperimentalDependencies .h -----------------------------*- C++ -*-===//
1
+ // ===----- FineGrainedependencies .h -----------------------------*- C++ -*-===//
2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
- #ifndef SWIFT_AST_EXPERIMENTAL_DEPENDENCIES_H
14
- #define SWIFT_AST_EXPERIMENTAL_DEPENDENCIES_H
13
+ #ifndef SWIFT_AST_FINE_GRAINED_DEPENDENCIES_H
14
+ #define SWIFT_AST_FINE_GRAINED_DEPENDENCIES_H
15
15
16
16
#include " swift/Basic/Debug.h"
17
17
#include " swift/Basic/LLVM.h"
27
27
#include < unordered_set>
28
28
#include < vector>
29
29
30
- // Summary: The ExperimentalDependency * files contain infrastructure for a
30
+ // Summary: The FineGrainedDependency * files contain infrastructure for a
31
31
// dependency system that, in the future, will be finer-grained than the current
32
32
// dependency system. At present--12/5/18--they are using the same input
33
33
// information as the current system and expected to produce the same results.
36
36
//
37
37
// The frontend uses the information from the compiler to built a
38
38
// SourceFileDepGraph consisting of SourceFileDepGraphNodes.
39
- // ExperimentalDependencies .* define these structures, and
40
- // ExperimentalDependenciesProducer has the frontend-unique code used to build
39
+ // FineGrainedDependencies .* define these structures, and
40
+ // FineGrainedDependenciesProducer has the frontend-unique code used to build
41
41
// the SourceFileDepGraph.
42
42
//
43
43
// The driver reads the SourceFileDepGraph and integrates it into its dependency
44
44
// graph, a ModuleDepGraph consisting of ModuleDepGraphNodes.
45
45
46
- // This file holds the declarations for the experimental dependency system
46
+ // This file holds the declarations for the fine-grained dependency system
47
47
// that are used by both the driver and frontend.
48
48
// These include the graph structures common to both programs and also
49
49
// the frontend graph, which must be read by the driver.
@@ -59,7 +59,7 @@ class FrontendOptions;
59
59
class SourceFile ;
60
60
61
61
// / Use a new namespace to help keep the experimental code from clashing.
62
- namespace experimental_dependencies {
62
+ namespace fine_grained_dependencies {
63
63
64
64
using StringVec = std::vector<std::string>;
65
65
@@ -318,7 +318,7 @@ class BiIndexedTwoStageMap {
318
318
// End of general declarations
319
319
320
320
// ==============================================================================
321
- // MARK: Start of experimental -dependency-specific code
321
+ // MARK: Start of fine-grained -dependency-specific code
322
322
// ==============================================================================
323
323
324
324
// / The entry point into this system from the frontend:
@@ -517,20 +517,20 @@ class DependencyKey {
517
517
// Name conversion helpers
518
518
static std::string demangleTypeAsContext (StringRef);
519
519
};
520
- } // namespace experimental_dependencies
520
+ } // namespace fine_grained_dependencies
521
521
} // namespace swift
522
522
523
523
template <>
524
- struct std ::hash<typename swift::experimental_dependencies ::DependencyKey> {
524
+ struct std ::hash<typename swift::fine_grained_dependencies ::DependencyKey> {
525
525
size_t
526
- operator ()(const swift::experimental_dependencies ::DependencyKey &key) const {
526
+ operator ()(const swift::fine_grained_dependencies ::DependencyKey &key) const {
527
527
return key.hash ();
528
528
}
529
529
};
530
530
template <>
531
- struct std ::hash<typename swift::experimental_dependencies ::DeclAspect> {
531
+ struct std ::hash<typename swift::fine_grained_dependencies ::DeclAspect> {
532
532
size_t
533
- operator ()(const swift::experimental_dependencies ::DeclAspect aspect) const {
533
+ operator ()(const swift::fine_grained_dependencies ::DeclAspect aspect) const {
534
534
return size_t (aspect);
535
535
}
536
536
};
@@ -559,7 +559,7 @@ struct std::hash<typename swift::experimental_dependencies::DeclAspect> {
559
559
// / improving it.
560
560
561
561
namespace swift {
562
- namespace experimental_dependencies {
562
+ namespace fine_grained_dependencies {
563
563
class DepGraphNode {
564
564
// / Def->use arcs go by DependencyKey. There may be >1 node for a given key.
565
565
DependencyKey key;
@@ -705,7 +705,7 @@ class SourceFileDepGraphNode : public DepGraphNode {
705
705
// ==============================================================================
706
706
707
707
// / The dependency graph produced by the frontend and consumed by the driver.
708
- // / See \ref Node in ExperimentalDependencies .h
708
+ // / See \ref Node in FineGrainedDependencies .h
709
709
class SourceFileDepGraph {
710
710
// / Every node in the graph. Indices used for serialization.
711
711
// / Use addNode instead of adding directly.
@@ -936,7 +936,7 @@ template <typename GraphT> class DotFileEmitter {
936
936
}
937
937
};
938
938
939
- } // end namespace experimental_dependencies
939
+ } // end namespace fine_grained_dependencies
940
940
} // end namespace swift
941
941
942
942
// ==============================================================================
@@ -948,32 +948,32 @@ template <typename GraphT> class DotFileEmitter {
948
948
#if !(defined(__linux__) || defined(_WIN64))
949
949
LLVM_YAML_DECLARE_SCALAR_TRAITS (size_t , QuotingType::None)
950
950
#endif
951
- LLVM_YAML_DECLARE_ENUM_TRAITS (swift::experimental_dependencies ::NodeKind)
952
- LLVM_YAML_DECLARE_ENUM_TRAITS(swift::experimental_dependencies ::DeclAspect)
951
+ LLVM_YAML_DECLARE_ENUM_TRAITS (swift::fine_grained_dependencies ::NodeKind)
952
+ LLVM_YAML_DECLARE_ENUM_TRAITS(swift::fine_grained_dependencies ::DeclAspect)
953
953
LLVM_YAML_DECLARE_MAPPING_TRAITS(
954
- swift::experimental_dependencies ::DependencyKey)
955
- LLVM_YAML_DECLARE_MAPPING_TRAITS(swift::experimental_dependencies ::DepGraphNode)
954
+ swift::fine_grained_dependencies ::DependencyKey)
955
+ LLVM_YAML_DECLARE_MAPPING_TRAITS(swift::fine_grained_dependencies ::DepGraphNode)
956
956
957
957
namespace llvm {
958
958
namespace yaml {
959
959
template <>
960
960
struct MappingContextTraits <
961
- swift::experimental_dependencies ::SourceFileDepGraphNode,
962
- swift::experimental_dependencies ::SourceFileDepGraph> {
961
+ swift::fine_grained_dependencies ::SourceFileDepGraphNode,
962
+ swift::fine_grained_dependencies ::SourceFileDepGraph> {
963
963
using SourceFileDepGraphNode =
964
- swift::experimental_dependencies ::SourceFileDepGraphNode;
964
+ swift::fine_grained_dependencies ::SourceFileDepGraphNode;
965
965
using SourceFileDepGraph =
966
- swift::experimental_dependencies ::SourceFileDepGraph;
966
+ swift::fine_grained_dependencies ::SourceFileDepGraph;
967
967
968
968
static void mapping (IO &io, SourceFileDepGraphNode &node,
969
969
SourceFileDepGraph &g);
970
970
};
971
971
972
972
template <>
973
973
struct SequenceTraits <
974
- std::vector<swift::experimental_dependencies ::SourceFileDepGraphNode *>> {
974
+ std::vector<swift::fine_grained_dependencies ::SourceFileDepGraphNode *>> {
975
975
using SourceFileDepGraphNode =
976
- swift::experimental_dependencies ::SourceFileDepGraphNode;
976
+ swift::fine_grained_dependencies ::SourceFileDepGraphNode;
977
977
using NodeVec = std::vector<SourceFileDepGraphNode *>;
978
978
static size_t size (IO &, NodeVec &vec);
979
979
static SourceFileDepGraphNode &element (IO &, NodeVec &vec, size_t index);
@@ -983,6 +983,6 @@ struct SequenceTraits<
983
983
} // namespace llvm
984
984
985
985
LLVM_YAML_DECLARE_MAPPING_TRAITS (
986
- swift::experimental_dependencies ::SourceFileDepGraph)
986
+ swift::fine_grained_dependencies ::SourceFileDepGraph)
987
987
988
- #endif // SWIFT_AST_EXPERIMENTAL_DEPENDENCIES_H
988
+ #endif // SWIFT_AST_FINE_GRAINED_DEPENDENCIES_H
0 commit comments