svf-lib 1.0.2181 → 1.0.2182

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -572,9 +572,9 @@ private:
572
572
  return addValNode(val, node, i);
573
573
  }
574
574
 
575
- NodeID addFunValNode(const CallGraphNode* callGraphNode, NodeID i, const ICFGNode* icfgNode)
575
+ NodeID addFunValNode(NodeID i, const ICFGNode* icfgNode, const CallGraphNode* callGraphNode)
576
576
  {
577
- FunValVar* node = new FunValVar(callGraphNode, i, icfgNode);
577
+ FunValVar* node = new FunValVar(i, icfgNode, callGraphNode);
578
578
  return addValNode(nullptr, node, i);
579
579
  }
580
580
 
@@ -585,17 +585,17 @@ private:
585
585
  return addValNode(nullptr, node, i);
586
586
  }
587
587
 
588
- inline NodeID addConstantFPValNode(const SVFValue* curInst, double dval, const NodeID i,
588
+ inline NodeID addConstantFPValNode(const SVFValue* curInst, const NodeID i, double dval,
589
589
  const ICFGNode* icfgNode)
590
590
  {
591
- SVFVar* node = new ConstantFPValVar(curInst, dval, i, icfgNode);
591
+ SVFVar* node = new ConstantFPValVar(curInst, i, dval, icfgNode);
592
592
  return addNode(node, i);
593
593
  }
594
594
 
595
- inline NodeID addConstantIntValNode(const SVFValue* curInst, const std::pair<s64_t, u64_t>& intValue, const NodeID i,
595
+ inline NodeID addConstantIntValNode(const SVFValue* curInst, NodeID i, const std::pair<s64_t, u64_t>& intValue,
596
596
  const ICFGNode* icfgNode)
597
597
  {
598
- SVFVar* node = new ConstantIntValVar(curInst, intValue.first, intValue.second, i, icfgNode);
598
+ SVFVar* node = new ConstantIntValVar(curInst, i, intValue.first, intValue.second, icfgNode);
599
599
  return addNode(node, i);
600
600
  }
601
601
 
@@ -629,47 +629,47 @@ private:
629
629
  /**
630
630
  * Creates and adds a heap object node to the SVFIR
631
631
  */
632
- inline NodeID addHeapObjNode(const SVFValue* val, const SVFFunction* f, NodeID i)
632
+ inline NodeID addHeapObjNode(const SVFValue* val, NodeID i, const SVFFunction* f)
633
633
  {
634
634
  const MemObj* mem = getMemObj(val);
635
635
  assert(mem->getId() == i && "not same object id?");
636
636
  memToFieldsMap[i].set(i);
637
- HeapObjVar *node = new HeapObjVar(f, val->getType(), i, mem);
637
+ HeapObjVar *node = new HeapObjVar(i, mem, val->getType(), f);
638
638
  return addObjNode(val, node, i);
639
639
  }
640
640
 
641
641
  /**
642
642
  * Creates and adds a stack object node to the SVFIR
643
643
  */
644
- inline NodeID addStackObjNode(const SVFValue* val, const SVFFunction* f, NodeID i)
644
+ inline NodeID addStackObjNode(const SVFValue* val, NodeID i, const SVFFunction* f)
645
645
  {
646
646
  const MemObj* mem = getMemObj(val);
647
647
  assert(mem->getId() == i && "not same object id?");
648
648
  memToFieldsMap[i].set(i);
649
- StackObjVar *node = new StackObjVar(f, val->getType(), i, mem);
649
+ StackObjVar *node = new StackObjVar(i, mem, val->getType(), f);
650
650
  return addObjNode(val, node, i);
651
651
  }
652
652
 
653
- NodeID addFunObjNode(const CallGraphNode* callGraphNode, NodeID id);
653
+ NodeID addFunObjNode(NodeID id, const CallGraphNode* callGraphNode);
654
654
 
655
655
 
656
- inline NodeID addConstantFPObjNode(const SVFValue* curInst, double dval, const NodeID i)
656
+ inline NodeID addConstantFPObjNode(const SVFValue* curInst, NodeID i, double dval)
657
657
  {
658
658
  const MemObj* mem = getMemObj(curInst);
659
659
  NodeID base = mem->getId();
660
660
  memToFieldsMap[base].set(mem->getId());
661
- ConstantFPObjVar* node = new ConstantFPObjVar(curInst, dval, mem->getId(), mem);
661
+ ConstantFPObjVar* node = new ConstantFPObjVar(curInst, i, dval, mem);
662
662
  return addObjNode(curInst, node, mem->getId());
663
663
  }
664
664
 
665
665
 
666
- inline NodeID addConstantIntObjNode(const SVFValue* curInst, const std::pair<s64_t, u64_t>& intValue, const NodeID i)
666
+ inline NodeID addConstantIntObjNode(const SVFValue* curInst, NodeID i, const std::pair<s64_t, u64_t>& intValue)
667
667
  {
668
668
  const MemObj* mem = getMemObj(curInst);
669
669
  NodeID base = mem->getId();
670
670
  memToFieldsMap[base].set(mem->getId());
671
671
  ConstantIntObjVar* node =
672
- new ConstantIntObjVar(curInst, intValue.first, intValue.second, mem->getId(), mem);
672
+ new ConstantIntObjVar(curInst, i, intValue.first, intValue.second, mem);
673
673
  return addObjNode(curInst, node, mem->getId());
674
674
  }
675
675
 
@@ -702,15 +702,15 @@ private:
702
702
  }
703
703
 
704
704
  /// Add a unique return node for a procedure
705
- inline NodeID addRetNode(const CallGraphNode* callGraphNode, NodeID i)
705
+ inline NodeID addRetNode(NodeID i, const CallGraphNode* callGraphNode)
706
706
  {
707
- SVFVar *node = new RetPN(callGraphNode,i);
707
+ SVFVar *node = new RetPN(i, callGraphNode);
708
708
  return addRetNode(callGraphNode, node, i);
709
709
  }
710
710
  /// Add a unique vararg node for a procedure
711
- inline NodeID addVarargNode(const CallGraphNode* val, NodeID i)
711
+ inline NodeID addVarargNode(NodeID i, const CallGraphNode* val)
712
712
  {
713
- SVFVar *node = new VarArgPN(val,i);
713
+ SVFVar *node = new VarArgPN(i, val);
714
714
  return addNode(node,i);
715
715
  }
716
716
 
@@ -724,8 +724,8 @@ public:
724
724
  //@}
725
725
 
726
726
  /// Constructor
727
- HeapObjVar(const SVFFunction* func, const SVFType* svfType, NodeID i,
728
- const MemObj* mem, PNODEK ty = HeapObjNode);
727
+ HeapObjVar(NodeID i, const MemObj* mem, const SVFType* svfType,
728
+ const SVFFunction* fun, PNODEK ty = HeapObjNode);
729
729
 
730
730
  /// Return name of a LLVM value
731
731
  inline const std::string getValueName() const
@@ -785,8 +785,8 @@ public:
785
785
  //@}
786
786
 
787
787
  /// Constructor
788
- StackObjVar(const SVFFunction* f, const SVFType* svfType, NodeID i,
789
- const MemObj* mem, PNODEK ty = StackObjNode);
788
+ StackObjVar(NodeID i, const MemObj* mem, const SVFType* svfType,
789
+ const SVFFunction* fun, PNODEK ty = StackObjNode);
790
790
 
791
791
  /// Return name of a LLVM value
792
792
  inline const std::string getValueName() const
@@ -838,7 +838,7 @@ public:
838
838
  }
839
839
 
840
840
  /// Constructor
841
- FunValVar(const CallGraphNode* cgn, NodeID i, const ICFGNode* icn,
841
+ FunValVar(NodeID i, const ICFGNode* icn, const CallGraphNode* cgn,
842
842
  PNODEK ty = FunValNode);
843
843
 
844
844
  virtual const std::string toString() const;
@@ -886,7 +886,7 @@ public:
886
886
  //@}
887
887
 
888
888
  /// Constructor
889
- FunObjVar(const CallGraphNode* cgNode, NodeID i, const MemObj* mem,
889
+ FunObjVar(NodeID i, const MemObj* mem, const CallGraphNode* cgNode,
890
890
  PNODEK ty = FunObjNode);
891
891
 
892
892
  inline const CallGraphNode* getCallGraphNode() const
@@ -1069,7 +1069,7 @@ public:
1069
1069
  }
1070
1070
 
1071
1071
  /// Constructor
1072
- ConstantFPValVar(const SVFValue* val, double dv, NodeID i, const ICFGNode* icn,
1072
+ ConstantFPValVar(const SVFValue* val, NodeID i, double dv, const ICFGNode* icn,
1073
1073
  PNODEK ty = ConstantFPValNode)
1074
1074
  : ConstantDataValVar(val, i, icn, ty), dval(dv)
1075
1075
  {
@@ -1128,7 +1128,7 @@ public:
1128
1128
  }
1129
1129
 
1130
1130
  /// Constructor
1131
- ConstantIntValVar(const SVFValue* val, s64_t sv, u64_t zv, NodeID i, const ICFGNode* icn,
1131
+ ConstantIntValVar(const SVFValue* val, NodeID i, s64_t sv, u64_t zv, const ICFGNode* icn,
1132
1132
  PNODEK ty = ConstantIntValNode)
1133
1133
  : ConstantDataValVar(val, i, icn, ty), zval(zv), sval(sv)
1134
1134
  {
@@ -1327,7 +1327,7 @@ public:
1327
1327
  //@}
1328
1328
 
1329
1329
  /// Constructor
1330
- ConstantFPObjVar(const SVFValue* val, double dv, NodeID i, const MemObj* m, PNODEK ty = ConstantFPObjNode)
1330
+ ConstantFPObjVar(const SVFValue* val, NodeID i, double dv, const MemObj* m, PNODEK ty = ConstantFPObjNode)
1331
1331
  : ConstantDataObjVar(val, i, m, ty), dval(dv)
1332
1332
  {
1333
1333
  }
@@ -1402,7 +1402,7 @@ public:
1402
1402
  //@}
1403
1403
 
1404
1404
  /// Constructor
1405
- ConstantIntObjVar(const SVFValue* val, s64_t sv, u64_t zv, NodeID i, const MemObj* m, PNODEK ty = ConstantIntObjNode)
1405
+ ConstantIntObjVar(const SVFValue* val, NodeID i, s64_t sv, u64_t zv, const MemObj* m, PNODEK ty = ConstantIntObjNode)
1406
1406
  : ConstantDataObjVar(val, i, m, ty), zval(zv), sval(sv)
1407
1407
  {
1408
1408
  }
@@ -1505,7 +1505,7 @@ public:
1505
1505
 
1506
1506
 
1507
1507
  /// Constructor
1508
- RetPN(const CallGraphNode* node, NodeID i);
1508
+ RetPN(NodeID i, const CallGraphNode* node);
1509
1509
 
1510
1510
  inline const CallGraphNode* getCallGraphNode() const
1511
1511
  {
@@ -1559,7 +1559,7 @@ public:
1559
1559
  //@}
1560
1560
 
1561
1561
  /// Constructor
1562
- VarArgPN(const CallGraphNode* node, NodeID i) : ValVar(nullptr, i, VarargNode), callGraphNode(node) {}
1562
+ VarArgPN(NodeID i, const CallGraphNode* node) : ValVar(nullptr, i, VarargNode), callGraphNode(node) {}
1563
1563
 
1564
1564
  virtual const SVFFunction* getFunction() const;
1565
1565
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2181",
3
+ "version": "1.0.2182",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {