cpp

Coverage Report

Created: 2025-05-16 02:18

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