svf-lib 1.0.2265 → 1.0.2267

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -147,17 +147,17 @@ public:
147
147
  template<typename Key, typename Value, typename Hash = SymbolHash,
148
148
  typename KeyEqual = std::equal_to<Key>,
149
149
  typename Allocator = std::allocator<std::pair<const Key, Value>>>
150
- using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
150
+ using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
151
151
 
152
- template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
153
- typename Allocator = std::allocator<Key>>
154
- using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
152
+ template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
153
+ typename Allocator = std::allocator<Key>>
154
+ using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
155
155
 
156
- typedef std::vector<Symbol> Production;
157
- typedef SymbolSet<Production> Productions;
156
+ typedef std::vector<Symbol> Production;
157
+ typedef SymbolSet<Production> Productions;
158
158
 
159
159
 
160
- inline Map<std::string, Kind>& getNonterminals()
160
+ inline Map<std::string, Kind>& getNonterminals()
161
161
  {
162
162
  return this->nonterminals;
163
163
  }
@@ -117,8 +117,7 @@ public:
117
117
  };
118
118
 
119
119
  /// AliasCFLGraphBuilder: a CFLGraphBuilder specialized for handling aliasing
120
- class AliasCFLGraphBuilder :
121
- public CFLGraphBuilder
120
+ class AliasCFLGraphBuilder : public CFLGraphBuilder
122
121
  {
123
122
  public:
124
123
  /// Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from GenericGraph
@@ -140,8 +139,7 @@ private:
140
139
  };
141
140
 
142
141
  /// VFCFLGraphBuilder: a CFLGraphBuilder specialized for handling value-flow
143
- class VFCFLGraphBuilder :
144
- public CFLGraphBuilder
142
+ class VFCFLGraphBuilder : public CFLGraphBuilder
145
143
  {
146
144
  public:
147
145
  /// Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from SVFG
@@ -494,7 +494,7 @@ public:
494
494
 
495
495
  /// Copy assignment operator
496
496
  WTOComponentVisitor& operator=(const WTOComponentVisitor&) noexcept =
497
- default;
497
+ default;
498
498
 
499
499
  /// Move assignment operator
500
500
  WTOComponentVisitor& operator=(WTOComponentVisitor&&) noexcept = default;
@@ -702,7 +702,7 @@ protected:
702
702
  WTOCycleDepthPtr previous_cycleDepth = _wtoCycleDepth;
703
703
  _nodeToWTOCycleDepth.insert(std::make_pair(head, _wtoCycleDepth));
704
704
  _wtoCycleDepth =
705
- std::make_shared<GraphTWTOCycleDepth>(*_wtoCycleDepth);
705
+ std::make_shared<GraphTWTOCycleDepth>(*_wtoCycleDepth);
706
706
  _wtoCycleDepth->add(head);
707
707
  for (auto it = cycle.begin(), et = cycle.end(); it != et; ++it)
708
708
  {
@@ -203,8 +203,7 @@ private:
203
203
  };
204
204
 
205
205
  /// Dwarf based CHG.
206
- class DCHGraph :
207
- public CommonCHGraph, public GenericGraph<DCHNode, DCHEdge>
206
+ class DCHGraph : public CommonCHGraph, public GenericGraph<DCHNode, DCHEdge>
208
207
  {
209
208
  public:
210
209
  /// Returns the DIType beneath the qualifiers. Does not strip away "DW_TAG_members".
@@ -1244,8 +1244,7 @@ public:
1244
1244
  /*!
1245
1245
  * Thread Fork
1246
1246
  */
1247
- class TDForkPE:
1248
- public CallPE
1247
+ class TDForkPE: public CallPE
1249
1248
  {
1250
1249
  friend class SVFIRWriter;
1251
1250
  friend class SVFIRReader;
@@ -1286,8 +1285,7 @@ public:
1286
1285
  /*!
1287
1286
  * Thread Join
1288
1287
  */
1289
- class TDJoinPE:
1290
- public RetPE
1288
+ class TDJoinPE: public RetPE
1291
1289
  {
1292
1290
  friend class SVFIRWriter;
1293
1291
  friend class SVFIRReader;
@@ -324,10 +324,11 @@ class SVFFunctionType : public SVFType
324
324
  private:
325
325
  const SVFType* retTy;
326
326
  std::vector<const SVFType*> params;
327
+ bool varArg;
327
328
 
328
329
  public:
329
- SVFFunctionType(const SVFType* rt, const std::vector<const SVFType*>& p)
330
- : SVFType(false, SVFFunctionTy, 1), retTy(rt), params(p)
330
+ SVFFunctionType(const SVFType* rt, const std::vector<const SVFType*>& p, bool isvararg)
331
+ : SVFType(false, SVFFunctionTy, 1), retTy(rt), params(p), varArg(isvararg)
331
332
  {
332
333
  }
333
334
 
@@ -345,6 +346,12 @@ public:
345
346
  return params;
346
347
  }
347
348
 
349
+
350
+ bool isVarArg() const
351
+ {
352
+ return varArg;
353
+ }
354
+
348
355
  void print(std::ostream& os) const override;
349
356
  };
350
357
 
@@ -217,8 +217,8 @@ struct isa_impl_wrap
217
217
  static bool doit(const From &Val)
218
218
  {
219
219
  return isa_impl_wrap<To, SimpleFrom,
220
- typename simplify_type<SimpleFrom>::SimpleType>::doit(
221
- simplify_type<const From>::getSimplifiedValue(Val));
220
+ typename simplify_type<SimpleFrom>::SimpleType>::doit(
221
+ simplify_type<const From>::getSimplifiedValue(Val));
222
222
  }
223
223
  };
224
224
 
@@ -285,11 +285,11 @@ template<class To, class From> struct cast_retty_impl<To, const From*const>
285
285
  template <class To, class From>
286
286
  struct cast_retty_impl<To, std::unique_ptr<From>>
287
287
  {
288
- private:
288
+ private:
289
289
  using PointerType = typename cast_retty_impl<To, From *>::ret_type;
290
290
  using ResultType = typename std::remove_pointer<PointerType>::type;
291
291
 
292
- public:
292
+ public:
293
293
  using ret_type = std::unique_ptr<ResultType>;
294
294
  };
295
295
 
@@ -325,8 +325,8 @@ template<class To, class From, class SimpleFrom> struct cast_convert_val
325
325
  static typename cast_retty<To, From>::ret_type doit(From &Val)
326
326
  {
327
327
  return cast_convert_val<To, SimpleFrom,
328
- typename simplify_type<SimpleFrom>::SimpleType>::doit(
329
- simplify_type<From>::getSimplifiedValue(Val));
328
+ typename simplify_type<SimpleFrom>::SimpleType>::doit(
329
+ simplify_type<From>::getSimplifiedValue(Val));
330
330
  }
331
331
  };
332
332
 
@@ -98,30 +98,30 @@ using Set = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
98
98
  template <typename Key, typename Value, typename Hash = Hash<Key>,
99
99
  typename KeyEqual = std::equal_to<Key>,
100
100
  typename Allocator = std::allocator<std::pair<const Key, Value>>>
101
- using Map = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
102
-
103
- template <typename Key, typename Compare = std::less<Key>,
104
- typename Allocator = std::allocator<Key>>
105
- using OrderedSet = std::set<Key, Compare, Allocator>;
106
-
107
- template <typename Key, typename Value, typename Compare = std::less<Key>,
108
- typename Allocator = std::allocator<std::pair<const Key, Value>>>
109
- using OrderedMap = std::map<Key, Value, Compare, Allocator>;
110
-
111
- typedef std::pair<NodeID, NodeID> NodePair;
112
- typedef OrderedSet<NodeID> OrderedNodeSet;
113
- typedef Set<NodeID> NodeSet;
114
- typedef Set<NodePair> NodePairSet;
115
- typedef Map<NodePair, NodeID> NodePairMap;
116
- typedef std::vector<NodeID> NodeVector;
117
- typedef std::vector<EdgeID> EdgeVector;
118
- typedef std::stack<NodeID> NodeStack;
119
- typedef std::list<NodeID> NodeList;
120
- typedef std::deque<NodeID> NodeDeque;
121
- typedef NodeSet EdgeSet;
122
- typedef std::vector<u32_t> CallStrCxt;
123
- typedef unsigned Version;
124
- typedef Set<Version> VersionSet;
125
- typedef std::pair<NodeID, Version> VersionedVar;
126
- typedef Set<VersionedVar> VersionedVarSet;
101
+ using Map = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
102
+
103
+ template <typename Key, typename Compare = std::less<Key>,
104
+ typename Allocator = std::allocator<Key>>
105
+ using OrderedSet = std::set<Key, Compare, Allocator>;
106
+
107
+ template <typename Key, typename Value, typename Compare = std::less<Key>,
108
+ typename Allocator = std::allocator<std::pair<const Key, Value>>>
109
+ using OrderedMap = std::map<Key, Value, Compare, Allocator>;
110
+
111
+ typedef std::pair<NodeID, NodeID> NodePair;
112
+ typedef OrderedSet<NodeID> OrderedNodeSet;
113
+ typedef Set<NodeID> NodeSet;
114
+ typedef Set<NodePair> NodePairSet;
115
+ typedef Map<NodePair, NodeID> NodePairMap;
116
+ typedef std::vector<NodeID> NodeVector;
117
+ typedef std::vector<EdgeID> EdgeVector;
118
+ typedef std::stack<NodeID> NodeStack;
119
+ typedef std::list<NodeID> NodeList;
120
+ typedef std::deque<NodeID> NodeDeque;
121
+ typedef NodeSet EdgeSet;
122
+ typedef std::vector<u32_t> CallStrCxt;
123
+ typedef unsigned Version;
124
+ typedef Set<Version> VersionSet;
125
+ typedef std::pair<NodeID, Version> VersionedVar;
126
+ typedef Set<VersionedVar> VersionedVarSet;
127
127
  }
@@ -436,7 +436,7 @@ template <typename T, typename = void> struct is_iterable : std::false_type {};
436
436
  template <typename T>
437
437
  struct is_iterable<T, void_t<decltype(std::begin(std::declval<T&>()) !=
438
438
  std::end(std::declval<T&>()))>>
439
- : std::true_type {};
439
+ : std::true_type {};
440
440
  template <typename T> constexpr bool is_iterable_v = is_iterable<T>::value;
441
441
  ///@}
442
442
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2265",
3
+ "version": "1.0.2267",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {