cpp

Coverage Report

Created: 2025-05-19 04:05

/home/uke/oil/mycpp/gc_alloc.h
Line
Count
Source (jump to first uncovered line)
1
// gc_alloc.h: Functions that wrap gHeap.Allocate()
2
3
#ifndef MYCPP_GC_ALLOC_H
4
#define MYCPP_GC_ALLOC_H
5
6
#include <string.h>  // strlen
7
8
#include <new>      // placement new
9
#include <utility>  // std::forward
10
11
#include "mycpp/gc_obj.h"   // for RawObject, ObjHeader
12
#include "mycpp/gc_slab.h"  // for NewSlab()
13
#include "mycpp/gc_str.h"   // for NewStr()
14
15
#if defined(BUMP_LEAK)
16
  #include "mycpp/bump_leak_heap.h"
17
extern BumpLeakHeap gHeap;
18
#elif defined(MARK_SWEEP)
19
  #include "mycpp/mark_sweep_heap.h"
20
extern MarkSweepHeap gHeap;
21
#endif
22
23
// mycpp generates code that keeps track of the root set
24
class StackRoot {
25
 public:
26
2
  StackRoot(void* root) {
27
2
    RawObject** obj = reinterpret_cast<RawObject**>(root);
28
2
    gHeap.PushRoot(obj);
29
2
  }
30
31
2
  ~StackRoot() {
32
2
    gHeap.PopRoot();
33
2
  }
34
};
35
36
// sugar for tests
37
class StackRoots {
38
 public:
39
  // Note: void** seems logical, because these are pointers to pointers, but
40
  // the C++ compiler doesn't like it.
41
0
  StackRoots(std::initializer_list<void*> roots) {
42
0
    n_ = roots.size();
43
0
44
0
#if VALIDATE_ROOTS
45
0
    int i = 0;
46
0
#endif
47
0
48
0
    for (auto root : roots) {  // can't use roots[i]
49
0
      RawObject** obj = reinterpret_cast<RawObject**>(root);
50
0
#if VALIDATE_ROOTS
51
0
      ValidateRoot(*obj);
52
0
      i++;
53
0
#endif
54
0
55
0
      gHeap.PushRoot(obj);
56
0
    }
57
0
  }
58
59
0
  ~StackRoots() {
60
0
    for (int i = 0; i < n_; ++i) {
61
0
      gHeap.PopRoot();
62
0
    }
63
0
  }
64
65
 private:
66
  int n_;
67
};
68
69
// Note:
70
// - This function causes code bloat due to template expansion on hundreds of
71
//   types.  Could switch to a GC_NEW() macro
72
// - GCC generates slightly larger code if you factor out void* place and new
73
//   (place) T()
74
//
75
// Variadic templates:
76
// https://eli.thegreenplace.net/2014/variadic-templates-in-c/
77
template <typename T, typename... Args>
78
195
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
195
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
195
                "Expected no padding");
91
92
195
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
195
#if MARK_SWEEP
96
195
  int obj_id;
97
195
  int pool_id;
98
195
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
195
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
195
#if MARK_SWEEP
104
195
  header->obj_id = obj_id;
105
195
  #ifndef NO_POOL_ALLOC
106
195
  header->pool_id = pool_id;
107
195
  #endif
108
195
#endif
109
195
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
195
  memset(obj, 0, sizeof(T));
114
195
  return new (obj) T(std::forward<Args>(args)...);
115
195
}
_Z5AllocIN4pyos9ReadErrorEJiEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
_Z5AllocI4ListIP6BigStrEJEEPT_DpOT0_
Line
Count
Source
78
17
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
17
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
17
                "Expected no padding");
91
92
17
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
17
#if MARK_SWEEP
96
17
  int obj_id;
97
17
  int pool_id;
98
17
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
17
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
17
#if MARK_SWEEP
104
17
  header->obj_id = obj_id;
105
17
  #ifndef NO_POOL_ALLOC
106
17
  header->pool_id = pool_id;
107
17
  #endif
108
17
#endif
109
17
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
17
  memset(obj, 0, sizeof(T));
114
17
  return new (obj) T(std::forward<Args>(args)...);
115
17
}
_Z5AllocI7OSErrorJRiEEPT_DpOT0_
Line
Count
Source
78
4
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
4
                "Expected no padding");
91
92
4
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
4
#if MARK_SWEEP
96
4
  int obj_id;
97
4
  int pool_id;
98
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
4
#if MARK_SWEEP
104
4
  header->obj_id = obj_id;
105
4
  #ifndef NO_POOL_ALLOC
106
4
  header->pool_id = pool_id;
107
4
  #endif
108
4
#endif
109
4
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
4
  memset(obj, 0, sizeof(T));
114
4
  return new (obj) T(std::forward<Args>(args)...);
115
4
}
_Z5AllocI4ListIiEJEEPT_DpOT0_
Line
Count
Source
78
8
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
8
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
8
                "Expected no padding");
91
92
8
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
8
#if MARK_SWEEP
96
8
  int obj_id;
97
8
  int pool_id;
98
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
8
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
8
#if MARK_SWEEP
104
8
  header->obj_id = obj_id;
105
8
  #ifndef NO_POOL_ALLOC
106
8
  header->pool_id = pool_id;
107
8
  #endif
108
8
#endif
109
8
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
8
  memset(obj, 0, sizeof(T));
114
8
  return new (obj) T(std::forward<Args>(args)...);
115
8
}
Unexecuted instantiation: _Z5AllocIN5mylib5CFileEJRP8_IO_FILEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl18hnode__AlreadySeenEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl11hnode__LeafEJRP6BigStrNS0_7color_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN10hnode_asdl7hnode_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl12hnode__ArrayEJP4ListIPNS0_7hnode_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN10hnode_asdl5FieldEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl13hnode__RecordEJRP6BigStrS4_S4_P4ListIPNS0_5FieldEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl11hnode__LeafEJP6BigStrNS0_7color_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18parse_result__NodeEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__UnusedEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13source__StdinEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__MainFileEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17source__OtherFileEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15source__DynamicEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__VarRefEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__VariableEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13source__AliasEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__ReparsedEJRP6BigStrDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17source__SyntheticEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13loc__WordPartEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9loc__WordEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10loc__ArithEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12loc__CommandEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17loc__TokenTooLongEJDniiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21debug_frame__MainFileEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19debug_frame__SourceEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21debug_frame__ProcLikeEJDnDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl26debug_frame__BeforeErrTrapEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22bracket_op__WholeArrayEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22bracket_op__ArrayIndexEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16suffix_op__UnaryEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17suffix_op__StaticEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17suffix_op__PatSubEJDnDniDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16suffix_op__SliceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl26InitializerWord__ArrayWordEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl17InitializerWord_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl29word_part__InitializerLiteralEJDnP4ListIPNS0_17InitializerWord_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl25word_part__EscapedLiteralEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20word_part__ZshVarSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__TildeSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__ArithSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedTupleEJP4ListIPNS0_12CompoundWordEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedRangeEJDniRP6BigStrS4_iEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl27word_part__BracedRangeDigitEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18word_part__ExtGlobEJDnP4ListIPNS0_12CompoundWordEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl25word_part__BashRegexGroupEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17word_part__SpliceEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18word_part__ExprSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl11word_part_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16word__BracedTreeEJP4ListIPNS0_11word_part_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12word__StringEJiRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12sh_lhs__NameEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19sh_lhs__IndexedNameEJDnRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21sh_lhs__UnparsedIndexEJDnRP6BigStrS4_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl23arith_expr__UnaryAssignEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl24arith_expr__BinaryAssignEJiDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17arith_expr__UnaryEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18arith_expr__BinaryEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21arith_expr__TernaryOpEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19bool_expr__WordTestEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17bool_expr__BinaryEJiDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16bool_expr__UnaryEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21bool_expr__LogicalNotEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21bool_expr__LogicalAndEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20bool_expr__LogicalOrEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13redir_loc__FdEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18redir_loc__VarNameEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21redir_param__HereWordEJDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20redir_param__HereDocEJDnDnP4ListIPNS0_11word_part_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18condition__YshExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14case_arg__WordEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17case_arg__YshExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl6word_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10pat__WordsEJP4ListIPNS0_6word_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl6expr_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13pat__YshExprsEJP4ListIPNS0_6expr_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15for_iter__WordsEJP4ListIPNS0_6word_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17for_iter__YshExprEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16proc_sig__ClosedEJDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5RedirEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__RedirectEJDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7EnvPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__SimpleEJDnP4ListIPNS0_7EnvPairEEPS2_IPNS0_6word_tEEDnDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22command__ExpandedAliasEJDnP4ListIPNS0_7EnvPairEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SentenceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10AssignPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21command__ShAssignmentEJDnP4ListIPNS0_10AssignPairEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__ControlFlowEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9command_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5TokenEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__PipelineEJDnP4ListIPNS0_9command_tEEPS2_IPNS0_5TokenEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14command__AndOrEJP4ListIPNS0_9command_tEEPS2_IPNS0_5TokenEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__DoGroupEJDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SubshellEJDnDnDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__DParenEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__DBracketEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForEachEJDnP4ListIP6BigStrEDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForExprEJDnDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__WhileUntilEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5IfArmEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11command__IfEJDnP4ListIPNS0_5IfArmEEDnPS2_IPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7CaseArmEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__CaseEJDnDnDnP4ListIPNS0_7CaseArmEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__ShFunctionEJDnDnRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18command__TimeBlockEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__CommandListEJP4ListIPNS0_9command_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__BareDeclEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__RetvalEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18glob_part__LiteralEJiRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19glob_part__OperatorEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20glob_part__CharClassEJbP4ListIP6BigStrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20printf_part__PercentEJP4ListIPNS0_5TokenEEDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19place_op__SubscriptEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19place_op__AttributeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9expr__VarEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__ConstEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10place_op_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__PlaceEJDnRP6BigStrP4ListIPNS0_10place_op_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13expr__LiteralEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NameTypeEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__LambdaEJP4ListIPNS0_8NameTypeEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__UnaryEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__BinaryEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13expr__CompareEJDnP4ListIPNS0_5TokenEEPS2_IPNS0_6expr_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__FuncCallEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__IfExpEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__TupleEJDnP4ListIPNS0_6expr_tEENS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10expr__ListEJDnP4ListIPNS0_6expr_tEENS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10expr__DictEJDnP4ListIPNS0_6expr_tEES6_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl13ComprehensionEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__ListCompEJDnDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__DictCompEJDnDnDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18expr__GeneratorExpEJDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__RangeEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__SliceEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__SpreadEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl26class_literal_term__SpliceEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re_repeat__RangeEJDnRP6BigStrS4_DnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re__PrimitiveEJDniEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl20class_literal_term_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20re__CharClassLiteralEJbP4ListIPNS0_20class_literal_term_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl17char_class_term_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re__CharClassEJbP4ListIPNS0_17char_class_term_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10re__SpliceEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10re__RepeatEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl4re_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7re__SeqEJP4ListIPNS0_4re_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7re__AltEJP4ListIPNS0_4re_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9re__GroupEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11re__CaptureEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__BacktrackingEJbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__LiteralCharsEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BoolParamBoxEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11IntParamBoxEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10SourceLineEJiRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5TokenEJiiiDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12CompoundWordEJP4ListIPNS0_11word_part_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BracedVarSubEJDnDnRP6BigStrDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12DoubleQuotedEJDnP4ListIPNS0_11word_part_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12SingleQuotedEJDnRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12SimpleVarSubEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10CommandSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15YshArrayLiteralEJDnP4ListIPNS0_6word_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NamedArgEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7ArgListEJDnP4ListIPNS0_6expr_tEEDnPS2_IPNS0_8NamedArgEEDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AssocPairEJDnDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5RedirEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10AssignPairEJDnDnNS0_11assign_op_eEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7EnvPairEJDnRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7CaseArmEJDnDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9EggexFlagEJbDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9EggexFlagEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5EggexEJDnDnP4ListIPNS0_9EggexFlagEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5IfArmEJDnDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10BraceGroupEJDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5ParamEJDnRP6BigStrDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9RestParamEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5ParamEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10ParamGroupEJP4ListIPNS0_5ParamEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl4ProcEJDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl4FuncEJDnDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16ParsedAssignmentEJDnDniDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7VarDeclEJDnP4ListIPNS0_8NameTypeEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7y_lhs_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8MutationEJDnP4ListIPNS0_7y_lhs_tEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11ExprCommandEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8TypeExprEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8TypeExprEJDnRP6BigStrP4ListIPS1_EEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8NameTypeEJDnRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13ComprehensionEJP4ListIPNS0_8NameTypeEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8NamedArgEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9SubscriptEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AttributeEJDnDnDnRP6BigStrNS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10PosixClassEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9PerlClassEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8CharCodeEJDnibEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9CharRangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15List_of_commandEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15List_of_commandEJRP4ListIPNS0_9command_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4DictIibEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl18hnode__AlreadySeenEJRiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_7hnode_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_12hnode__ArrayEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl13hnode__RecordEJRP6BigStrS3_S3_P4ListIPNS0_5FieldEERPS5_IPNS0_7hnode_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_13hnode__RecordEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15cmd_value__ArgvEJP4ListIP6BigStrEPS2_IPN11syntax_asdl12CompoundWordEEbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl9AssignArgEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17cmd_value__AssignEJiP4ListIP6BigStrEPS2_IPN11syntax_asdl12CompoundWordEEPS2_IPNS0_9AssignArgEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17part_value__ArrayEJP4ListIP6BigStrEbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl12part_value_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl19part_value__ExtGlobEJP4ListIPNS0_12part_value_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12a_index__StrEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12a_index__IntEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl18redirect_arg__PathEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl20redirect_arg__CopyFdEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl20redirect_arg__MoveFdEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl21redirect_arg__HereDocEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17wait_status__ProcEJNS0_11job_state_eEiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl21wait_status__PipelineEJNS0_11job_state_eEP4ListIiEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl22wait_status__CancelledEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15trace__ExternalEJP4ListIP6BigStrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl9AssignArgEJRP6BigStrDnbDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl8ProcArgsEJDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl5PieceEJRP6BigStrbbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11VarSubStateEJbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl4CellEJbbbDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10VTestPlaceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10RedirValueEJiDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11StatusArrayEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl13CommandStatusEJbbbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl7HayNodeEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl10doc__BreakEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl9doc__TextEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IndentEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl9doc__FlatEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IfFlatEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl7MeasureEJiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJDnibDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl13List_MeasuredEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl13List_MeasuredEJRP4ListIPNS0_11MeasuredDocEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl19y_lvalue__ContainerEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl18sh_lvalue__IndexedEJRP6BigStriDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16sh_lvalue__KeyedEJRP6BigStrS4_DnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN10value_asdl7value_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl14eggex_ops__YesEJP4ListIPNS0_7value_tEEPS2_IPN11syntax_asdl5TokenEEPS2_IP6BigStrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl14cmd_frag__ExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__SliceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN10value_asdl16InitializerValueEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl22value__InitializerListEJP4ListIPNS0_16InitializerValueEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl26value__InternalStringArrayEJP4ListIP6BigStrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BashArrayEJDniEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BashAssocEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__BoolEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl10value__IntEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FloatEJdEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ListEJP4ListIPNS0_7value_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__DictEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__RangeEJiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__EggexEJDnRP6BigStrP4ListIPNS0_7value_tEEPS5_IPN11syntax_asdl5TokenEEDnPS5_IS3_EEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__PlaceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FrameEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl17value__DebugFrameEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BoundFuncEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl18value__BuiltinFuncEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__FuncEJRP6BigStrDnP4ListIPNS0_7value_tEEDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl18value__BuiltinProcEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ProcEJRP6BigStrDnDnDnDnbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ExprEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl18value__CommandFragEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl14value__CommandEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl6IntBoxEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16InitializerValueEJDnRP6BigStrbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12ProcDefaultsEJDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl8LeftNameEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl10RegexMatchEJRP6BigStrP4ListIiEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10SourceLineEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12LiteralBlockEJDnP4ListIPN11syntax_asdl10SourceLineEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl3ObjEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI17KeyboardInterruptJEEPT_DpOT0_
_Z5AllocI4DictIP6BigStrS2_EJEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
_Z5AllocI4ListIPN4pyos11PasswdEntryEEJEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
_Z5AllocIN4pyos11PasswdEntryEJRP6passwdEEPT_DpOT0_
Line
Count
Source
78
19
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
19
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
19
                "Expected no padding");
91
92
19
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
19
#if MARK_SWEEP
96
19
  int obj_id;
97
19
  int pool_id;
98
19
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
19
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
19
#if MARK_SWEEP
104
19
  header->obj_id = obj_id;
105
19
  #ifndef NO_POOL_ALLOC
106
19
  header->pool_id = pool_id;
107
19
  #endif
108
19
#endif
109
19
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
19
  memset(obj, 0, sizeof(T));
114
19
  return new (obj) T(std::forward<Args>(args)...);
115
19
}
_Z5AllocI7IOErrorJRiEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
Unexecuted instantiation: _Z5AllocI10IndexErrorJEEPT_DpOT0_
_Z5AllocI6Tuple2IP6BigStriEJRS2_RlEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
_Z5AllocI7IOErrorJiEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
_Z5AllocIN6pyutil15_ResourceLoaderEJEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
Unexecuted instantiation: _Z5AllocIN7grammar7GrammarEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI7OSErrorJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5iolib10SignalSafeEJEEPT_DpOT0_
_Z5AllocI10ValueErrorJEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
Unexecuted instantiation: _Z5AllocI4DictIP6BigStriEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4DictIiP6BigStrEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4DictIiP6Tuple2IP4ListIPS2_IPS1_IiiEEEPS0_IiiEEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4DictIiiEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPS0_IP6Tuple2IiiEEEJEEPT_DpOT0_
_Z5AllocI6Tuple2IiiEJiiEEPT_DpOT0_
Line
Count
Source
78
3
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
3
                "Expected no padding");
91
92
3
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
3
#if MARK_SWEEP
96
3
  int obj_id;
97
3
  int pool_id;
98
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
3
#if MARK_SWEEP
104
3
  header->obj_id = obj_id;
105
3
  #ifndef NO_POOL_ALLOC
106
3
  header->pool_id = pool_id;
107
3
  #endif
108
3
#endif
109
3
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
3
  memset(obj, 0, sizeof(T));
114
3
  return new (obj) T(std::forward<Args>(args)...);
115
3
}
Unexecuted instantiation: _Z5AllocI4ListIP6Tuple2IiiEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI6Tuple2IP4ListIPS1_IPS0_IiiEEEP4DictIiiEEJRS7_RSA_EEPT_DpOT0_
_Z5AllocIN5mylib9BufWriterEJEEPT_DpOT0_
Line
Count
Source
78
46
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
46
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
46
                "Expected no padding");
91
92
46
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
46
#if MARK_SWEEP
96
46
  int obj_id;
97
46
  int pool_id;
98
46
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
46
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
46
#if MARK_SWEEP
104
46
  header->obj_id = obj_id;
105
46
  #ifndef NO_POOL_ALLOC
106
46
  header->pool_id = pool_id;
107
46
  #endif
108
46
#endif
109
46
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
46
  memset(obj, 0, sizeof(T));
114
46
  return new (obj) T(std::forward<Args>(args)...);
115
46
}
_Z5AllocIN10value_asdl10value__StrEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
78
2
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
2
                "Expected no padding");
91
92
2
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
2
#if MARK_SWEEP
96
2
  int obj_id;
97
2
  int pool_id;
98
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
2
#if MARK_SWEEP
104
2
  header->obj_id = obj_id;
105
2
  #ifndef NO_POOL_ALLOC
106
2
  header->pool_id = pool_id;
107
2
  #endif
108
2
#endif
109
2
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
2
  memset(obj, 0, sizeof(T));
114
2
  return new (obj) T(std::forward<Args>(args)...);
115
2
}
_Z5AllocIN9flag_spec16_FlagSpecAndMoreEJEEPT_DpOT0_
Line
Count
Source
78
2
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
2
                "Expected no padding");
91
92
2
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
2
#if MARK_SWEEP
96
2
  int obj_id;
97
2
  int pool_id;
98
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
2
#if MARK_SWEEP
104
2
  header->obj_id = obj_id;
105
2
  #ifndef NO_POOL_ALLOC
106
2
  header->pool_id = pool_id;
107
2
  #endif
108
2
#endif
109
2
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
2
  memset(obj, 0, sizeof(T));
114
2
  return new (obj) T(std::forward<Args>(args)...);
115
2
}
_Z5AllocIN9flag_spec9_FlagSpecEJEEPT_DpOT0_
Line
Count
Source
78
3
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
3
                "Expected no padding");
91
92
3
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
3
#if MARK_SWEEP
96
3
  int obj_id;
97
3
  int pool_id;
98
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
3
#if MARK_SWEEP
104
3
  header->obj_id = obj_id;
105
3
  #ifndef NO_POOL_ALLOC
106
3
  header->pool_id = pool_id;
107
3
  #endif
108
3
#endif
109
3
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
3
  memset(obj, 0, sizeof(T));
114
3
  return new (obj) T(std::forward<Args>(args)...);
115
3
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl13hnode__RecordEJRP6BigStrS4_S4_P4ListIPNS0_5FieldEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__BoolEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl10doc__BreakEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl9doc__TextEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl7MeasureEJiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl13List_MeasuredEJEEPT_DpOT0_
_Z5AllocIN10value_asdl11value__BoolEJRbEEPT_DpOT0_
Line
Count
Source
78
23
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
23
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
23
                "Expected no padding");
91
92
23
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
23
#if MARK_SWEEP
96
23
  int obj_id;
97
23
  int pool_id;
98
23
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
23
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
23
#if MARK_SWEEP
104
23
  header->obj_id = obj_id;
105
23
  #ifndef NO_POOL_ALLOC
106
23
  header->pool_id = pool_id;
107
23
  #endif
108
23
#endif
109
23
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
23
  memset(obj, 0, sizeof(T));
114
23
  return new (obj) T(std::forward<Args>(args)...);
115
23
}
_Z5AllocIN10value_asdl10value__IntEJRiEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FloatEJRfEEPT_DpOT0_
_Z5AllocIN10value_asdl10value__StrEJP6BigStrEEPT_DpOT0_
Line
Count
Source
78
3
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
3
                "Expected no padding");
91
92
3
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
3
#if MARK_SWEEP
96
3
  int obj_id;
97
3
  int pool_id;
98
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
3
#if MARK_SWEEP
104
3
  header->obj_id = obj_id;
105
3
  #ifndef NO_POOL_ALLOC
106
3
  header->pool_id = pool_id;
107
3
  #endif
108
3
#endif
109
3
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
3
  memset(obj, 0, sizeof(T));
114
3
  return new (obj) T(std::forward<Args>(args)...);
115
3
}
_Z5AllocIN4args11SetToStringEJP6BigStrbRP4ListIS3_EEEPT_DpOT0_
Line
Count
Source
78
7
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
7
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
7
                "Expected no padding");
91
92
7
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
7
#if MARK_SWEEP
96
7
  int obj_id;
97
7
  int pool_id;
98
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
7
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
7
#if MARK_SWEEP
104
7
  header->obj_id = obj_id;
105
7
  #ifndef NO_POOL_ALLOC
106
7
  header->pool_id = pool_id;
107
7
  #endif
108
7
#endif
109
7
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
7
  memset(obj, 0, sizeof(T));
114
7
  return new (obj) T(std::forward<Args>(args)...);
115
7
}
_Z5AllocIN4args11SetToStringEJP6BigStrbDnEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
_Z5AllocIN4args8SetToIntEJP6BigStrEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
Unexecuted instantiation: _Z5AllocIN4args10SetToFloatEJP6BigStrEEPT_DpOT0_
_Z5AllocIN4args9SetToTrueEJP6BigStrEEPT_DpOT0_
Line
Count
Source
78
11
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
11
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
11
                "Expected no padding");
91
92
11
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
11
#if MARK_SWEEP
96
11
  int obj_id;
97
11
  int pool_id;
98
11
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
11
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
11
#if MARK_SWEEP
104
11
  header->obj_id = obj_id;
105
11
  #ifndef NO_POOL_ALLOC
106
11
  header->pool_id = pool_id;
107
11
  #endif
108
11
#endif
109
11
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
11
  memset(obj, 0, sizeof(T));
114
11
  return new (obj) T(std::forward<Args>(args)...);
115
11
}
Unexecuted instantiation: _Z5AllocIN4args15SetAttachedBoolEJP6BigStrEEPT_DpOT0_
_Z5AllocIN4args9SetOptionEJP6BigStrEEPT_DpOT0_
Line
Count
Source
78
9
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
9
                "Expected no padding");
91
92
9
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
9
#if MARK_SWEEP
96
9
  int obj_id;
97
9
  int pool_id;
98
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
9
#if MARK_SWEEP
104
9
  header->obj_id = obj_id;
105
9
  #ifndef NO_POOL_ALLOC
106
9
  header->pool_id = pool_id;
107
9
  #endif
108
9
#endif
109
9
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
9
  memset(obj, 0, sizeof(T));
114
9
  return new (obj) T(std::forward<Args>(args)...);
115
9
}
_Z5AllocIN4args14SetNamedOptionEJbEEPT_DpOT0_
Line
Count
Source
78
2
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
2
                "Expected no padding");
91
92
2
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
2
#if MARK_SWEEP
96
2
  int obj_id;
97
2
  int pool_id;
98
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
2
#if MARK_SWEEP
104
2
  header->obj_id = obj_id;
105
2
  #ifndef NO_POOL_ALLOC
106
2
  header->pool_id = pool_id;
107
2
  #endif
108
2
#endif
109
2
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
2
  memset(obj, 0, sizeof(T));
114
2
  return new (obj) T(std::forward<Args>(args)...);
115
2
}
Unexecuted instantiation: _Z5AllocIN4args9SetActionEJP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN4args14SetNamedActionEJEEPT_DpOT0_
_Z5AllocIN4args14AppendEvalFlagEJP6BigStrEEPT_DpOT0_
Line
Count
Source
78
2
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
2
                "Expected no padding");
91
92
2
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
2
#if MARK_SWEEP
96
2
  int obj_id;
97
2
  int pool_id;
98
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
2
#if MARK_SWEEP
104
2
  header->obj_id = obj_id;
105
2
  #ifndef NO_POOL_ALLOC
106
2
  header->pool_id = pool_id;
107
2
  #endif
108
2
#endif
109
2
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
2
  memset(obj, 0, sizeof(T));
114
2
  return new (obj) T(std::forward<Args>(args)...);
115
2
}
_Z5AllocI4DictIP6BigStrPN4args7_ActionEEJEEPT_DpOT0_
Line
Count
Source
78
6
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
6
                "Expected no padding");
91
92
6
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
6
#if MARK_SWEEP
96
6
  int obj_id;
97
6
  int pool_id;
98
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
6
#if MARK_SWEEP
104
6
  header->obj_id = obj_id;
105
6
  #ifndef NO_POOL_ALLOC
106
6
  header->pool_id = pool_id;
107
6
  #endif
108
6
#endif
109
6
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
6
  memset(obj, 0, sizeof(T));
114
6
  return new (obj) T(std::forward<Args>(args)...);
115
6
}
_Z5AllocI4DictIP6BigStrPN10value_asdl7value_tEEJEEPT_DpOT0_
Line
Count
Source
78
3
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
3
                "Expected no padding");
91
92
3
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
3
#if MARK_SWEEP
96
3
  int obj_id;
97
3
  int pool_id;
98
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
3
#if MARK_SWEEP
104
3
  header->obj_id = obj_id;
105
3
  #ifndef NO_POOL_ALLOC
106
3
  header->pool_id = pool_id;
107
3
  #endif
108
3
#endif
109
3
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
3
  memset(obj, 0, sizeof(T));
114
3
  return new (obj) T(std::forward<Args>(args)...);
115
3
}
Unexecuted instantiation: _Z5AllocI8KeyErrorJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl11hnode__LeafEJRP6BigStrRNS0_7color_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN8pp_hnode12HNodeEncoderEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6pretty13PrettyPrinterEJRiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl7MeasureEJRiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl7MeasureEJiRiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_9doc__TextEPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_10doc__BreakEPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IndentEJRiRPNS0_11MeasuredDocEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_11doc__IndentERPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJRPNS0_13List_MeasuredERPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJRPS1_RPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11doc__IfFlatEJRPNS0_11MeasuredDocES4_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl7MeasureEJRiS2_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_11doc__IfFlatEPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl9doc__FlatEJRPNS0_11MeasuredDocEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_9doc__FlatEPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJPNS0_11MeasuredDocEibPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11pretty_asdl11DocFragmentEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJRPNS0_11MeasuredDocEiRbRPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJRPNS0_11MeasuredDocERiRbRPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11DocFragmentEJRPNS0_11MeasuredDocERibRPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11pretty_asdl11MeasuredDocEJPNS0_9doc__TextERPNS0_7MeasureEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11pretty_asdl11MeasuredDocEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__DictEJRP4DictIP6BigStrPNS0_7value_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5error5UsageEJRP6BigStrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5error6StrictEJRP6BigStrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5error5ParseEJRP6BigStrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
_Z5AllocIN5error12FatalRuntimeEJiRP6BigStrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
Unexecuted instantiation: _Z5AllocIN5error12FatalRuntimeEJRiRP6BigStrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl10value__IntEJlEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIP6Tuple2IP6BigStrbEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI6Tuple2IP6BigStrbEJRS2_RbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl10value__IntEJRlEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FloatEJRdEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN4args11_AttributesEJRP4DictIP6BigStrPN10value_asdl7value_tEEEEPT_DpOT0_
_Z5AllocI4ListIP6Tuple2IiP6BigStrEEJEEPT_DpOT0_
Line
Count
Source
78
3
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
3
                "Expected no padding");
91
92
3
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
3
#if MARK_SWEEP
96
3
  int obj_id;
97
3
  int pool_id;
98
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
3
#if MARK_SWEEP
104
3
  header->obj_id = obj_id;
105
3
  #ifndef NO_POOL_ALLOC
106
3
  header->pool_id = pool_id;
107
3
  #endif
108
3
#endif
109
3
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
3
  memset(obj, 0, sizeof(T));
114
3
  return new (obj) T(std::forward<Args>(args)...);
115
3
}
_Z5AllocI6Tuple2IiP6BigStrEJiS2_EEPT_DpOT0_
Line
Count
Source
78
5
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
5
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
5
                "Expected no padding");
91
92
5
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
5
#if MARK_SWEEP
96
5
  int obj_id;
97
5
  int pool_id;
98
5
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
5
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
5
#if MARK_SWEEP
104
5
  header->obj_id = obj_id;
105
5
  #ifndef NO_POOL_ALLOC
106
5
  header->pool_id = pool_id;
107
5
  #endif
108
5
#endif
109
5
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
5
  memset(obj, 0, sizeof(T));
114
5
  return new (obj) T(std::forward<Args>(args)...);
115
5
}
_Z5AllocIN5match11SimpleLexerEJPFvPKhiiPiS4_ERP6BigStrEEPT_DpOT0_
Line
Count
Source
78
4
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
4
                "Expected no padding");
91
92
4
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
4
#if MARK_SWEEP
96
4
  int obj_id;
97
4
  int pool_id;
98
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
4
#if MARK_SWEEP
104
4
  header->obj_id = obj_id;
105
4
  #ifndef NO_POOL_ALLOC
106
4
  header->pool_id = pool_id;
107
4
  #endif
108
4
#endif
109
4
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
4
  memset(obj, 0, sizeof(T));
114
4
  return new (obj) T(std::forward<Args>(args)...);
115
4
}
Unexecuted instantiation: _Z5AllocI12RuntimeErrorJP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI10ValueErrorJP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI12UnicodeErrorJP6BigStrEEPT_DpOT0_
_Z5AllocIN11syntax_asdl9loc__WordEJRPNS0_6word_tEEEPT_DpOT0_
Line
Count
Source
78
1
T* Alloc(Args&&... args) {
79
  // Alloc() allocates space for both a header and object and guarantees that
80
  // they're adjacent in memory (so that they're at known offsets from one
81
  // another). However, this means that the address that the object is
82
  // constructed at is offset from the address returned by the memory allocator
83
  // (by the size of the header), and therefore may not be sufficiently aligned.
84
  // Here we assert that the object will be sufficiently aligned by making the
85
  // equivalent assertion that zero padding would be required to align it.
86
  // Note: the required padding is given by the following (according to
87
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
88
  // `padding = -offset & (align - 1)`.
89
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
90
1
                "Expected no padding");
91
92
1
  DCHECK(gHeap.is_initialized_);
93
94
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
95
1
#if MARK_SWEEP
96
1
  int obj_id;
97
1
  int pool_id;
98
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
99
#else
100
  void* place = gHeap.Allocate(num_bytes);
101
#endif
102
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
103
1
#if MARK_SWEEP
104
1
  header->obj_id = obj_id;
105
1
  #ifndef NO_POOL_ALLOC
106
1
  header->pool_id = pool_id;
107
1
  #endif
108
1
#endif
109
1
  void* obj = header->ObjectAddress();
110
  // Now that mycpp generates code to initialize every field, we should
111
  // get rid of this.
112
  // TODO: fix uftrace failure, maybe by upgrading, or working around
113
1
  memset(obj, 0, sizeof(T));
114
1
  return new (obj) T(std::forward<Args>(args)...);
115
1
}
116
117
//
118
// String "Constructors".  We need these because of the "flexible array"
119
// pattern.  I don't think "new BigStr()" can do that, and placement new would
120
// require mycpp to generate 2 statements everywhere.
121
//
122
123
512
inline BigStr* NewStr(int len) {
124
512
  if (len == 0) {  // e.g. BufLineReader::readline() can use this optimization
125
4
    return kEmptyString;
126
4
  }
127
128
508
  int obj_len = kStrHeaderSize + len + 1;  // NUL terminator
129
508
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
130
508
#if MARK_SWEEP
131
508
  int obj_id;
132
508
  int pool_id;
133
508
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
134
#else
135
  void* place = gHeap.Allocate(num_bytes);
136
#endif
137
508
  ObjHeader* header = new (place) ObjHeader(BigStr::obj_header());
138
139
508
  auto s = new (header->ObjectAddress()) BigStr();
140
141
508
  s->data_[len] = '\0';  // NUL terminate
142
508
  s->len_ = len;
143
508
  s->hash_ = 0;
144
508
  s->is_hashed_ = 0;
145
146
508
#if MARK_SWEEP
147
508
  header->obj_id = obj_id;
148
508
  #ifndef NO_POOL_ALLOC
149
508
  header->pool_id = pool_id;
150
508
  #endif
151
508
#endif
152
508
  return s;
153
512
}
154
155
// Call OverAllocatedStr() when you don't know the length of the string up
156
// front, e.g. with snprintf().  CALLER IS RESPONSIBLE for calling
157
// s->MaybeShrink() afterward!
158
14
inline BigStr* OverAllocatedStr(int len) {
159
14
  int obj_len = kStrHeaderSize + len + 1;  // NUL terminator
160
14
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
161
14
#if MARK_SWEEP
162
14
  int obj_id;
163
14
  int pool_id;
164
14
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
165
#else
166
  void* place = gHeap.Allocate(num_bytes);
167
#endif
168
14
  ObjHeader* header = new (place) ObjHeader(BigStr::obj_header());
169
14
  auto s = new (header->ObjectAddress()) BigStr();
170
14
  s->hash_ = 0;
171
14
  s->is_hashed_ = 0;
172
173
14
#if MARK_SWEEP
174
14
  header->obj_id = obj_id;
175
14
  #ifndef NO_POOL_ALLOC
176
14
  header->pool_id = pool_id;
177
14
  #endif
178
14
#endif
179
14
  return s;
180
14
}
181
182
// Copy C string into the managed heap.
183
481
inline BigStr* StrFromC(const char* data, int len) {
184
  // Optimization that could be taken out once we have SmallStr
185
481
  if (len == 0) {
186
73
    return kEmptyString;
187
73
  }
188
408
  BigStr* s = NewStr(len);
189
408
  memcpy(s->data_, data, len);
190
408
  DCHECK(s->data_[len] == '\0');  // should be true because Heap was zeroed
191
192
0
  return s;
193
481
}
194
195
309
inline BigStr* StrFromC(const char* data) {
196
309
  return StrFromC(data, strlen(data));
197
309
}
198
199
// Create a slab with a number of entries of a certain type.
200
// Note: entries will be zero'd because we use calloc().  TODO: Consider
201
// zeroing them separately.
202
template <typename T>
203
94
inline Slab<T>* NewSlab(int len) {
204
94
  int obj_len = len * sizeof(T);
205
94
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
94
#if MARK_SWEEP
207
94
  int obj_id;
208
94
  int pool_id;
209
94
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
94
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
94
  void* obj = header->ObjectAddress();
215
94
  if (std::is_pointer<T>()) {
216
66
    memset(obj, 0, obj_len);
217
66
  }
218
94
  auto slab = new (obj) Slab<T>(len);
219
94
#if MARK_SWEEP
220
94
  header->obj_id = obj_id;
221
94
  #ifndef NO_POOL_ALLOC
222
94
  header->pool_id = pool_id;
223
94
  #endif
224
94
#endif
225
94
  return slab;
226
94
}
_Z7NewSlabIiEP4SlabIT_Ei
Line
Count
Source
203
28
inline Slab<T>* NewSlab(int len) {
204
28
  int obj_len = len * sizeof(T);
205
28
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
28
#if MARK_SWEEP
207
28
  int obj_id;
208
28
  int pool_id;
209
28
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
28
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
28
  void* obj = header->ObjectAddress();
215
28
  if (std::is_pointer<T>()) {
216
0
    memset(obj, 0, obj_len);
217
0
  }
218
28
  auto slab = new (obj) Slab<T>(len);
219
28
#if MARK_SWEEP
220
28
  header->obj_id = obj_id;
221
28
  #ifndef NO_POOL_ALLOC
222
28
  header->pool_id = pool_id;
223
28
  #endif
224
28
#endif
225
28
  return slab;
226
28
}
Unexecuted instantiation: _Z7NewSlabIbEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN10hnode_asdl5FieldEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN10hnode_asdl7hnode_tEEP4SlabIT_Ei
_Z7NewSlabIP6BigStrEP4SlabIT_Ei
Line
Count
Source
203
46
inline Slab<T>* NewSlab(int len) {
204
46
  int obj_len = len * sizeof(T);
205
46
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
46
#if MARK_SWEEP
207
46
  int obj_id;
208
46
  int pool_id;
209
46
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
46
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
46
  void* obj = header->ObjectAddress();
215
46
  if (std::is_pointer<T>()) {
216
46
    memset(obj, 0, obj_len);
217
46
  }
218
46
  auto slab = new (obj) Slab<T>(len);
219
46
#if MARK_SWEEP
220
46
  header->obj_id = obj_id;
221
46
  #ifndef NO_POOL_ALLOC
222
46
  header->pool_id = pool_id;
223
46
  #endif
224
46
#endif
225
46
  return slab;
226
46
}
_Z7NewSlabIPN4pyos11PasswdEntryEEP4SlabIT_Ei
Line
Count
Source
203
4
inline Slab<T>* NewSlab(int len) {
204
4
  int obj_len = len * sizeof(T);
205
4
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
4
#if MARK_SWEEP
207
4
  int obj_id;
208
4
  int pool_id;
209
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
4
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
4
  void* obj = header->ObjectAddress();
215
4
  if (std::is_pointer<T>()) {
216
4
    memset(obj, 0, obj_len);
217
4
  }
218
4
  auto slab = new (obj) Slab<T>(len);
219
4
#if MARK_SWEEP
220
4
  header->obj_id = obj_id;
221
4
  #ifndef NO_POOL_ALLOC
222
4
  header->pool_id = pool_id;
223
4
  #endif
224
4
#endif
225
4
  return slab;
226
4
}
Unexecuted instantiation: _Z7NewSlabIP4ListIP6Tuple2IiiEEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IiiEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IP4ListIPS1_IPS0_IiiEEEP4DictIiiEEEP4SlabIT_Ei
_Z7NewSlabIPN10value_asdl7value_tEEP4SlabIT_Ei
Line
Count
Source
203
8
inline Slab<T>* NewSlab(int len) {
204
8
  int obj_len = len * sizeof(T);
205
8
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
8
#if MARK_SWEEP
207
8
  int obj_id;
208
8
  int pool_id;
209
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
8
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
8
  void* obj = header->ObjectAddress();
215
8
  if (std::is_pointer<T>()) {
216
8
    memset(obj, 0, obj_len);
217
8
  }
218
8
  auto slab = new (obj) Slab<T>(len);
219
8
#if MARK_SWEEP
220
8
  header->obj_id = obj_id;
221
8
  #ifndef NO_POOL_ALLOC
222
8
  header->pool_id = pool_id;
223
8
  #endif
224
8
#endif
225
8
  return slab;
226
8
}
_Z7NewSlabIPN4args7_ActionEEP4SlabIT_Ei
Line
Count
Source
203
7
inline Slab<T>* NewSlab(int len) {
204
7
  int obj_len = len * sizeof(T);
205
7
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
7
#if MARK_SWEEP
207
7
  int obj_id;
208
7
  int pool_id;
209
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
7
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
7
  void* obj = header->ObjectAddress();
215
7
  if (std::is_pointer<T>()) {
216
7
    memset(obj, 0, obj_len);
217
7
  }
218
7
  auto slab = new (obj) Slab<T>(len);
219
7
#if MARK_SWEEP
220
7
  header->obj_id = obj_id;
221
7
  #ifndef NO_POOL_ALLOC
222
7
  header->pool_id = pool_id;
223
7
  #endif
224
7
#endif
225
7
  return slab;
226
7
}
Unexecuted instantiation: _Z7NewSlabIPN11pretty_asdl11MeasuredDocEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN11pretty_asdl11DocFragmentEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN11syntax_asdl12CompoundWordEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IP6BigStrbEEP4SlabIT_Ei
_Z7NewSlabIP6Tuple2IiP6BigStrEEP4SlabIT_Ei
Line
Count
Source
203
1
inline Slab<T>* NewSlab(int len) {
204
1
  int obj_len = len * sizeof(T);
205
1
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
206
1
#if MARK_SWEEP
207
1
  int obj_id;
208
1
  int pool_id;
209
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
210
#else
211
  void* place = gHeap.Allocate(num_bytes);
212
#endif
213
1
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
214
1
  void* obj = header->ObjectAddress();
215
1
  if (std::is_pointer<T>()) {
216
1
    memset(obj, 0, obj_len);
217
1
  }
218
1
  auto slab = new (obj) Slab<T>(len);
219
1
#if MARK_SWEEP
220
1
  header->obj_id = obj_id;
221
1
  #ifndef NO_POOL_ALLOC
222
1
  header->pool_id = pool_id;
223
1
  #endif
224
1
#endif
225
1
  return slab;
226
1
}
227
228
#endif  // MYCPP_GC_ALLOC_H