cpp

Coverage Report

Created: 2024-03-13 14:13

/home/andy/git/oilshell/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
#define VALIDATE_ROOTS 0
24
25
#if VALIDATE_ROOTS
26
static void ValidateRoot(const RawObject* obj) {
27
  if (obj == nullptr) {
28
    return;
29
  }
30
31
  ObjHeader* header = ObjHeader::FromObject(obj);
32
  log("obj %p header %p", obj, header);
33
34
  switch (header->heap_tag) {
35
  case HeapTag::Global:
36
  case HeapTag::Opaque:
37
  case HeapTag::Scanned:
38
  case HeapTag::FixedSize:
39
    break;
40
41
  default:
42
    log("root %p heap %d type %d mask %d len %d", obj, header->heap_tag,
43
        header->type_tag, header->u_mask_npointers);
44
    FAIL(kShouldNotGetHere);
45
    break;
46
  }
47
}
48
#endif
49
50
// mycpp generates code that keeps track of the root set
51
class StackRoot {
52
 public:
53
2.20k
  StackRoot(void* root) {
54
2.20k
    RawObject** obj = reinterpret_cast<RawObject**>(root);
55
#if VALIDATE_ROOTS
56
    ValidateRoot(*obj);
57
#endif
58
2.20k
    gHeap.PushRoot(obj);
59
2.20k
  }
60
61
2.20k
  ~StackRoot() {
62
2.20k
    gHeap.PopRoot();
63
2.20k
  }
64
};
65
66
// sugar for tests
67
class StackRoots {
68
 public:
69
  // Note: void** seems logical, because these are pointers to pointers, but
70
  // the C++ compiler doesn't like it.
71
108k
  StackRoots(std::initializer_list<void*> roots) {
72
108k
    n_ = roots.size();
73
74
#if VALIDATE_ROOTS
75
    int i = 0;
76
#endif
77
78
108k
    for (auto root : roots) {  // can't use roots[i]
79
108k
      RawObject** obj = reinterpret_cast<RawObject**>(root);
80
#if VALIDATE_ROOTS
81
      ValidateRoot(*obj);
82
      i++;
83
#endif
84
85
108k
      gHeap.PushRoot(obj);
86
108k
    }
87
108k
  }
88
89
108k
  ~StackRoots() {
90
216k
    for (int i = 0; i < n_; ++i) {
91
108k
      gHeap.PopRoot();
92
108k
    }
93
108k
  }
94
95
 private:
96
  int n_;
97
};
98
99
// Note:
100
// - This function causes code bloat due to template expansion on hundreds of
101
//   types.  Could switch to a GC_NEW() macro
102
// - GCC generates slightly larger code if you factor out void* place and new
103
//   (place) T()
104
//
105
// Variadic templates:
106
// https://eli.thegreenplace.net/2014/variadic-templates-in-c/
107
template <typename T, typename... Args>
108
1.72k
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1.72k
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1.72k
                "Expected no padding");
121
122
1.72k
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1.72k
#if MARK_SWEEP
126
1.72k
  int obj_id;
127
1.72k
  int pool_id;
128
1.72k
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1.72k
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1.72k
#if MARK_SWEEP
134
1.72k
  header->obj_id = obj_id;
135
1.72k
  #ifndef NO_POOL_ALLOC
136
1.72k
  header->pool_id = pool_id;
137
1.72k
  #endif
138
1.72k
#endif
139
1.72k
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1.72k
  memset(obj, 0, sizeof(T));
142
1.72k
  return new (obj) T(std::forward<Args>(args)...);
143
1.72k
}
_Z5AllocIN14asdl_generated17arith_expr__ConstEJiEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
Unexecuted instantiation: _Z5AllocIN14asdl_generated17arith_expr__ConstEJRiEEPT_DpOT0_
_Z5AllocIN5mylib5CFileEJRP8_IO_FILEEEPT_DpOT0_
Line
Count
Source
108
17
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
17
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
17
                "Expected no padding");
121
122
17
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
17
#if MARK_SWEEP
126
17
  int obj_id;
127
17
  int pool_id;
128
17
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
17
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
17
#if MARK_SWEEP
134
17
  header->obj_id = obj_id;
135
17
  #ifndef NO_POOL_ALLOC
136
17
  header->pool_id = pool_id;
137
17
  #endif
138
17
#endif
139
17
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
17
  memset(obj, 0, sizeof(T));
142
17
  return new (obj) T(std::forward<Args>(args)...);
143
17
}
_Z5AllocI10ValueErrorJEEPT_DpOT0_
Line
Count
Source
108
15
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
15
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
15
                "Expected no padding");
121
122
15
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
15
#if MARK_SWEEP
126
15
  int obj_id;
127
15
  int pool_id;
128
15
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
15
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
15
#if MARK_SWEEP
134
15
  header->obj_id = obj_id;
135
15
  #ifndef NO_POOL_ALLOC
136
15
  header->pool_id = pool_id;
137
15
  #endif
138
15
#endif
139
15
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
15
  memset(obj, 0, sizeof(T));
142
15
  return new (obj) T(std::forward<Args>(args)...);
143
15
}
_Z5AllocI10IndexErrorJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI7IOErrorJRiEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI4ListIP6BigStrEJEEPT_DpOT0_
Line
Count
Source
108
136
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
136
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
136
                "Expected no padding");
121
122
136
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
136
#if MARK_SWEEP
126
136
  int obj_id;
127
136
  int pool_id;
128
136
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
136
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
136
#if MARK_SWEEP
134
136
  header->obj_id = obj_id;
135
136
  #ifndef NO_POOL_ALLOC
136
136
  header->pool_id = pool_id;
137
136
  #endif
138
136
#endif
139
136
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
136
  memset(obj, 0, sizeof(T));
142
136
  return new (obj) T(std::forward<Args>(args)...);
143
136
}
_Z5AllocIN7classes10TextOutputEJRPN5mylib6WriterEEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN7classes4BaseEJDnEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN7classes8DerivedIEJDniEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN7classes9DerivedSSEJDnRP6BigStrS4_EEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN5mylib9BufWriterEJEEPT_DpOT0_
Line
Count
Source
108
123
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
123
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
123
                "Expected no padding");
121
122
123
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
123
#if MARK_SWEEP
126
123
  int obj_id;
127
123
  int pool_id;
128
123
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
123
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
123
#if MARK_SWEEP
134
123
  header->obj_id = obj_id;
135
123
  #ifndef NO_POOL_ALLOC
136
123
  header->pool_id = pool_id;
137
123
  #endif
138
123
#endif
139
123
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
123
  memset(obj, 0, sizeof(T));
142
123
  return new (obj) T(std::forward<Args>(args)...);
143
123
}
Unexecuted instantiation: _Z5AllocIN7classes10TextOutputEJRPN5mylib9BufWriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes4NodeEJDniEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes4NodeEJRPS1_RiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes8DerivedIEJRPNS0_4BaseERiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes9DerivedSSEJRPNS0_8DerivedIERP6BigStrS7_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes4BaseEJRPNS0_9DerivedSSEEEPT_DpOT0_
_Z5AllocI4ListIiEJEEPT_DpOT0_
Line
Count
Source
108
675
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
675
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
675
                "Expected no padding");
121
122
675
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
675
#if MARK_SWEEP
126
675
  int obj_id;
127
675
  int pool_id;
128
675
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
675
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
675
#if MARK_SWEEP
134
675
  header->obj_id = obj_id;
135
675
  #ifndef NO_POOL_ALLOC
136
675
  header->pool_id = pool_id;
137
675
  #endif
138
675
#endif
139
675
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
675
  memset(obj, 0, sizeof(T));
142
675
  return new (obj) T(std::forward<Args>(args)...);
143
675
}
_Z5AllocI6Tuple2IiP6BigStrEJiRS2_EEPT_DpOT0_
Line
Count
Source
108
9
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
9
                "Expected no padding");
121
122
9
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
9
#if MARK_SWEEP
126
9
  int obj_id;
127
9
  int pool_id;
128
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
9
#if MARK_SWEEP
134
9
  header->obj_id = obj_id;
135
9
  #ifndef NO_POOL_ALLOC
136
9
  header->pool_id = pool_id;
137
9
  #endif
138
9
#endif
139
9
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
9
  memset(obj, 0, sizeof(T));
142
9
  return new (obj) T(std::forward<Args>(args)...);
143
9
}
_Z5AllocIN10containers5PointEJiiEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI4DictIP6BigStriEJEEPT_DpOT0_
Line
Count
Source
108
19
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
19
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
19
                "Expected no padding");
121
122
19
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
19
#if MARK_SWEEP
126
19
  int obj_id;
127
19
  int pool_id;
128
19
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
19
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
19
#if MARK_SWEEP
134
19
  header->obj_id = obj_id;
135
19
  #ifndef NO_POOL_ALLOC
136
19
  header->pool_id = pool_id;
137
19
  #endif
138
19
#endif
139
19
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
19
  memset(obj, 0, sizeof(T));
142
19
  return new (obj) T(std::forward<Args>(args)...);
143
19
}
Unexecuted instantiation: _Z5AllocI8KeyErrorJEEPT_DpOT0_
_Z5AllocI4DictIP6BigStriEJSt16initializer_listIS2_ES4_IiEEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocIN12control_flow10ParseErrorEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI6Tuple2IP6BigStriEJRS2_iEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocI4ListIP6Tuple2IP6BigStriEEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI4ListIP6Tuple2IiP6BigStrEEJEEPT_DpOT0_
Line
Count
Source
108
5
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
5
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
5
                "Expected no padding");
121
122
5
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
5
#if MARK_SWEEP
126
5
  int obj_id;
127
5
  int pool_id;
128
5
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
5
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
5
#if MARK_SWEEP
134
5
  header->obj_id = obj_id;
135
5
  #ifndef NO_POOL_ALLOC
136
5
  header->pool_id = pool_id;
137
5
  #endif
138
5
#endif
139
5
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
5
  memset(obj, 0, sizeof(T));
142
5
  return new (obj) T(std::forward<Args>(args)...);
143
5
}
_Z5AllocIN7modules3DogEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN7module13CatEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN7modules6SphinxEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN9expr_asdl12expr__BinaryEJRP6BigStrDnDnEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI4ListIPN10hnode_asdl5FieldEEJEEPT_DpOT0_
Line
Count
Source
108
37
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
37
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
37
                "Expected no padding");
121
122
37
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
37
#if MARK_SWEEP
126
37
  int obj_id;
127
37
  int pool_id;
128
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
37
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
37
#if MARK_SWEEP
134
37
  header->obj_id = obj_id;
135
37
  #ifndef NO_POOL_ALLOC
136
37
  header->pool_id = pool_id;
137
37
  #endif
138
37
#endif
139
37
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
37
  memset(obj, 0, sizeof(T));
142
37
  return new (obj) T(std::forward<Args>(args)...);
143
37
}
_Z5AllocI4ListIPN10hnode_asdl7hnode_tEEJEEPT_DpOT0_
Line
Count
Source
108
37
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
37
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
37
                "Expected no padding");
121
122
37
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
37
#if MARK_SWEEP
126
37
  int obj_id;
127
37
  int pool_id;
128
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
37
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
37
#if MARK_SWEEP
134
37
  header->obj_id = obj_id;
135
37
  #ifndef NO_POOL_ALLOC
136
37
  header->pool_id = pool_id;
137
37
  #endif
138
37
#endif
139
37
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
37
  memset(obj, 0, sizeof(T));
142
37
  return new (obj) T(std::forward<Args>(args)...);
143
37
}
_Z5AllocIN10hnode_asdl13hnode__RecordEJRP6BigStrP4ListIPNS0_5FieldEEbS4_S4_PS5_IPNS0_7hnode_tEEEEPT_DpOT0_
Line
Count
Source
108
37
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
37
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
37
                "Expected no padding");
121
122
37
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
37
#if MARK_SWEEP
126
37
  int obj_id;
127
37
  int pool_id;
128
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
37
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
37
#if MARK_SWEEP
134
37
  header->obj_id = obj_id;
135
37
  #ifndef NO_POOL_ALLOC
136
37
  header->pool_id = pool_id;
137
37
  #endif
138
37
#endif
139
37
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
37
  memset(obj, 0, sizeof(T));
142
37
  return new (obj) T(std::forward<Args>(args)...);
143
37
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl11hnode__LeafEJRP6BigStrNS0_7color_eEEEPT_DpOT0_
_Z5AllocIN9expr_asdl11expr__ConstEJiEEPT_DpOT0_
Line
Count
Source
108
15
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
15
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
15
                "Expected no padding");
121
122
15
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
15
#if MARK_SWEEP
126
15
  int obj_id;
127
15
  int pool_id;
128
15
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
15
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
15
#if MARK_SWEEP
134
15
  header->obj_id = obj_id;
135
15
  #ifndef NO_POOL_ALLOC
136
15
  header->pool_id = pool_id;
137
15
  #endif
138
15
#endif
139
15
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
15
  memset(obj, 0, sizeof(T));
142
15
  return new (obj) T(std::forward<Args>(args)...);
143
15
}
_Z5AllocIN9expr_asdl9expr__VarEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
10
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
10
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
10
                "Expected no padding");
121
122
10
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
10
#if MARK_SWEEP
126
10
  int obj_id;
127
10
  int pool_id;
128
10
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
10
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
10
#if MARK_SWEEP
134
10
  header->obj_id = obj_id;
135
10
  #ifndef NO_POOL_ALLOC
136
10
  header->pool_id = pool_id;
137
10
  #endif
138
10
#endif
139
10
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
10
  memset(obj, 0, sizeof(T));
142
10
  return new (obj) T(std::forward<Args>(args)...);
143
10
}
_Z5AllocIN10hnode_asdl11hnode__LeafEJRP6BigStrRNS0_7color_eEEEPT_DpOT0_
Line
Count
Source
108
22
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
22
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
22
                "Expected no padding");
121
122
22
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
22
#if MARK_SWEEP
126
22
  int obj_id;
127
22
  int pool_id;
128
22
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
22
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
22
#if MARK_SWEEP
134
22
  header->obj_id = obj_id;
135
22
  #ifndef NO_POOL_ALLOC
136
22
  header->pool_id = pool_id;
137
22
  #endif
138
22
#endif
139
22
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
22
  memset(obj, 0, sizeof(T));
142
22
  return new (obj) T(std::forward<Args>(args)...);
143
22
}
_Z5AllocI4DictIibEJEEPT_DpOT0_
Line
Count
Source
108
9
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
9
                "Expected no padding");
121
122
9
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
9
#if MARK_SWEEP
126
9
  int obj_id;
127
9
  int pool_id;
128
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
9
#if MARK_SWEEP
134
9
  header->obj_id = obj_id;
135
9
  #ifndef NO_POOL_ALLOC
136
9
  header->pool_id = pool_id;
137
9
  #endif
138
9
#endif
139
9
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
9
  memset(obj, 0, sizeof(T));
142
9
  return new (obj) T(std::forward<Args>(args)...);
143
9
}
_Z5AllocI4DictIiiEJEEPT_DpOT0_
Line
Count
Source
108
16
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
16
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
16
                "Expected no padding");
121
122
16
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
16
#if MARK_SWEEP
126
16
  int obj_id;
127
16
  int pool_id;
128
16
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
16
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
16
#if MARK_SWEEP
134
16
  header->obj_id = obj_id;
135
16
  #ifndef NO_POOL_ALLOC
136
16
  header->pool_id = pool_id;
137
16
  #endif
138
16
#endif
139
16
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
16
  memset(obj, 0, sizeof(T));
142
16
  return new (obj) T(std::forward<Args>(args)...);
143
16
}
Unexecuted instantiation: _Z5AllocIN6format10AnsiOutputEJRPN5mylib6WriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6format10TextOutputEJRPN5mylib6WriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6format10TextOutputEJPN5mylib9BufWriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6format10HtmlOutputEJPN5mylib9BufWriterEEEPT_DpOT0_
_Z5AllocIN6format10AnsiOutputEJPN5mylib9BufWriterEEEPT_DpOT0_
Line
Count
Source
108
32
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
32
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
32
                "Expected no padding");
121
122
32
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
32
#if MARK_SWEEP
126
32
  int obj_id;
127
32
  int pool_id;
128
32
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
32
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
32
#if MARK_SWEEP
134
32
  header->obj_id = obj_id;
135
32
  #ifndef NO_POOL_ALLOC
136
32
  header->pool_id = pool_id;
137
32
  #endif
138
32
#endif
139
32
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
32
  memset(obj, 0, sizeof(T));
142
32
  return new (obj) T(std::forward<Args>(args)...);
143
32
}
_Z5AllocI6Tuple2IP6BigStriEJRS2_RiEEPT_DpOT0_
Line
Count
Source
108
23
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
23
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
23
                "Expected no padding");
121
122
23
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
23
#if MARK_SWEEP
126
23
  int obj_id;
127
23
  int pool_id;
128
23
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
23
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
23
#if MARK_SWEEP
134
23
  header->obj_id = obj_id;
135
23
  #ifndef NO_POOL_ALLOC
136
23
  header->pool_id = pool_id;
137
23
  #endif
138
23
#endif
139
23
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
23
  memset(obj, 0, sizeof(T));
142
23
  return new (obj) T(std::forward<Args>(args)...);
143
23
}
_Z5AllocIN6format14_PrettyPrinterEJiEEPT_DpOT0_
Line
Count
Source
108
9
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
9
                "Expected no padding");
121
122
9
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
9
#if MARK_SWEEP
126
9
  int obj_id;
127
9
  int pool_id;
128
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
9
#if MARK_SWEEP
134
9
  header->obj_id = obj_id;
135
9
  #ifndef NO_POOL_ALLOC
136
9
  header->pool_id = pool_id;
137
9
  #endif
138
9
#endif
139
9
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
9
  memset(obj, 0, sizeof(T));
142
9
  return new (obj) T(std::forward<Args>(args)...);
143
9
}
_Z5AllocIN5parse10ParseErrorEJP6BigStrEEPT_DpOT0_
Line
Count
Source
108
5
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
5
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
5
                "Expected no padding");
121
122
5
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
5
#if MARK_SWEEP
126
5
  int obj_id;
127
5
  int pool_id;
128
5
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
5
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
5
#if MARK_SWEEP
134
5
  header->obj_id = obj_id;
135
5
  #ifndef NO_POOL_ALLOC
136
5
  header->pool_id = pool_id;
137
5
  #endif
138
5
#endif
139
5
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
5
  memset(obj, 0, sizeof(T));
142
5
  return new (obj) T(std::forward<Args>(args)...);
143
5
}
_Z5AllocIN9expr_asdl12expr__BinaryEJRP6BigStrRPNS0_6expr_tES7_EEPT_DpOT0_
Line
Count
Source
108
14
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
14
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
14
                "Expected no padding");
121
122
14
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
14
#if MARK_SWEEP
126
14
  int obj_id;
127
14
  int pool_id;
128
14
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
14
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
14
#if MARK_SWEEP
134
14
  header->obj_id = obj_id;
135
14
  #ifndef NO_POOL_ALLOC
136
14
  header->pool_id = pool_id;
137
14
  #endif
138
14
#endif
139
14
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
14
  memset(obj, 0, sizeof(T));
142
14
  return new (obj) T(std::forward<Args>(args)...);
143
14
}
_Z5AllocIN5parse5LexerEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
14
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
14
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
14
                "Expected no padding");
121
122
14
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
14
#if MARK_SWEEP
126
14
  int obj_id;
127
14
  int pool_id;
128
14
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
14
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
14
#if MARK_SWEEP
134
14
  header->obj_id = obj_id;
135
14
  #ifndef NO_POOL_ALLOC
136
14
  header->pool_id = pool_id;
137
14
  #endif
138
14
#endif
139
14
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
14
  memset(obj, 0, sizeof(T));
142
14
  return new (obj) T(std::forward<Args>(args)...);
143
14
}
_Z5AllocIN5parse6ParserEJRPNS0_5LexerEEEPT_DpOT0_
Line
Count
Source
108
13
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
13
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
13
                "Expected no padding");
121
122
13
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
13
#if MARK_SWEEP
126
13
  int obj_id;
127
13
  int pool_id;
128
13
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
13
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
13
#if MARK_SWEEP
134
13
  header->obj_id = obj_id;
135
13
  #ifndef NO_POOL_ALLOC
136
13
  header->pool_id = pool_id;
137
13
  #endif
138
13
#endif
139
13
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
13
  memset(obj, 0, sizeof(T));
142
13
  return new (obj) T(std::forward<Args>(args)...);
143
13
}
_Z5AllocIN6format10AnsiOutputEJPN5mylib6WriterEEEPT_DpOT0_
Line
Count
Source
108
9
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
9
                "Expected no padding");
121
122
9
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
9
#if MARK_SWEEP
126
9
  int obj_id;
127
9
  int pool_id;
128
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
9
#if MARK_SWEEP
134
9
  header->obj_id = obj_id;
135
9
  #ifndef NO_POOL_ALLOC
136
9
  header->pool_id = pool_id;
137
9
  #endif
138
9
#endif
139
9
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
9
  memset(obj, 0, sizeof(T));
142
9
  return new (obj) T(std::forward<Args>(args)...);
143
9
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl18hnode__AlreadySeenEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl12hnode__ArrayEJP4ListIPNS0_7hnode_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl15hnode__ExternalEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJRP6BigStrDnEEPT_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: _Z5AllocI4ListIPN11syntax_asdl5TokenEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl14eggex_ops__YesEJP4ListIPNS0_7value_tEEPS2_IPN11syntax_asdl5TokenEEPS2_IP6BigStrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BashArrayEJP4ListIP6BigStrEEEPT_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__EggexEJDnRP6BigStrP4ListIPNS0_7value_tEEPS5_IPN11syntax_asdl5TokenEEDnPS5_IS3_EEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl15value__TemplateEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl14value__CommandEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__BlockEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__PlaceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl13value__ModuleEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl9value__IOEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__GutsEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl18value__BuiltinFuncEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl16value__BoundFuncEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__ProcEJRP6BigStrDnDnDnDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__FuncEJRP6BigStrDnP4ListIPNS0_7value_tEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__SliceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__RangeEJiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl6IntBoxEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12ProcDefaultsEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl8LeftNameEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl10RegexMatchEJRP6BigStrP4ListIiEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl18hnode__AlreadySeenEJRiEEPT_DpOT0_
_Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_7hnode_tEEEPT_DpOT0_
Line
Count
Source
108
65
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
65
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
65
                "Expected no padding");
121
122
65
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
65
#if MARK_SWEEP
126
65
  int obj_id;
127
65
  int pool_id;
128
65
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
65
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
65
#if MARK_SWEEP
134
65
  header->obj_id = obj_id;
135
65
  #ifndef NO_POOL_ALLOC
136
65
  header->pool_id = pool_id;
137
65
  #endif
138
65
#endif
139
65
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
65
  memset(obj, 0, sizeof(T));
142
65
  return new (obj) T(std::forward<Args>(args)...);
143
65
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP6BigStrRPNS0_12hnode__ArrayEEEPT_DpOT0_
_Z5AllocIN10hnode_asdl11hnode__LeafEJP6BigStrNS0_7color_eEEEPT_DpOT0_
Line
Count
Source
108
15
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
15
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
15
                "Expected no padding");
121
122
15
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
15
#if MARK_SWEEP
126
15
  int obj_id;
127
15
  int pool_id;
128
15
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
15
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
15
#if MARK_SWEEP
134
15
  header->obj_id = obj_id;
135
15
  #ifndef NO_POOL_ALLOC
136
15
  header->pool_id = pool_id;
137
15
  #endif
138
15
#endif
139
15
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
15
  memset(obj, 0, sizeof(T));
142
15
  return new (obj) T(std::forward<Args>(args)...);
143
15
}
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15cmd_value__ArgvEJP4ListIP6BigStrEPS2_IPN11syntax_asdl12CompoundWordEEDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl9AssignArgEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17cmd_value__AssignEJiP4ListIP6BigStrEPS2_IPN11syntax_asdl12CompoundWordEEPS2_IPNS0_9AssignArgEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl18part_value__StringEJRP6BigStrbbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17part_value__ArrayEJP4ListIP6BigStrEEEPT_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__ProcEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl21wait_status__PipelineEJP4ListIiEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl22wait_status__CancelledEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15trace__ExternalEJP4ListIP6BigStrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl9AssignArgEJRP6BigStrDnbDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11VarSubStateEJbbEEPT_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: _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_asdl19source__SourcedFileEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__ArgvWordEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__VariableEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__VarRefEJDnEEPT_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_asdl17debug_frame__MainEJRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19debug_frame__SourceEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17debug_frame__CallEJDnDnRP6BigStrEEPT_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: _Z5AllocI4ListIPN11syntax_asdl9AssocPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl27word_part__BashAssocLiteralEJDnP4ListIPNS0_9AssocPairEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl25word_part__EscapedLiteralEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__TildeSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__ArithSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedTupleEJP4ListIPNS0_12CompoundWordEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedRangeEJDniRP6BigStrS4_iEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18word_part__ExtGlobEJDnP4ListIPNS0_12CompoundWordEEDnEEPT_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__BinaryEJiDnDnEEPT_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_asdl20redir_param__HereDocEJDnDnP4ListIPNS0_11word_part_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9command_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16condition__ShellEJP4ListIPNS0_9command_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_asdl7EnvPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5RedirEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__SimpleEJDnP4ListIPNS0_7EnvPairEEPS2_IPNS0_6word_tEEPS2_IPNS0_5RedirEEDnDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22command__ExpandedAliasEJDnP4ListIPNS0_5RedirEEPS2_IPNS0_7EnvPairEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SentenceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10AssignPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21command__ShAssignmentEJDnP4ListIPNS0_10AssignPairEEPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__RetvalEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__ControlFlowEJDnDnEEPT_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__SubshellEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__DParenEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__DBracketEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForEachEJDnP4ListIP6BigStrEDnDnDnPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForExprEJDnDnDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__WhileUntilEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5IfArmEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11command__IfEJDnP4ListIPNS0_5IfArmEEDnPS2_IPNS0_9command_tEEDnPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7CaseArmEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__CaseEJDnDnDnP4ListIPNS0_7CaseArmEEDnPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__ShFunctionEJDnDnRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18command__TimeBlockEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__CommandListEJP4ListIPNS0_9command_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NameTypeEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__VarDeclEJDnP4ListIPNS0_8NameTypeEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__BareDeclEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7y_lhs_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__MutationEJDnP4ListIPNS0_7y_lhs_tEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__ExprEJDnDnEEPT_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__LiteralEJDnEEPT_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: _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_asdl25class_literal_term__RangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl31class_literal_term__CharLiteralEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl26class_literal_term__SpliceEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22char_class_term__RangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re_repeat__OpEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14re_repeat__NumEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re_repeat__RangeEJDnDnEEPT_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_asdl13re__PrimitiveEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__LiteralCharsEJRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BoolParamBoxEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11IntParamBoxEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10SourceLineEJiRP6BigStrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5TokenEJiiiiDnDnEEPT_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_asdl12SingleQuotedEJDnP4ListIPNS0_5TokenEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7NameTokEJDnRP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10CommandSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14ShArrayLiteralEJDnP4ListIPNS0_6word_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NamedArgEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7ArgListEJDnP4ListIPNS0_6expr_tEEDnPS2_IPNS0_8NamedArgEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AssocPairEJDnDnEEPT_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_tEEPS2_IiEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10BraceGroupEJDnDnP4ListIPNS0_9command_tEEPS2_IPNS0_5RedirEEDnEEPT_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: _Z5AllocI4ListIPN11syntax_asdl10SourceLineEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12LiteralBlockEJDnP4ListIPNS0_10SourceLineEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16ParsedAssignmentEJDnDniDnEEPT_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_asdl8CharCodeEJibDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl15hnode__ExternalEJRPvEEPT_DpOT0_
_Z5AllocIN15scoped_resource7MyErrorEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15scoped_resource8DirStackEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI4ListIbEJEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocIN9test_cast11ColorOutputEJRPN5mylib9BufWriterEEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN9test_cast12value__EggexEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocIN9test_cast10value__IntEJiEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI4DictIP6BigStrS2_EJEEPT_DpOT0_
Line
Count
Source
108
9
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
9
                "Expected no padding");
121
122
9
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
9
#if MARK_SWEEP
126
9
  int obj_id;
127
9
  int pool_id;
128
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
9
#if MARK_SWEEP
134
9
  header->obj_id = obj_id;
135
9
  #ifndef NO_POOL_ALLOC
136
9
  header->pool_id = pool_id;
137
9
  #endif
138
9
#endif
139
9
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
9
  memset(obj, 0, sizeof(T));
142
9
  return new (obj) T(std::forward<Args>(args)...);
143
9
}
_Z5AllocIN15test_classes_gc6OpaqueEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc10OpaqueBaseEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc13OpaqueDerivedEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc8PointersEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc12PointersBaseEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc15PointersDerivedEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc14BaseWithMethodEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc17DerivedWithMethodEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc8WithDictEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN15test_classes_gc6PrintfEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
Unexecuted instantiation: _Z5AllocI4ListIPN15test_classes_gc10OpaqueBaseEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN15test_classes_gc12PointersBaseEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN15test_classes_gc14BaseWithMethodEEJEEPT_DpOT0_
_Z5AllocIN17test_default_args3FooEJiEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN17test_default_args3FooEJiiEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocIN12test_globals7MyClassEJiEEPT_DpOT0_
Line
Count
Source
108
10
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
10
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
10
                "Expected no padding");
121
122
10
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
10
#if MARK_SWEEP
126
10
  int obj_id;
127
10
  int pool_id;
128
10
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
10
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
10
#if MARK_SWEEP
134
10
  header->obj_id = obj_id;
135
10
  #ifndef NO_POOL_ALLOC
136
10
  header->pool_id = pool_id;
137
10
  #endif
138
10
#endif
139
10
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
10
  memset(obj, 0, sizeof(T));
142
10
  return new (obj) T(std::forward<Args>(args)...);
143
10
}
_Z5AllocI7OSErrorJiEEPT_DpOT0_
Line
Count
Source
108
4
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
4
                "Expected no padding");
121
122
4
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
4
#if MARK_SWEEP
126
4
  int obj_id;
127
4
  int pool_id;
128
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
4
#if MARK_SWEEP
134
4
  header->obj_id = obj_id;
135
4
  #ifndef NO_POOL_ALLOC
136
4
  header->pool_id = pool_id;
137
4
  #endif
138
4
#endif
139
4
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
4
  memset(obj, 0, sizeof(T));
142
4
  return new (obj) T(std::forward<Args>(args)...);
143
4
}
_Z5AllocI6Tuple2IiP6BigStrEJRiS2_EEPT_DpOT0_
Line
Count
Source
108
11
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
11
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
11
                "Expected no padding");
121
122
11
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
11
#if MARK_SWEEP
126
11
  int obj_id;
127
11
  int pool_id;
128
11
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
11
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
11
#if MARK_SWEEP
134
11
  header->obj_id = obj_id;
135
11
  #ifndef NO_POOL_ALLOC
136
11
  header->pool_id = pool_id;
137
11
  #endif
138
11
#endif
139
11
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
11
  memset(obj, 0, sizeof(T));
142
11
  return new (obj) T(std::forward<Args>(args)...);
143
11
}
_Z5AllocI13StopIterationJEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocIN14test_iterators3FooEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN12test_strings3FooEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI6Tuple2IP6BigStriEJS2_iEEPT_DpOT0_
Line
Count
Source
108
10
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
10
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
10
                "Expected no padding");
121
122
10
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
10
#if MARK_SWEEP
126
10
  int obj_id;
127
10
  int pool_id;
128
10
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
10
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
10
#if MARK_SWEEP
134
10
  header->obj_id = obj_id;
135
10
  #ifndef NO_POOL_ALLOC
136
10
  header->pool_id = pool_id;
137
10
  #endif
138
10
#endif
139
10
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
10
  memset(obj, 0, sizeof(T));
142
10
  return new (obj) T(std::forward<Args>(args)...);
143
10
}
_Z5AllocI10ValueErrorJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI12RuntimeErrorJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI12UnicodeErrorJP6BigStrEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI7IOErrorJiEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocI4DictIiP6BigStrEJSt16initializer_listIiES4_IS2_EEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI4DictIiP6BigStrEJEEPT_DpOT0_
Line
Count
Source
108
8
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
8
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
8
                "Expected no padding");
121
122
8
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
8
#if MARK_SWEEP
126
8
  int obj_id;
127
8
  int pool_id;
128
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
8
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
8
#if MARK_SWEEP
134
8
  header->obj_id = obj_id;
135
8
  #ifndef NO_POOL_ALLOC
136
8
  header->pool_id = pool_id;
137
8
  #endif
138
8
#endif
139
8
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
8
  memset(obj, 0, sizeof(T));
142
8
  return new (obj) T(std::forward<Args>(args)...);
143
8
}
_Z5AllocI4ListIP6Tuple2IiiEEJEEPT_DpOT0_
Line
Count
Source
108
4
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
4
                "Expected no padding");
121
122
4
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
4
#if MARK_SWEEP
126
4
  int obj_id;
127
4
  int pool_id;
128
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
4
#if MARK_SWEEP
134
4
  header->obj_id = obj_id;
135
4
  #ifndef NO_POOL_ALLOC
136
4
  header->pool_id = pool_id;
137
4
  #endif
138
4
#endif
139
4
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
4
  memset(obj, 0, sizeof(T));
142
4
  return new (obj) T(std::forward<Args>(args)...);
143
4
}
_Z5AllocI6Tuple2IiiEJiiEEPT_DpOT0_
Line
Count
Source
108
19
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
19
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
19
                "Expected no padding");
121
122
19
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
19
#if MARK_SWEEP
126
19
  int obj_id;
127
19
  int pool_id;
128
19
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
19
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
19
#if MARK_SWEEP
134
19
  header->obj_id = obj_id;
135
19
  #ifndef NO_POOL_ALLOC
136
19
  header->pool_id = pool_id;
137
19
  #endif
138
19
#endif
139
19
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
19
  memset(obj, 0, sizeof(T));
142
19
  return new (obj) T(std::forward<Args>(args)...);
143
19
}
_Z5AllocI4DictIP6Tuple2IiiEiEJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI4DictIP6Tuple2IP6BigStriEiEJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI5PointJiiEEPT_DpOT0_
Line
Count
Source
108
4
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
4
                "Expected no padding");
121
122
4
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
4
#if MARK_SWEEP
126
4
  int obj_id;
127
4
  int pool_id;
128
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
4
#if MARK_SWEEP
134
4
  header->obj_id = obj_id;
135
4
  #ifndef NO_POOL_ALLOC
136
4
  header->pool_id = pool_id;
137
4
  #endif
138
4
#endif
139
4
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
4
  memset(obj, 0, sizeof(T));
142
4
  return new (obj) T(std::forward<Args>(args)...);
143
4
}
_Z5AllocI4LineJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI10DerivedObjJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI4ListIPiEJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI4ListIdEJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocIN5mylib13BufLineReaderEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
6
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
6
                "Expected no padding");
121
122
6
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
6
#if MARK_SWEEP
126
6
  int obj_id;
127
6
  int pool_id;
128
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
6
#if MARK_SWEEP
134
6
  header->obj_id = obj_id;
135
6
  #ifndef NO_POOL_ALLOC
136
6
  header->pool_id = pool_id;
137
6
  #endif
138
6
#endif
139
6
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
6
  memset(obj, 0, sizeof(T));
142
6
  return new (obj) T(std::forward<Args>(args)...);
143
6
}
_Z5AllocI6Tuple2IiP6BigStrEJiS2_EEPT_DpOT0_
Line
Count
Source
108
7
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
7
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
7
                "Expected no padding");
121
122
7
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
7
#if MARK_SWEEP
126
7
  int obj_id;
127
7
  int pool_id;
128
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
7
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
7
#if MARK_SWEEP
134
7
  header->obj_id = obj_id;
135
7
  #ifndef NO_POOL_ALLOC
136
7
  header->pool_id = pool_id;
137
7
  #endif
138
7
#endif
139
7
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
7
  memset(obj, 0, sizeof(T));
142
7
  return new (obj) T(std::forward<Args>(args)...);
143
7
}
_Z5AllocI6Tuple3IiP6BigStrS2_EJiS2_S2_EEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI6Tuple4IiP6BigStrS2_iEJiS2_S2_iEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI6Tuple2IiPS0_IiP6BigStrEEJiRS4_EEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocI4NodeJEEPT_DpOT0_
Line
Count
Source
108
4
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
4
                "Expected no padding");
121
122
4
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
4
#if MARK_SWEEP
126
4
  int obj_id;
127
4
  int pool_id;
128
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
4
#if MARK_SWEEP
134
4
  header->obj_id = obj_id;
135
4
  #ifndef NO_POOL_ALLOC
136
4
  header->pool_id = pool_id;
137
4
  #endif
138
4
#endif
139
4
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
4
  memset(obj, 0, sizeof(T));
142
4
  return new (obj) T(std::forward<Args>(args)...);
143
4
}
_Z5AllocIN5Slice7MembersEJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocIN4pyos9ReadErrorEJiEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI7OSErrorJRiEEPT_DpOT0_
Line
Count
Source
108
4
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
4
                "Expected no padding");
121
122
4
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
4
#if MARK_SWEEP
126
4
  int obj_id;
127
4
  int pool_id;
128
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
4
#if MARK_SWEEP
134
4
  header->obj_id = obj_id;
135
4
  #ifndef NO_POOL_ALLOC
136
4
  header->pool_id = pool_id;
137
4
  #endif
138
4
#endif
139
4
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
4
  memset(obj, 0, sizeof(T));
142
4
  return new (obj) T(std::forward<Args>(args)...);
143
4
}
Unexecuted instantiation: _Z5AllocI17KeyboardInterruptJEEPT_DpOT0_
_Z5AllocI4ListIPN4pyos11PasswdEntryEEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN4pyos11PasswdEntryEJRP6passwdEEPT_DpOT0_
Line
Count
Source
108
76
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
76
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
76
                "Expected no padding");
121
122
76
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
76
#if MARK_SWEEP
126
76
  int obj_id;
127
76
  int pool_id;
128
76
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
76
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
76
#if MARK_SWEEP
134
76
  header->obj_id = obj_id;
135
76
  #ifndef NO_POOL_ALLOC
136
76
  header->pool_id = pool_id;
137
76
  #endif
138
76
#endif
139
76
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
76
  memset(obj, 0, sizeof(T));
142
76
  return new (obj) T(std::forward<Args>(args)...);
143
76
}
_Z5AllocIN4pyos10SignalSafeEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocI6Tuple2IP6BigStriEJRS2_RlEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN6pyutil15_ResourceLoaderEJEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
Unexecuted instantiation: _Z5AllocIN7grammar7GrammarEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4DictIiP6Tuple2IP4ListIPS2_IPS1_IiiEEEPS0_IiiEEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPS0_IP6Tuple2IiiEEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI6Tuple2IP4ListIPS1_IPS0_IiiEEEP4DictIiiEEJRS7_RSA_EEPT_DpOT0_
_Z5AllocIN10value_asdl10value__StrEJRP6BigStrEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocIN9flag_spec16_FlagSpecAndMoreEJEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
_Z5AllocIN9flag_spec9_FlagSpecEJEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl11value__BoolEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl10value__IntEJiEEPT_DpOT0_
_Z5AllocIN10value_asdl11value__BoolEJRbEEPT_DpOT0_
Line
Count
Source
108
21
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
21
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
21
                "Expected no padding");
121
122
21
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
21
#if MARK_SWEEP
126
21
  int obj_id;
127
21
  int pool_id;
128
21
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
21
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
21
#if MARK_SWEEP
134
21
  header->obj_id = obj_id;
135
21
  #ifndef NO_POOL_ALLOC
136
21
  header->pool_id = pool_id;
137
21
  #endif
138
21
#endif
139
21
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
21
  memset(obj, 0, sizeof(T));
142
21
  return new (obj) T(std::forward<Args>(args)...);
143
21
}
_Z5AllocIN10value_asdl10value__IntEJRiEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FloatEJRfEEPT_DpOT0_
_Z5AllocIN10value_asdl10value__StrEJP6BigStrEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
_Z5AllocIN4args11SetToStringEJP6BigStrbRP4ListIS3_EEEPT_DpOT0_
Line
Count
Source
108
7
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
7
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
7
                "Expected no padding");
121
122
7
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
7
#if MARK_SWEEP
126
7
  int obj_id;
127
7
  int pool_id;
128
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
7
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
7
#if MARK_SWEEP
134
7
  header->obj_id = obj_id;
135
7
  #ifndef NO_POOL_ALLOC
136
7
  header->pool_id = pool_id;
137
7
  #endif
138
7
#endif
139
7
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
7
  memset(obj, 0, sizeof(T));
142
7
  return new (obj) T(std::forward<Args>(args)...);
143
7
}
_Z5AllocIN4args11SetToStringEJP6BigStrbDnEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
_Z5AllocIN4args8SetToIntEJP6BigStrEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
Unexecuted instantiation: _Z5AllocIN4args10SetToFloatEJP6BigStrEEPT_DpOT0_
_Z5AllocIN4args9SetToTrueEJP6BigStrEEPT_DpOT0_
Line
Count
Source
108
11
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
11
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
11
                "Expected no padding");
121
122
11
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
11
#if MARK_SWEEP
126
11
  int obj_id;
127
11
  int pool_id;
128
11
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
11
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
11
#if MARK_SWEEP
134
11
  header->obj_id = obj_id;
135
11
  #ifndef NO_POOL_ALLOC
136
11
  header->pool_id = pool_id;
137
11
  #endif
138
11
#endif
139
11
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
11
  memset(obj, 0, sizeof(T));
142
11
  return new (obj) T(std::forward<Args>(args)...);
143
11
}
Unexecuted instantiation: _Z5AllocIN4args15SetAttachedBoolEJP6BigStrEEPT_DpOT0_
_Z5AllocIN4args9SetOptionEJP6BigStrEEPT_DpOT0_
Line
Count
Source
108
8
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
8
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
8
                "Expected no padding");
121
122
8
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
8
#if MARK_SWEEP
126
8
  int obj_id;
127
8
  int pool_id;
128
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
8
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
8
#if MARK_SWEEP
134
8
  header->obj_id = obj_id;
135
8
  #ifndef NO_POOL_ALLOC
136
8
  header->pool_id = pool_id;
137
8
  #endif
138
8
#endif
139
8
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
8
  memset(obj, 0, sizeof(T));
142
8
  return new (obj) T(std::forward<Args>(args)...);
143
8
}
_Z5AllocIN4args14SetNamedOptionEJbEEPT_DpOT0_
Line
Count
Source
108
2
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
2
                "Expected no padding");
121
122
2
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
2
#if MARK_SWEEP
126
2
  int obj_id;
127
2
  int pool_id;
128
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
2
#if MARK_SWEEP
134
2
  header->obj_id = obj_id;
135
2
  #ifndef NO_POOL_ALLOC
136
2
  header->pool_id = pool_id;
137
2
  #endif
138
2
#endif
139
2
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
2
  memset(obj, 0, sizeof(T));
142
2
  return new (obj) T(std::forward<Args>(args)...);
143
2
}
Unexecuted instantiation: _Z5AllocIN4args9SetActionEJP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN4args14SetNamedActionEJEEPT_DpOT0_
_Z5AllocI4DictIP6BigStrPN4args7_ActionEEJEEPT_DpOT0_
Line
Count
Source
108
6
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
6
                "Expected no padding");
121
122
6
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
6
#if MARK_SWEEP
126
6
  int obj_id;
127
6
  int pool_id;
128
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
6
#if MARK_SWEEP
134
6
  header->obj_id = obj_id;
135
6
  #ifndef NO_POOL_ALLOC
136
6
  header->pool_id = pool_id;
137
6
  #endif
138
6
#endif
139
6
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
6
  memset(obj, 0, sizeof(T));
142
6
  return new (obj) T(std::forward<Args>(args)...);
143
6
}
_Z5AllocI4DictIP6BigStrPN10value_asdl7value_tEEJEEPT_DpOT0_
Line
Count
Source
108
3
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
3
                "Expected no padding");
121
122
3
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
3
#if MARK_SWEEP
126
3
  int obj_id;
127
3
  int pool_id;
128
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
3
#if MARK_SWEEP
134
3
  header->obj_id = obj_id;
135
3
  #ifndef NO_POOL_ALLOC
136
3
  header->pool_id = pool_id;
137
3
  #endif
138
3
#endif
139
3
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
3
  memset(obj, 0, sizeof(T));
142
3
  return new (obj) T(std::forward<Args>(args)...);
143
3
}
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
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
Unexecuted instantiation: _Z5AllocIN5error12FatalRuntimeEJRiRP6BigStrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIP6Tuple2IP6BigStrbEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10value_asdl12value__FloatEJRdEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI6Tuple2IP6BigStrbEJRS2_RbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN4args11_AttributesEJRP4DictIP6BigStrPN10value_asdl7value_tEEEEPT_DpOT0_
_Z5AllocIN5match11SimpleLexerEJPFvPKhiiPiS4_ERP6BigStrEEPT_DpOT0_
Line
Count
Source
108
4
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
4
                "Expected no padding");
121
122
4
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
4
#if MARK_SWEEP
126
4
  int obj_id;
127
4
  int pool_id;
128
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
4
#if MARK_SWEEP
134
4
  header->obj_id = obj_id;
135
4
  #ifndef NO_POOL_ALLOC
136
4
  header->pool_id = pool_id;
137
4
  #endif
138
4
#endif
139
4
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
4
  memset(obj, 0, sizeof(T));
142
4
  return new (obj) T(std::forward<Args>(args)...);
143
4
}
Unexecuted instantiation: _Z5AllocI12RuntimeErrorJP6BigStrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI10ValueErrorJP6BigStrEEPT_DpOT0_
_Z5AllocIN11syntax_asdl9loc__WordEJRPNS0_6word_tEEEPT_DpOT0_
Line
Count
Source
108
1
T* Alloc(Args&&... args) {
109
  // Alloc() allocates space for both a header and object and guarantees that
110
  // they're adjacent in memory (so that they're at known offsets from one
111
  // another). However, this means that the address that the object is
112
  // constructed at is offset from the address returned by the memory allocator
113
  // (by the size of the header), and therefore may not be sufficiently aligned.
114
  // Here we assert that the object will be sufficiently aligned by making the
115
  // equivalent assertion that zero padding would be required to align it.
116
  // Note: the required padding is given by the following (according to
117
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
118
  // `padding = -offset & (align - 1)`.
119
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
120
1
                "Expected no padding");
121
122
1
  DCHECK(gHeap.is_initialized_);
123
124
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
125
1
#if MARK_SWEEP
126
1
  int obj_id;
127
1
  int pool_id;
128
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
129
#else
130
  void* place = gHeap.Allocate(num_bytes);
131
#endif
132
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
133
1
#if MARK_SWEEP
134
1
  header->obj_id = obj_id;
135
1
  #ifndef NO_POOL_ALLOC
136
1
  header->pool_id = pool_id;
137
1
  #endif
138
1
#endif
139
1
  void* obj = header->ObjectAddress();
140
  // mycpp doesn't generated constructors that initialize every field
141
1
  memset(obj, 0, sizeof(T));
142
1
  return new (obj) T(std::forward<Args>(args)...);
143
1
}
144
145
//
146
// String "Constructors".  We need these because of the "flexible array"
147
// pattern.  I don't think "new BigStr()" can do that, and placement new would
148
// require mycpp to generate 2 statements everywhere.
149
//
150
151
6.29k
inline BigStr* NewStr(int len) {
152
6.29k
  if (len == 0) {  // e.g. BufLineReader::readline() can use this optimization
153
380
    return kEmptyString;
154
380
  }
155
156
5.91k
  int obj_len = kStrHeaderSize + len + 1;  // NUL terminator
157
5.91k
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
158
5.91k
#if MARK_SWEEP
159
5.91k
  int obj_id;
160
5.91k
  int pool_id;
161
5.91k
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
162
#else
163
  void* place = gHeap.Allocate(num_bytes);
164
#endif
165
5.91k
  ObjHeader* header = new (place) ObjHeader(BigStr::obj_header());
166
167
5.91k
  auto s = new (header->ObjectAddress()) BigStr();
168
169
5.91k
  s->data_[len] = '\0';  // NUL terminate
170
5.91k
  s->len_ = len;
171
5.91k
  s->hash_ = 0;
172
5.91k
  s->is_hashed_ = 0;
173
174
5.91k
#if MARK_SWEEP
175
5.91k
  header->obj_id = obj_id;
176
5.91k
  #ifndef NO_POOL_ALLOC
177
5.91k
  header->pool_id = pool_id;
178
5.91k
  #endif
179
5.91k
#endif
180
5.91k
  return s;
181
6.29k
}
182
183
// Call OverAllocatedStr() when you don't know the length of the string up
184
// front, e.g. with snprintf().  CALLER IS RESPONSIBLE for calling
185
// s->MaybeShrink() afterward!
186
102
inline BigStr* OverAllocatedStr(int len) {
187
102
  int obj_len = kStrHeaderSize + len + 1;  // NUL terminator
188
102
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
189
102
#if MARK_SWEEP
190
102
  int obj_id;
191
102
  int pool_id;
192
102
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
193
#else
194
  void* place = gHeap.Allocate(num_bytes);
195
#endif
196
102
  ObjHeader* header = new (place) ObjHeader(BigStr::obj_header());
197
102
  auto s = new (header->ObjectAddress()) BigStr();
198
102
  s->hash_ = 0;
199
102
  s->is_hashed_ = 0;
200
201
102
#if MARK_SWEEP
202
102
  header->obj_id = obj_id;
203
102
  #ifndef NO_POOL_ALLOC
204
102
  header->pool_id = pool_id;
205
102
  #endif
206
102
#endif
207
102
  return s;
208
102
}
209
210
// Copy C string into the managed heap.
211
3.01k
inline BigStr* StrFromC(const char* data, int len) {
212
  // Optimization that could be taken out once we have SmallStr
213
3.01k
  if (len == 0) {
214
229
    return kEmptyString;
215
229
  }
216
2.78k
  BigStr* s = NewStr(len);
217
2.78k
  memcpy(s->data_, data, len);
218
2.78k
  DCHECK(s->data_[len] == '\0');  // should be true because Heap was zeroed
219
220
0
  return s;
221
3.01k
}
222
223
1.59k
inline BigStr* StrFromC(const char* data) {
224
1.59k
  return StrFromC(data, strlen(data));
225
1.59k
}
226
227
// Create a slab with a number of entries of a certain type.
228
// Note: entries will be zero'd because we use calloc().  TODO: Consider
229
// zeroing them separately.
230
template <typename T>
231
1.28k
inline Slab<T>* NewSlab(int len) {
232
1.28k
  int obj_len = len * sizeof(T);
233
1.28k
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
1.28k
#if MARK_SWEEP
235
1.28k
  int obj_id;
236
1.28k
  int pool_id;
237
1.28k
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
1.28k
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
1.28k
  void* obj = header->ObjectAddress();
243
1.28k
  if (std::is_pointer<T>()) {
244
312
    memset(obj, 0, obj_len);
245
312
  }
246
1.28k
  auto slab = new (obj) Slab<T>(len);
247
1.28k
#if MARK_SWEEP
248
1.28k
  header->obj_id = obj_id;
249
1.28k
  #ifndef NO_POOL_ALLOC
250
1.28k
  header->pool_id = pool_id;
251
1.28k
  #endif
252
1.28k
#endif
253
1.28k
  return slab;
254
1.28k
}
_Z7NewSlabIP6BigStrEP4SlabIT_Ei
Line
Count
Source
231
238
inline Slab<T>* NewSlab(int len) {
232
238
  int obj_len = len * sizeof(T);
233
238
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
238
#if MARK_SWEEP
235
238
  int obj_id;
236
238
  int pool_id;
237
238
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
238
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
238
  void* obj = header->ObjectAddress();
243
238
  if (std::is_pointer<T>()) {
244
238
    memset(obj, 0, obj_len);
245
238
  }
246
238
  auto slab = new (obj) Slab<T>(len);
247
238
#if MARK_SWEEP
248
238
  header->obj_id = obj_id;
249
238
  #ifndef NO_POOL_ALLOC
250
238
  header->pool_id = pool_id;
251
238
  #endif
252
238
#endif
253
238
  return slab;
254
238
}
_Z7NewSlabIiEP4SlabIT_Ei
Line
Count
Source
231
958
inline Slab<T>* NewSlab(int len) {
232
958
  int obj_len = len * sizeof(T);
233
958
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
958
#if MARK_SWEEP
235
958
  int obj_id;
236
958
  int pool_id;
237
958
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
958
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
958
  void* obj = header->ObjectAddress();
243
958
  if (std::is_pointer<T>()) {
244
0
    memset(obj, 0, obj_len);
245
0
  }
246
958
  auto slab = new (obj) Slab<T>(len);
247
958
#if MARK_SWEEP
248
958
  header->obj_id = obj_id;
249
958
  #ifndef NO_POOL_ALLOC
250
958
  header->pool_id = pool_id;
251
958
  #endif
252
958
#endif
253
958
  return slab;
254
958
}
_Z7NewSlabIP6Tuple2IP6BigStriEEP4SlabIT_Ei
Line
Count
Source
231
3
inline Slab<T>* NewSlab(int len) {
232
3
  int obj_len = len * sizeof(T);
233
3
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
3
#if MARK_SWEEP
235
3
  int obj_id;
236
3
  int pool_id;
237
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
3
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
3
  void* obj = header->ObjectAddress();
243
3
  if (std::is_pointer<T>()) {
244
3
    memset(obj, 0, obj_len);
245
3
  }
246
3
  auto slab = new (obj) Slab<T>(len);
247
3
#if MARK_SWEEP
248
3
  header->obj_id = obj_id;
249
3
  #ifndef NO_POOL_ALLOC
250
3
  header->pool_id = pool_id;
251
3
  #endif
252
3
#endif
253
3
  return slab;
254
3
}
_Z7NewSlabIP6Tuple2IiP6BigStrEEP4SlabIT_Ei
Line
Count
Source
231
7
inline Slab<T>* NewSlab(int len) {
232
7
  int obj_len = len * sizeof(T);
233
7
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
7
#if MARK_SWEEP
235
7
  int obj_id;
236
7
  int pool_id;
237
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
7
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
7
  void* obj = header->ObjectAddress();
243
7
  if (std::is_pointer<T>()) {
244
7
    memset(obj, 0, obj_len);
245
7
  }
246
7
  auto slab = new (obj) Slab<T>(len);
247
7
#if MARK_SWEEP
248
7
  header->obj_id = obj_id;
249
7
  #ifndef NO_POOL_ALLOC
250
7
  header->pool_id = pool_id;
251
7
  #endif
252
7
#endif
253
7
  return slab;
254
7
}
_Z7NewSlabIbEP4SlabIT_Ei
Line
Count
Source
231
12
inline Slab<T>* NewSlab(int len) {
232
12
  int obj_len = len * sizeof(T);
233
12
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
12
#if MARK_SWEEP
235
12
  int obj_id;
236
12
  int pool_id;
237
12
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
12
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
12
  void* obj = header->ObjectAddress();
243
12
  if (std::is_pointer<T>()) {
244
0
    memset(obj, 0, obj_len);
245
0
  }
246
12
  auto slab = new (obj) Slab<T>(len);
247
12
#if MARK_SWEEP
248
12
  header->obj_id = obj_id;
249
12
  #ifndef NO_POOL_ALLOC
250
12
  header->pool_id = pool_id;
251
12
  #endif
252
12
#endif
253
12
  return slab;
254
12
}
_Z7NewSlabIPN10hnode_asdl5FieldEEP4SlabIT_Ei
Line
Count
Source
231
37
inline Slab<T>* NewSlab(int len) {
232
37
  int obj_len = len * sizeof(T);
233
37
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
37
#if MARK_SWEEP
235
37
  int obj_id;
236
37
  int pool_id;
237
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
37
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
37
  void* obj = header->ObjectAddress();
243
37
  if (std::is_pointer<T>()) {
244
37
    memset(obj, 0, obj_len);
245
37
  }
246
37
  auto slab = new (obj) Slab<T>(len);
247
37
#if MARK_SWEEP
248
37
  header->obj_id = obj_id;
249
37
  #ifndef NO_POOL_ALLOC
250
37
  header->pool_id = pool_id;
251
37
  #endif
252
37
#endif
253
37
  return slab;
254
37
}
Unexecuted instantiation: _Z7NewSlabIPN10hnode_asdl7hnode_tEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN15test_classes_gc10OpaqueBaseEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN15test_classes_gc12PointersBaseEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN15test_classes_gc14BaseWithMethodEEP4SlabIT_Ei
_Z7NewSlabIP6Tuple2IiiEEP4SlabIT_Ei
Line
Count
Source
231
6
inline Slab<T>* NewSlab(int len) {
232
6
  int obj_len = len * sizeof(T);
233
6
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
6
#if MARK_SWEEP
235
6
  int obj_id;
236
6
  int pool_id;
237
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
6
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
6
  void* obj = header->ObjectAddress();
243
6
  if (std::is_pointer<T>()) {
244
6
    memset(obj, 0, obj_len);
245
6
  }
246
6
  auto slab = new (obj) Slab<T>(len);
247
6
#if MARK_SWEEP
248
6
  header->obj_id = obj_id;
249
6
  #ifndef NO_POOL_ALLOC
250
6
  header->pool_id = pool_id;
251
6
  #endif
252
6
#endif
253
6
  return slab;
254
6
}
_Z7NewSlabIdEP4SlabIT_Ei
Line
Count
Source
231
2
inline Slab<T>* NewSlab(int len) {
232
2
  int obj_len = len * sizeof(T);
233
2
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
2
#if MARK_SWEEP
235
2
  int obj_id;
236
2
  int pool_id;
237
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
2
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
2
  void* obj = header->ObjectAddress();
243
2
  if (std::is_pointer<T>()) {
244
0
    memset(obj, 0, obj_len);
245
0
  }
246
2
  auto slab = new (obj) Slab<T>(len);
247
2
#if MARK_SWEEP
248
2
  header->obj_id = obj_id;
249
2
  #ifndef NO_POOL_ALLOC
250
2
  header->pool_id = pool_id;
251
2
  #endif
252
2
#endif
253
2
  return slab;
254
2
}
_Z7NewSlabIPN4pyos11PasswdEntryEEP4SlabIT_Ei
Line
Count
Source
231
6
inline Slab<T>* NewSlab(int len) {
232
6
  int obj_len = len * sizeof(T);
233
6
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
6
#if MARK_SWEEP
235
6
  int obj_id;
236
6
  int pool_id;
237
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
6
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
6
  void* obj = header->ObjectAddress();
243
6
  if (std::is_pointer<T>()) {
244
6
    memset(obj, 0, obj_len);
245
6
  }
246
6
  auto slab = new (obj) Slab<T>(len);
247
6
#if MARK_SWEEP
248
6
  header->obj_id = obj_id;
249
6
  #ifndef NO_POOL_ALLOC
250
6
  header->pool_id = pool_id;
251
6
  #endif
252
6
#endif
253
6
  return slab;
254
6
}
Unexecuted instantiation: _Z7NewSlabIP4ListIP6Tuple2IiiEEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IP4ListIPS1_IPS0_IiiEEEP4DictIiiEEEP4SlabIT_Ei
_Z7NewSlabIPN10value_asdl7value_tEEP4SlabIT_Ei
Line
Count
Source
231
8
inline Slab<T>* NewSlab(int len) {
232
8
  int obj_len = len * sizeof(T);
233
8
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
8
#if MARK_SWEEP
235
8
  int obj_id;
236
8
  int pool_id;
237
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
8
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
8
  void* obj = header->ObjectAddress();
243
8
  if (std::is_pointer<T>()) {
244
8
    memset(obj, 0, obj_len);
245
8
  }
246
8
  auto slab = new (obj) Slab<T>(len);
247
8
#if MARK_SWEEP
248
8
  header->obj_id = obj_id;
249
8
  #ifndef NO_POOL_ALLOC
250
8
  header->pool_id = pool_id;
251
8
  #endif
252
8
#endif
253
8
  return slab;
254
8
}
_Z7NewSlabIPN4args7_ActionEEP4SlabIT_Ei
Line
Count
Source
231
7
inline Slab<T>* NewSlab(int len) {
232
7
  int obj_len = len * sizeof(T);
233
7
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
234
7
#if MARK_SWEEP
235
7
  int obj_id;
236
7
  int pool_id;
237
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
238
#else
239
  void* place = gHeap.Allocate(num_bytes);
240
#endif
241
7
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
242
7
  void* obj = header->ObjectAddress();
243
7
  if (std::is_pointer<T>()) {
244
7
    memset(obj, 0, obj_len);
245
7
  }
246
7
  auto slab = new (obj) Slab<T>(len);
247
7
#if MARK_SWEEP
248
7
  header->obj_id = obj_id;
249
7
  #ifndef NO_POOL_ALLOC
250
7
  header->pool_id = pool_id;
251
7
  #endif
252
7
#endif
253
7
  return slab;
254
7
}
Unexecuted instantiation: _Z7NewSlabIPN11syntax_asdl12CompoundWordEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IP6BigStrbEEP4SlabIT_Ei
255
256
#endif  // MYCPP_GC_ALLOC_H