cpp

Coverage Report

Created: 2023-09-13 01:07

/home/andy/git/oilshell/oil/mycpp/gc_alloc.h
Line
Count
Source (jump to first uncovered line)
1
// gc_alloc.h: Functions that wrap gHeap.Allocate()
2
3
#ifndef MYCPP_GC_ALLOC_H
4
#define MYCPP_GC_ALLOC_H
5
6
#include <string.h>  // strlen
7
8
#include <new>      // placement new
9
#include <utility>  // std::forward
10
11
#include "mycpp/gc_slab.h"  // for NewSlab()
12
#include "mycpp/gc_str.h"   // for NewStr()
13
14
#if defined(BUMP_LEAK)
15
  #include "mycpp/bump_leak_heap.h"
16
extern BumpLeakHeap gHeap;
17
#elif defined(MARK_SWEEP)
18
  #include "mycpp/mark_sweep_heap.h"
19
extern MarkSweepHeap gHeap;
20
#endif
21
22
#define VALIDATE_ROOTS 0
23
24
// mycpp generates code that keeps track of the root set
25
class StackRoots {
26
 public:
27
  // Note: void** seems logical, because these are pointers to pointers, but
28
  // the C++ compiler doesn't like it.
29
109k
  StackRoots(std::initializer_list<void*> roots) {
30
109k
    n_ = roots.size();
31
32
#if VALIDATE_ROOTS
33
    int i = 0;
34
#endif
35
36
110k
    for (auto root : roots) {  // can't use roots[i]
37
38
#if VALIDATE_ROOTS
39
      RawObject* obj = *(reinterpret_cast<RawObject**>(root));
40
      if (obj) {
41
        RawObject* header = ObjHeader::FromObject(obj);
42
        log("obj %p header %p", obj, header);
43
44
        switch (header->heap_tag) {
45
        case HeapTag::Global:
46
        case HeapTag::Opaque:
47
        case HeapTag::Scanned:
48
        case HeapTag::FixedSize:
49
          break;
50
51
        default:
52
          log("root %d heap %d type %d mask %d len %d", i, header->heap_tag,
53
              header->type_tag, header->field_mask, header->obj_len);
54
          FAIL(kShouldNotGetHere);
55
          break;
56
        }
57
      }
58
      i++;
59
#endif
60
61
110k
      gHeap.PushRoot(reinterpret_cast<RawObject**>(root));
62
110k
    }
63
109k
  }
64
65
109k
  ~StackRoots() {
66
220k
    for (int i = 0; i < n_; ++i) {
67
110k
      gHeap.PopRoot();
68
110k
    }
69
109k
  }
70
71
 private:
72
  int n_;
73
};
74
75
// Note:
76
// - This function causes code bloat due to template expansion on hundreds of
77
//   types.  Could switch to a GC_NEW() macro
78
// - GCC generates slightly larger code if you factor out void* place and new
79
//   (place) T()
80
//
81
// Variadic templates:
82
// https://eli.thegreenplace.net/2014/variadic-templates-in-c/
83
template <typename T, typename... Args>
84
1.66k
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1.66k
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1.66k
                "Expected no padding");
97
98
1.66k
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1.66k
#if MARK_SWEEP
102
1.66k
  int obj_id;
103
1.66k
  int pool_id;
104
1.66k
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1.66k
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1.66k
#if MARK_SWEEP
110
1.66k
  header->obj_id = obj_id;
111
1.66k
  #ifndef NO_POOL_ALLOC
112
1.66k
  header->pool_id = pool_id;
113
1.66k
  #endif
114
1.66k
#endif
115
1.66k
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1.66k
  memset(obj, 0, sizeof(T));
118
1.66k
  return new (obj) T(std::forward<Args>(args)...);
119
1.66k
}
_Z5AllocIN5mylib15CFileLineReaderEJRP8_IO_FILEEEPT_DpOT0_
Line
Count
Source
84
8
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
8
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
8
                "Expected no padding");
97
98
8
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
8
#if MARK_SWEEP
102
8
  int obj_id;
103
8
  int pool_id;
104
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
8
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
8
#if MARK_SWEEP
110
8
  header->obj_id = obj_id;
111
8
  #ifndef NO_POOL_ALLOC
112
8
  header->pool_id = pool_id;
113
8
  #endif
114
8
#endif
115
8
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
8
  memset(obj, 0, sizeof(T));
118
8
  return new (obj) T(std::forward<Args>(args)...);
119
8
}
_Z5AllocI10ValueErrorJEEPT_DpOT0_
Line
Count
Source
84
15
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
15
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
15
                "Expected no padding");
97
98
15
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
15
#if MARK_SWEEP
102
15
  int obj_id;
103
15
  int pool_id;
104
15
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
15
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
15
#if MARK_SWEEP
110
15
  header->obj_id = obj_id;
111
15
  #ifndef NO_POOL_ALLOC
112
15
  header->pool_id = pool_id;
113
15
  #endif
114
15
#endif
115
15
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
15
  memset(obj, 0, sizeof(T));
118
15
  return new (obj) T(std::forward<Args>(args)...);
119
15
}
_Z5AllocI10IndexErrorJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
Unexecuted instantiation: _Z5AllocI8EOFErrorJEEPT_DpOT0_
_Z5AllocI7IOErrorJRiEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI4ListIP3StrEJEEPT_DpOT0_
Line
Count
Source
84
168
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
168
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
168
                "Expected no padding");
97
98
168
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
168
#if MARK_SWEEP
102
168
  int obj_id;
103
168
  int pool_id;
104
168
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
168
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
168
#if MARK_SWEEP
110
168
  header->obj_id = obj_id;
111
168
  #ifndef NO_POOL_ALLOC
112
168
  header->pool_id = pool_id;
113
168
  #endif
114
168
#endif
115
168
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
168
  memset(obj, 0, sizeof(T));
118
168
  return new (obj) T(std::forward<Args>(args)...);
119
168
}
_Z5AllocIN14asdl_generated17arith_expr__ConstEJiEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
Unexecuted instantiation: _Z5AllocIN14asdl_generated17arith_expr__ConstEJRiEEPT_DpOT0_
_Z5AllocI4DictIP3StrS2_EJEEPT_DpOT0_
Line
Count
Source
84
9
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
9
                "Expected no padding");
97
98
9
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
9
#if MARK_SWEEP
102
9
  int obj_id;
103
9
  int pool_id;
104
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
9
#if MARK_SWEEP
110
9
  header->obj_id = obj_id;
111
9
  #ifndef NO_POOL_ALLOC
112
9
  header->pool_id = pool_id;
113
9
  #endif
114
9
#endif
115
9
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
9
  memset(obj, 0, sizeof(T));
118
9
  return new (obj) T(std::forward<Args>(args)...);
119
9
}
_Z5AllocIN10classes_gc6OpaqueEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc10OpaqueBaseEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc13OpaqueDerivedEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc8PointersEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc12PointersBaseEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc15PointersDerivedEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc14BaseWithMethodEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc17DerivedWithMethodEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN10classes_gc8WithDictEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
Unexecuted instantiation: _Z5AllocI8KeyErrorJEEPT_DpOT0_
_Z5AllocIN10classes_gc6PrintfEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
Unexecuted instantiation: _Z5AllocI4ListIPN10classes_gc10OpaqueBaseEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN10classes_gc12PointersBaseEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN10classes_gc14BaseWithMethodEEJEEPT_DpOT0_
_Z5AllocIN5mylib11CFileWriterEJRP8_IO_FILEEEPT_DpOT0_
Line
Count
Source
84
9
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
9
                "Expected no padding");
97
98
9
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
9
#if MARK_SWEEP
102
9
  int obj_id;
103
9
  int pool_id;
104
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
9
#if MARK_SWEEP
110
9
  header->obj_id = obj_id;
111
9
  #ifndef NO_POOL_ALLOC
112
9
  header->pool_id = pool_id;
113
9
  #endif
114
9
#endif
115
9
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
9
  memset(obj, 0, sizeof(T));
118
9
  return new (obj) T(std::forward<Args>(args)...);
119
9
}
_Z5AllocIN7classes10TextOutputEJRPN5mylib6WriterEEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN7classes4BaseEJDnEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN7classes8DerivedIEJDniEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN7classes9DerivedSSEJDnRP3StrS4_EEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN5mylib9BufWriterEJEEPT_DpOT0_
Line
Count
Source
84
77
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
77
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
77
                "Expected no padding");
97
98
77
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
77
#if MARK_SWEEP
102
77
  int obj_id;
103
77
  int pool_id;
104
77
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
77
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
77
#if MARK_SWEEP
110
77
  header->obj_id = obj_id;
111
77
  #ifndef NO_POOL_ALLOC
112
77
  header->pool_id = pool_id;
113
77
  #endif
114
77
#endif
115
77
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
77
  memset(obj, 0, sizeof(T));
118
77
  return new (obj) T(std::forward<Args>(args)...);
119
77
}
Unexecuted instantiation: _Z5AllocIN7classes10TextOutputEJRPN5mylib9BufWriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes4NodeEJDniEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes4NodeEJRPS1_RiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes8DerivedIEJRPNS0_4BaseERiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes9DerivedSSEJRPNS0_8DerivedIERP3StrS7_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN7classes4BaseEJRPNS0_9DerivedSSEEEPT_DpOT0_
_Z5AllocI4ListIiEJEEPT_DpOT0_
Line
Count
Source
84
664
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
664
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
664
                "Expected no padding");
97
98
664
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
664
#if MARK_SWEEP
102
664
  int obj_id;
103
664
  int pool_id;
104
664
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
664
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
664
#if MARK_SWEEP
110
664
  header->obj_id = obj_id;
111
664
  #ifndef NO_POOL_ALLOC
112
664
  header->pool_id = pool_id;
113
664
  #endif
114
664
#endif
115
664
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
664
  memset(obj, 0, sizeof(T));
118
664
  return new (obj) T(std::forward<Args>(args)...);
119
664
}
_Z5AllocI6Tuple2IiP3StrEJiRS2_EEPT_DpOT0_
Line
Count
Source
84
9
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
9
                "Expected no padding");
97
98
9
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
9
#if MARK_SWEEP
102
9
  int obj_id;
103
9
  int pool_id;
104
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
9
#if MARK_SWEEP
110
9
  header->obj_id = obj_id;
111
9
  #ifndef NO_POOL_ALLOC
112
9
  header->pool_id = pool_id;
113
9
  #endif
114
9
#endif
115
9
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
9
  memset(obj, 0, sizeof(T));
118
9
  return new (obj) T(std::forward<Args>(args)...);
119
9
}
_Z5AllocIN10containers5PointEJiiEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI4DictIP3StriEJEEPT_DpOT0_
Line
Count
Source
84
17
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
17
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
17
                "Expected no padding");
97
98
17
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
17
#if MARK_SWEEP
102
17
  int obj_id;
103
17
  int pool_id;
104
17
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
17
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
17
#if MARK_SWEEP
110
17
  header->obj_id = obj_id;
111
17
  #ifndef NO_POOL_ALLOC
112
17
  header->pool_id = pool_id;
113
17
  #endif
114
17
#endif
115
17
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
17
  memset(obj, 0, sizeof(T));
118
17
  return new (obj) T(std::forward<Args>(args)...);
119
17
}
_Z5AllocI4DictIP3StriEJSt16initializer_listIS2_ES4_IiEEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
_Z5AllocIN12control_flow10ParseErrorEJRP3StrEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI6Tuple2IiP3StrEJRiS2_EEPT_DpOT0_
Line
Count
Source
84
11
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
11
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
11
                "Expected no padding");
97
98
11
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
11
#if MARK_SWEEP
102
11
  int obj_id;
103
11
  int pool_id;
104
11
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
11
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
11
#if MARK_SWEEP
110
11
  header->obj_id = obj_id;
111
11
  #ifndef NO_POOL_ALLOC
112
11
  header->pool_id = pool_id;
113
11
  #endif
114
11
#endif
115
11
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
11
  memset(obj, 0, sizeof(T));
118
11
  return new (obj) T(std::forward<Args>(args)...);
119
11
}
_Z5AllocI13StopIterationJEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
_Z5AllocIN9iterators3FooEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI6Tuple2IP3StriEJRS2_iEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
_Z5AllocI4ListIP6Tuple2IP3StriEEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI4ListIP6Tuple2IiP3StrEEJEEPT_DpOT0_
Line
Count
Source
84
5
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
5
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
5
                "Expected no padding");
97
98
5
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
5
#if MARK_SWEEP
102
5
  int obj_id;
103
5
  int pool_id;
104
5
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
5
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
5
#if MARK_SWEEP
110
5
  header->obj_id = obj_id;
111
5
  #ifndef NO_POOL_ALLOC
112
5
  header->pool_id = pool_id;
113
5
  #endif
114
5
#endif
115
5
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
5
  memset(obj, 0, sizeof(T));
118
5
  return new (obj) T(std::forward<Args>(args)...);
119
5
}
_Z5AllocIN7modules3DogEJRP3StrEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN7module13CatEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN7modules6SphinxEJRP3StrEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN9expr_asdl12expr__BinaryEJRP3StrDnDnEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI4ListIPN10hnode_asdl5FieldEEJEEPT_DpOT0_
Line
Count
Source
84
37
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
37
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
37
                "Expected no padding");
97
98
37
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
37
#if MARK_SWEEP
102
37
  int obj_id;
103
37
  int pool_id;
104
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
37
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
37
#if MARK_SWEEP
110
37
  header->obj_id = obj_id;
111
37
  #ifndef NO_POOL_ALLOC
112
37
  header->pool_id = pool_id;
113
37
  #endif
114
37
#endif
115
37
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
37
  memset(obj, 0, sizeof(T));
118
37
  return new (obj) T(std::forward<Args>(args)...);
119
37
}
_Z5AllocI4ListIPN10hnode_asdl7hnode_tEEJEEPT_DpOT0_
Line
Count
Source
84
37
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
37
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
37
                "Expected no padding");
97
98
37
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
37
#if MARK_SWEEP
102
37
  int obj_id;
103
37
  int pool_id;
104
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
37
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
37
#if MARK_SWEEP
110
37
  header->obj_id = obj_id;
111
37
  #ifndef NO_POOL_ALLOC
112
37
  header->pool_id = pool_id;
113
37
  #endif
114
37
#endif
115
37
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
37
  memset(obj, 0, sizeof(T));
118
37
  return new (obj) T(std::forward<Args>(args)...);
119
37
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl11hnode__LeafEJRP3StrNS0_7color_eEEEPT_DpOT0_
_Z5AllocIN9expr_asdl11expr__ConstEJiEEPT_DpOT0_
Line
Count
Source
84
15
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
15
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
15
                "Expected no padding");
97
98
15
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
15
#if MARK_SWEEP
102
15
  int obj_id;
103
15
  int pool_id;
104
15
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
15
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
15
#if MARK_SWEEP
110
15
  header->obj_id = obj_id;
111
15
  #ifndef NO_POOL_ALLOC
112
15
  header->pool_id = pool_id;
113
15
  #endif
114
15
#endif
115
15
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
15
  memset(obj, 0, sizeof(T));
118
15
  return new (obj) T(std::forward<Args>(args)...);
119
15
}
_Z5AllocIN9expr_asdl9expr__VarEJRP3StrEEPT_DpOT0_
Line
Count
Source
84
10
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
10
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
10
                "Expected no padding");
97
98
10
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
10
#if MARK_SWEEP
102
10
  int obj_id;
103
10
  int pool_id;
104
10
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
10
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
10
#if MARK_SWEEP
110
10
  header->obj_id = obj_id;
111
10
  #ifndef NO_POOL_ALLOC
112
10
  header->pool_id = pool_id;
113
10
  #endif
114
10
#endif
115
10
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
10
  memset(obj, 0, sizeof(T));
118
10
  return new (obj) T(std::forward<Args>(args)...);
119
10
}
_Z5AllocIN10hnode_asdl13hnode__RecordEJRP3StrP4ListIPNS0_5FieldEEbS4_S4_PS5_IPNS0_7hnode_tEEEEPT_DpOT0_
Line
Count
Source
84
37
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
37
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
37
                "Expected no padding");
97
98
37
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
37
#if MARK_SWEEP
102
37
  int obj_id;
103
37
  int pool_id;
104
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
37
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
37
#if MARK_SWEEP
110
37
  header->obj_id = obj_id;
111
37
  #ifndef NO_POOL_ALLOC
112
37
  header->pool_id = pool_id;
113
37
  #endif
114
37
#endif
115
37
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
37
  memset(obj, 0, sizeof(T));
118
37
  return new (obj) T(std::forward<Args>(args)...);
119
37
}
_Z5AllocIN10hnode_asdl11hnode__LeafEJRP3StrRNS0_7color_eEEEPT_DpOT0_
Line
Count
Source
84
22
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
22
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
22
                "Expected no padding");
97
98
22
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
22
#if MARK_SWEEP
102
22
  int obj_id;
103
22
  int pool_id;
104
22
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
22
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
22
#if MARK_SWEEP
110
22
  header->obj_id = obj_id;
111
22
  #ifndef NO_POOL_ALLOC
112
22
  header->pool_id = pool_id;
113
22
  #endif
114
22
#endif
115
22
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
22
  memset(obj, 0, sizeof(T));
118
22
  return new (obj) T(std::forward<Args>(args)...);
119
22
}
Unexecuted instantiation: _Z5AllocIN6format10AnsiOutputEJRPN5mylib6WriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6format10TextOutputEJRPN5mylib6WriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6format10TextOutputEJPN5mylib9BufWriterEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN6format10HtmlOutputEJPN5mylib9BufWriterEEEPT_DpOT0_
_Z5AllocIN6format10AnsiOutputEJPN5mylib9BufWriterEEEPT_DpOT0_
Line
Count
Source
84
32
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
32
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
32
                "Expected no padding");
97
98
32
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
32
#if MARK_SWEEP
102
32
  int obj_id;
103
32
  int pool_id;
104
32
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
32
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
32
#if MARK_SWEEP
110
32
  header->obj_id = obj_id;
111
32
  #ifndef NO_POOL_ALLOC
112
32
  header->pool_id = pool_id;
113
32
  #endif
114
32
#endif
115
32
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
32
  memset(obj, 0, sizeof(T));
118
32
  return new (obj) T(std::forward<Args>(args)...);
119
32
}
_Z5AllocI6Tuple2IP3StriEJRS2_RiEEPT_DpOT0_
Line
Count
Source
84
23
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
23
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
23
                "Expected no padding");
97
98
23
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
23
#if MARK_SWEEP
102
23
  int obj_id;
103
23
  int pool_id;
104
23
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
23
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
23
#if MARK_SWEEP
110
23
  header->obj_id = obj_id;
111
23
  #ifndef NO_POOL_ALLOC
112
23
  header->pool_id = pool_id;
113
23
  #endif
114
23
#endif
115
23
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
23
  memset(obj, 0, sizeof(T));
118
23
  return new (obj) T(std::forward<Args>(args)...);
119
23
}
_Z5AllocIN6format14_PrettyPrinterEJiEEPT_DpOT0_
Line
Count
Source
84
9
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
9
                "Expected no padding");
97
98
9
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
9
#if MARK_SWEEP
102
9
  int obj_id;
103
9
  int pool_id;
104
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
9
#if MARK_SWEEP
110
9
  header->obj_id = obj_id;
111
9
  #ifndef NO_POOL_ALLOC
112
9
  header->pool_id = pool_id;
113
9
  #endif
114
9
#endif
115
9
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
9
  memset(obj, 0, sizeof(T));
118
9
  return new (obj) T(std::forward<Args>(args)...);
119
9
}
_Z5AllocIN5parse10ParseErrorEJP3StrEEPT_DpOT0_
Line
Count
Source
84
5
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
5
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
5
                "Expected no padding");
97
98
5
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
5
#if MARK_SWEEP
102
5
  int obj_id;
103
5
  int pool_id;
104
5
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
5
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
5
#if MARK_SWEEP
110
5
  header->obj_id = obj_id;
111
5
  #ifndef NO_POOL_ALLOC
112
5
  header->pool_id = pool_id;
113
5
  #endif
114
5
#endif
115
5
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
5
  memset(obj, 0, sizeof(T));
118
5
  return new (obj) T(std::forward<Args>(args)...);
119
5
}
_Z5AllocIN9expr_asdl12expr__BinaryEJRP3StrRPNS0_6expr_tES7_EEPT_DpOT0_
Line
Count
Source
84
14
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
14
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
14
                "Expected no padding");
97
98
14
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
14
#if MARK_SWEEP
102
14
  int obj_id;
103
14
  int pool_id;
104
14
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
14
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
14
#if MARK_SWEEP
110
14
  header->obj_id = obj_id;
111
14
  #ifndef NO_POOL_ALLOC
112
14
  header->pool_id = pool_id;
113
14
  #endif
114
14
#endif
115
14
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
14
  memset(obj, 0, sizeof(T));
118
14
  return new (obj) T(std::forward<Args>(args)...);
119
14
}
_Z5AllocIN5parse5LexerEJRP3StrEEPT_DpOT0_
Line
Count
Source
84
14
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
14
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
14
                "Expected no padding");
97
98
14
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
14
#if MARK_SWEEP
102
14
  int obj_id;
103
14
  int pool_id;
104
14
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
14
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
14
#if MARK_SWEEP
110
14
  header->obj_id = obj_id;
111
14
  #ifndef NO_POOL_ALLOC
112
14
  header->pool_id = pool_id;
113
14
  #endif
114
14
#endif
115
14
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
14
  memset(obj, 0, sizeof(T));
118
14
  return new (obj) T(std::forward<Args>(args)...);
119
14
}
_Z5AllocIN5parse6ParserEJRPNS0_5LexerEEEPT_DpOT0_
Line
Count
Source
84
13
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
13
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
13
                "Expected no padding");
97
98
13
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
13
#if MARK_SWEEP
102
13
  int obj_id;
103
13
  int pool_id;
104
13
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
13
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
13
#if MARK_SWEEP
110
13
  header->obj_id = obj_id;
111
13
  #ifndef NO_POOL_ALLOC
112
13
  header->pool_id = pool_id;
113
13
  #endif
114
13
#endif
115
13
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
13
  memset(obj, 0, sizeof(T));
118
13
  return new (obj) T(std::forward<Args>(args)...);
119
13
}
_Z5AllocIN6format10AnsiOutputEJPN5mylib6WriterEEEPT_DpOT0_
Line
Count
Source
84
9
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
9
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
9
                "Expected no padding");
97
98
9
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
9
#if MARK_SWEEP
102
9
  int obj_id;
103
9
  int pool_id;
104
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
9
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
9
#if MARK_SWEEP
110
9
  header->obj_id = obj_id;
111
9
  #ifndef NO_POOL_ALLOC
112
9
  header->pool_id = pool_id;
113
9
  #endif
114
9
#endif
115
9
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
9
  memset(obj, 0, sizeof(T));
118
9
  return new (obj) T(std::forward<Args>(args)...);
119
9
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl13hnode__RecordEJDnP4ListIPNS0_5FieldEEbRP3StrS9_PS2_IPNS0_7hnode_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl12hnode__ArrayEJP4ListIPNS0_7hnode_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl15hnode__ExternalEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJRP3StrDnEEPT_DpOT0_
_Z5AllocIN10hnode_asdl11hnode__LeafEJP3StrNS0_7color_eEEEPT_DpOT0_
Line
Count
Source
84
15
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
15
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
15
                "Expected no padding");
97
98
15
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
15
#if MARK_SWEEP
102
15
  int obj_id;
103
15
  int pool_id;
104
15
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
15
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
15
#if MARK_SWEEP
110
15
  header->obj_id = obj_id;
111
15
  #ifndef NO_POOL_ALLOC
112
15
  header->pool_id = pool_id;
113
15
  #endif
114
15
#endif
115
15
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
15
  memset(obj, 0, sizeof(T));
118
15
  return new (obj) T(std::forward<Args>(args)...);
119
15
}
_Z5AllocIN10hnode_asdl5FieldEJP3StrRPNS0_7hnode_tEEEPT_DpOT0_
Line
Count
Source
84
65
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
65
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
65
                "Expected no padding");
97
98
65
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
65
#if MARK_SWEEP
102
65
  int obj_id;
103
65
  int pool_id;
104
65
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
65
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
65
#if MARK_SWEEP
110
65
  header->obj_id = obj_id;
111
65
  #ifndef NO_POOL_ALLOC
112
65
  header->pool_id = pool_id;
113
65
  #endif
114
65
#endif
115
65
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
65
  memset(obj, 0, sizeof(T));
118
65
  return new (obj) T(std::forward<Args>(args)...);
119
65
}
_Z5AllocIN15scoped_resource7MyErrorEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN15scoped_resource8DirStackEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI4ListIbEJEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
_Z5AllocIN7strings3FooEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN9test_cast11ColorOutputEJRPN5mylib9BufWriterEEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN17test_default_args3FooEJiEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN17test_default_args3FooEJiiEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocIN12test_globals7MyClassEJiEEPT_DpOT0_
Line
Count
Source
84
10
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
10
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
10
                "Expected no padding");
97
98
10
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
10
#if MARK_SWEEP
102
10
  int obj_id;
103
10
  int pool_id;
104
10
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
10
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
10
#if MARK_SWEEP
110
10
  header->obj_id = obj_id;
111
10
  #ifndef NO_POOL_ALLOC
112
10
  header->pool_id = pool_id;
113
10
  #endif
114
10
#endif
115
10
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
10
  memset(obj, 0, sizeof(T));
118
10
  return new (obj) T(std::forward<Args>(args)...);
119
10
}
_Z5AllocI7OSErrorJiEEPT_DpOT0_
Line
Count
Source
84
4
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
4
                "Expected no padding");
97
98
4
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
4
#if MARK_SWEEP
102
4
  int obj_id;
103
4
  int pool_id;
104
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
4
#if MARK_SWEEP
110
4
  header->obj_id = obj_id;
111
4
  #ifndef NO_POOL_ALLOC
112
4
  header->pool_id = pool_id;
113
4
  #endif
114
4
#endif
115
4
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
4
  memset(obj, 0, sizeof(T));
118
4
  return new (obj) T(std::forward<Args>(args)...);
119
4
}
_Z5AllocI6Tuple2IP3StriEJS2_iEEPT_DpOT0_
Line
Count
Source
84
10
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
10
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
10
                "Expected no padding");
97
98
10
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
10
#if MARK_SWEEP
102
10
  int obj_id;
103
10
  int pool_id;
104
10
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
10
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
10
#if MARK_SWEEP
110
10
  header->obj_id = obj_id;
111
10
  #ifndef NO_POOL_ALLOC
112
10
  header->pool_id = pool_id;
113
10
  #endif
114
10
#endif
115
10
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
10
  memset(obj, 0, sizeof(T));
118
10
  return new (obj) T(std::forward<Args>(args)...);
119
10
}
_Z5AllocI10ValueErrorJRP3StrEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI12RuntimeErrorJRP3StrEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI12UnicodeErrorJP3StrEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI7IOErrorJiEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
_Z5AllocI4DictIiP3StrEJSt16initializer_listIiES4_IS2_EEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI4DictIiP3StrEJEEPT_DpOT0_
Line
Count
Source
84
6
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
6
                "Expected no padding");
97
98
6
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
6
#if MARK_SWEEP
102
6
  int obj_id;
103
6
  int pool_id;
104
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
6
#if MARK_SWEEP
110
6
  header->obj_id = obj_id;
111
6
  #ifndef NO_POOL_ALLOC
112
6
  header->pool_id = pool_id;
113
6
  #endif
114
6
#endif
115
6
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
6
  memset(obj, 0, sizeof(T));
118
6
  return new (obj) T(std::forward<Args>(args)...);
119
6
}
_Z5AllocI4DictIiiEJEEPT_DpOT0_
Line
Count
Source
84
6
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
6
                "Expected no padding");
97
98
6
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
6
#if MARK_SWEEP
102
6
  int obj_id;
103
6
  int pool_id;
104
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
6
#if MARK_SWEEP
110
6
  header->obj_id = obj_id;
111
6
  #ifndef NO_POOL_ALLOC
112
6
  header->pool_id = pool_id;
113
6
  #endif
114
6
#endif
115
6
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
6
  memset(obj, 0, sizeof(T));
118
6
  return new (obj) T(std::forward<Args>(args)...);
119
6
}
_Z5AllocI4ListIP6Tuple2IiiEEJEEPT_DpOT0_
Line
Count
Source
84
4
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
4
                "Expected no padding");
97
98
4
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
4
#if MARK_SWEEP
102
4
  int obj_id;
103
4
  int pool_id;
104
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
4
#if MARK_SWEEP
110
4
  header->obj_id = obj_id;
111
4
  #ifndef NO_POOL_ALLOC
112
4
  header->pool_id = pool_id;
113
4
  #endif
114
4
#endif
115
4
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
4
  memset(obj, 0, sizeof(T));
118
4
  return new (obj) T(std::forward<Args>(args)...);
119
4
}
_Z5AllocI6Tuple2IiiEJiiEEPT_DpOT0_
Line
Count
Source
84
19
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
19
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
19
                "Expected no padding");
97
98
19
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
19
#if MARK_SWEEP
102
19
  int obj_id;
103
19
  int pool_id;
104
19
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
19
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
19
#if MARK_SWEEP
110
19
  header->obj_id = obj_id;
111
19
  #ifndef NO_POOL_ALLOC
112
19
  header->pool_id = pool_id;
113
19
  #endif
114
19
#endif
115
19
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
19
  memset(obj, 0, sizeof(T));
118
19
  return new (obj) T(std::forward<Args>(args)...);
119
19
}
_Z5AllocI4DictIP6Tuple2IiiEiEJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI4DictIP6Tuple2IP3StriEiEJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI5PointJiiEEPT_DpOT0_
Line
Count
Source
84
4
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
4
                "Expected no padding");
97
98
4
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
4
#if MARK_SWEEP
102
4
  int obj_id;
103
4
  int pool_id;
104
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
4
#if MARK_SWEEP
110
4
  header->obj_id = obj_id;
111
4
  #ifndef NO_POOL_ALLOC
112
4
  header->pool_id = pool_id;
113
4
  #endif
114
4
#endif
115
4
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
4
  memset(obj, 0, sizeof(T));
118
4
  return new (obj) T(std::forward<Args>(args)...);
119
4
}
_Z5AllocI4LineJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI10DerivedObjJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI4ListIPiEJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI4ListIdEJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocIN5mylib13BufLineReaderEJRP3StrEEPT_DpOT0_
Line
Count
Source
84
6
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
6
                "Expected no padding");
97
98
6
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
6
#if MARK_SWEEP
102
6
  int obj_id;
103
6
  int pool_id;
104
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
6
#if MARK_SWEEP
110
6
  header->obj_id = obj_id;
111
6
  #ifndef NO_POOL_ALLOC
112
6
  header->pool_id = pool_id;
113
6
  #endif
114
6
#endif
115
6
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
6
  memset(obj, 0, sizeof(T));
118
6
  return new (obj) T(std::forward<Args>(args)...);
119
6
}
_Z5AllocI6Tuple2IiP3StrEJiS2_EEPT_DpOT0_
Line
Count
Source
84
7
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
7
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
7
                "Expected no padding");
97
98
7
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
7
#if MARK_SWEEP
102
7
  int obj_id;
103
7
  int pool_id;
104
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
7
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
7
#if MARK_SWEEP
110
7
  header->obj_id = obj_id;
111
7
  #ifndef NO_POOL_ALLOC
112
7
  header->pool_id = pool_id;
113
7
  #endif
114
7
#endif
115
7
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
7
  memset(obj, 0, sizeof(T));
118
7
  return new (obj) T(std::forward<Args>(args)...);
119
7
}
_Z5AllocI6Tuple3IiP3StrS2_EJiS2_S2_EEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI6Tuple4IiP3StrS2_iEJiS2_S2_iEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI6Tuple2IiPS0_IiP3StrEEJiRS4_EEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocI4NodeJEEPT_DpOT0_
Line
Count
Source
84
4
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
4
                "Expected no padding");
97
98
4
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
4
#if MARK_SWEEP
102
4
  int obj_id;
103
4
  int pool_id;
104
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
4
#if MARK_SWEEP
110
4
  header->obj_id = obj_id;
111
4
  #ifndef NO_POOL_ALLOC
112
4
  header->pool_id = pool_id;
113
4
  #endif
114
4
#endif
115
4
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
4
  memset(obj, 0, sizeof(T));
118
4
  return new (obj) T(std::forward<Args>(args)...);
119
4
}
_Z5AllocIN4pyos9ReadErrorEJiEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI7OSErrorJRiEEPT_DpOT0_
Line
Count
Source
84
4
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
4
                "Expected no padding");
97
98
4
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
4
#if MARK_SWEEP
102
4
  int obj_id;
103
4
  int pool_id;
104
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
4
#if MARK_SWEEP
110
4
  header->obj_id = obj_id;
111
4
  #ifndef NO_POOL_ALLOC
112
4
  header->pool_id = pool_id;
113
4
  #endif
114
4
#endif
115
4
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
4
  memset(obj, 0, sizeof(T));
118
4
  return new (obj) T(std::forward<Args>(args)...);
119
4
}
Unexecuted instantiation: _Z5AllocIN10hnode_asdl12hnode__ArrayEJP4ListIPNS0_7hnode_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18parse_result__NodeEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__UnusedEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13source__StdinEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__MainFileEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19source__SourcedFileEJRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__ArgvWordEJRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__VariableEJRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14source__VarRefEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13source__AliasEJRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16source__ReparsedEJRP3StrDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17source__SyntheticEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13loc__WordPartEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9loc__WordEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10loc__ArithEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12loc__CommandEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17debug_frame__MainEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19debug_frame__SourceEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17debug_frame__CallEJDnDnRP3StrEEPT_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__StaticEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17suffix_op__PatSubEJDnDniDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16suffix_op__SliceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9AssocPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl27word_part__BashAssocLiteralEJDnP4ListIPNS0_9AssocPairEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl25word_part__EscapedLiteralEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__TildeSubEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19word_part__ArithSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedTupleEJP4ListIPNS0_12CompoundWordEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22word_part__BracedRangeEJDniRP3StrS4_iEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18word_part__ExtGlobEJDnP4ListIPNS0_12CompoundWordEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17word_part__SpliceEJDnRP3StrEEPT_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__StringEJiRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17sh_lhs_expr__NameEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl24sh_lhs_expr__IndexedNameEJDnRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl26sh_lhs_expr__UnparsedIndexEJDnRP3StrS4_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl23arith_expr__UnaryAssignEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl24arith_expr__BinaryAssignEJiDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17arith_expr__UnaryEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18arith_expr__BinaryEJiDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21arith_expr__TernaryOpEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19bool_expr__WordTestEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17bool_expr__BinaryEJiDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16bool_expr__UnaryEJiDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21bool_expr__LogicalNotEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21bool_expr__LogicalAndEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20bool_expr__LogicalOrEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13redir_loc__FdEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18redir_loc__VarNameEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20redir_param__HereDocEJDnDnP4ListIPNS0_11word_part_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl9command_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16condition__ShellEJP4ListIPNS0_9command_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18condition__YshExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14case_arg__WordEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17case_arg__YshExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl6word_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10pat__WordsEJP4ListIPNS0_6word_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl6expr_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13pat__YshExprsEJP4ListIPNS0_6expr_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10pat__EggexEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15for_iter__WordsEJP4ListIPNS0_6word_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17for_iter__YshExprEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7EnvPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5RedirEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__SimpleEJDnP4ListIPNS0_7EnvPairEEPS2_IPNS0_6word_tEEPS2_IPNS0_5RedirEEDnDnbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22command__ExpandedAliasEJDnP4ListIPNS0_5RedirEEPS2_IPNS0_7EnvPairEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SentenceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10AssignPairEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl21command__ShAssignmentEJDnP4ListIPNS0_10AssignPairEEPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__RetvalEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__ControlFlowEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5TokenEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__PipelineEJDnP4ListIPNS0_9command_tEEPS2_IPNS0_5TokenEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14command__AndOrEJP4ListIPNS0_9command_tEEPS2_IPNS0_5TokenEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__DoGroupEJDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__SubshellEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__DParenEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__DBracketEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForEachEJDnP4ListIP3StrEDnDnDnPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__ForExprEJDnDnDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__WhileUntilEJDnDnDnP4ListIPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5IfArmEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11command__IfEJDnP4ListIPNS0_5IfArmEEDnPS2_IPNS0_9command_tEEDnPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7CaseArmEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__CaseEJDnDnDnP4ListIPNS0_7CaseArmEEDnPS2_IPNS0_5RedirEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19command__ShFunctionEJDnDnRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18command__TimeBlockEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20command__CommandListEJP4ListIPNS0_9command_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17command__BareDeclEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NameTypeEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__VarDeclEJDnP4ListIPNS0_8NameTypeEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12place_expr_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22command__PlaceMutationEJDnP4ListIPNS0_12place_expr_tEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__ExprEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__ProcEJDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl5ParamEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__FuncEJDnDnP4ListIPNS0_5ParamEEDnS6_DnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8TypeExprEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16command__TeaFuncEJDnP4ListIPNS0_5ParamEEDnS6_DnPS2_IPNS0_8TypeExprEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__DataEJDnP4ListIPNS0_5ParamEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl7VariantEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13command__EnumEJDnP4ListIPNS0_7VariantEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12class_item_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14command__ClassEJDnDnP4ListIPNS0_12class_item_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10ImportNameEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__ImportEJDnDnP4ListIPNS0_10ImportNameEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12command__ForEJP4ListIPNS0_8NameTypeEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14command__WhileEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15command__ReturnEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18variant_type__AnonEJP4ListIPNS0_5ParamEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl17variant_type__RefEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16class_item__DataEJDnP4ListIPNS0_8NameTypeEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16proc_sig__ClosedEJP4ListIPNS0_5ParamEEDnS6_DnS6_DnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18glob_part__LiteralEJiRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl19glob_part__OperatorEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20glob_part__CharClassEJbP4ListIP3StrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20printf_part__LiteralEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20printf_part__PercentEJP4ListIPNS0_5TokenEEDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl15place_expr__VarEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9expr__VarEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__ConstEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18expr__RegexLiteralEJDnDnP4ListIPNS0_5TokenEEDnEEPT_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__TupleEJP4ListIPNS0_6expr_tEENS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10expr__ListEJP4ListIPNS0_6expr_tEENS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10expr__DictEJP4ListIPNS0_6expr_tEES6_EEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl13ComprehensionEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__ListCompEJDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14expr__DictCompEJDnDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl18expr__GeneratorExpEJDnP4ListIPNS0_13ComprehensionEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__RangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11expr__SliceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12expr__SpreadEJDnNS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl25class_literal_term__RangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl31class_literal_term__CharLiteralEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl26class_literal_term__SpliceEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl22char_class_term__RangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re_repeat__OpEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14re_repeat__NumEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re_repeat__RangeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl20class_literal_term_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl20re__CharClassLiteralEJbP4ListIPNS0_20class_literal_term_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl17char_class_term_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re__CharClassEJbP4ListIPNS0_17char_class_term_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10re__SpliceEJDnRP3StrEEPT_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__CaptureEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__BacktrackingEJbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13re__PrimitiveEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl16re__LiteralCharsEJRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BoolParamBoxEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl11IntParamBoxEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10SourceLineEJiRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5TokenEJiiiiDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12CompoundWordEJP4ListIPNS0_11word_part_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12BracedVarSubEJDnDnRP3StrDnDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12DoubleQuotedEJDnP4ListIPNS0_11word_part_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12SingleQuotedEJDnP4ListIPNS0_5TokenEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl12SimpleVarSubEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10CommandSubEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl14ShArrayLiteralEJDnP4ListIPNS0_6word_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl8NamedArgEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7ArgListEJDnP4ListIPNS0_6expr_tEEPS2_IPNS0_8NamedArgEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AssocPairEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5RedirEJDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10AssignPairEJDnDnNS0_11assign_op_eEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7EnvPairEJDnRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7CaseArmEJDnDnDnP4ListIPNS0_9command_tEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5IfArmEJDnDnDnP4ListIPNS0_9command_tEEPS2_IiEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10BraceGroupEJDnDnP4ListIPNS0_9command_tEEPS2_IPNS0_5RedirEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl10SourceLineEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8BlockArgEJDnP4ListIPNS0_10SourceLineEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl7VariantEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10ImportNameEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl5ParamEJDnRP3StrDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9RestParamEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8TypeExprEJDnRP3StrP4ListIPS1_EEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8NameTypeEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl13ComprehensionEJP4ListIPNS0_8NameTypeEEDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8NamedArgEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9SubscriptEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9AttributeEJDnDnDnNS0_14expr_context_eEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl10PosixClassEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl9PerlClassEJDnRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN11syntax_asdl8CharCodeEJibDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl5FieldEJP3StrRPNS0_12hnode__ArrayEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN10hnode_asdl15hnode__ExternalEJRPvEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15cmd_value__ArgvEJP4ListIP3StrEPS2_IPN11syntax_asdl12CompoundWordEEDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl9AssignArgEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17cmd_value__AssignEJiP4ListIP3StrEPS2_IPN11syntax_asdl12CompoundWordEEPS2_IPNS0_9AssignArgEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl18part_value__StringEJRP3StrbbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17part_value__ArrayEJP4ListIP3StrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl12part_value_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl19part_value__ExtGlobEJP4ListIPNS0_12part_value_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10value__StrEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl16value__BashArrayEJP4ListIP3StrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl16value__BashAssocEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__BoolEJbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10value__IntEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__FloatEJdEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIPN12runtime_asdl7value_tEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__ListEJP4ListIPNS0_7value_tEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__DictEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__EggexEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__ExprEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15value__TemplateEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__BlockEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__FuncEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl16value__BoundFuncEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__ProcEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__SliceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__RangeEJiiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12a_index__StrEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12a_index__IntEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl13lvalue__NamedEJRP3StrDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15lvalue__IndexedEJRP3StriDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl13lvalue__KeyedEJRP3StrS4_DnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl16lvalue__ObjIndexEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl18redirect_arg__PathEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl20redirect_arg__CopyFdEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl20redirect_arg__MoveFdEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl21redirect_arg__HereDocEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl17wait_status__ProcEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl21wait_status__PipelineEJP4ListIiEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl22wait_status__CancelledEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl15trace__ExternalEJP4ListIP3StrEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl6IntBoxEJiEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl9AssignArgEJRP3StrDnbDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10VTestPlaceEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11VarSubStateEJbbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl4CellEJbbbDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10RedirValueEJiDnDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl4ProcEJRP3StrDnDnDnP4ListIPNS0_7value_tEEbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11StatusArrayEJDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl13CommandStatusEJbbbDnDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl7HayNodeEJDnEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI17KeyboardInterruptJEEPT_DpOT0_
_Z5AllocI4ListIPN4pyos11PasswdEntryEEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN4pyos11PasswdEntryEJRP6passwdEEPT_DpOT0_
Line
Count
Source
84
76
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
76
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
76
                "Expected no padding");
97
98
76
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
76
#if MARK_SWEEP
102
76
  int obj_id;
103
76
  int pool_id;
104
76
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
76
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
76
#if MARK_SWEEP
110
76
  header->obj_id = obj_id;
111
76
  #ifndef NO_POOL_ALLOC
112
76
  header->pool_id = pool_id;
113
76
  #endif
114
76
#endif
115
76
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
76
  memset(obj, 0, sizeof(T));
118
76
  return new (obj) T(std::forward<Args>(args)...);
119
76
}
_Z5AllocIN4pyos10SignalSafeEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocI6Tuple2IP3StriEJRS2_RlEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN6pyutil15_ResourceLoaderEJEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
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_
_Z5AllocIN9flag_spec16_FlagSpecAndMoreEJEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
_Z5AllocIN9flag_spec9_FlagSpecEJEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
Unexecuted instantiation: _Z5AllocI4ListIPN11syntax_asdl12CompoundWordEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl10value__StrEJRP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl11value__BoolEJbEEPT_DpOT0_
_Z5AllocIN12runtime_asdl11value__BoolEJRbEEPT_DpOT0_
Line
Count
Source
84
21
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
21
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
21
                "Expected no padding");
97
98
21
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
21
#if MARK_SWEEP
102
21
  int obj_id;
103
21
  int pool_id;
104
21
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
21
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
21
#if MARK_SWEEP
110
21
  header->obj_id = obj_id;
111
21
  #ifndef NO_POOL_ALLOC
112
21
  header->pool_id = pool_id;
113
21
  #endif
114
21
#endif
115
21
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
21
  memset(obj, 0, sizeof(T));
118
21
  return new (obj) T(std::forward<Args>(args)...);
119
21
}
_Z5AllocIN12runtime_asdl10value__IntEJRiEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__FloatEJRfEEPT_DpOT0_
_Z5AllocIN12runtime_asdl10value__StrEJP3StrEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
_Z5AllocIN4args11SetToStringEJP3StrbRP4ListIS3_EEEPT_DpOT0_
Line
Count
Source
84
7
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
7
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
7
                "Expected no padding");
97
98
7
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
7
#if MARK_SWEEP
102
7
  int obj_id;
103
7
  int pool_id;
104
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
7
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
7
#if MARK_SWEEP
110
7
  header->obj_id = obj_id;
111
7
  #ifndef NO_POOL_ALLOC
112
7
  header->pool_id = pool_id;
113
7
  #endif
114
7
#endif
115
7
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
7
  memset(obj, 0, sizeof(T));
118
7
  return new (obj) T(std::forward<Args>(args)...);
119
7
}
_Z5AllocIN4args11SetToStringEJP3StrbDnEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
_Z5AllocIN4args8SetToIntEJP3StrEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
Unexecuted instantiation: _Z5AllocIN4args10SetToFloatEJP3StrEEPT_DpOT0_
_Z5AllocIN4args9SetToTrueEJP3StrEEPT_DpOT0_
Line
Count
Source
84
11
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
11
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
11
                "Expected no padding");
97
98
11
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
11
#if MARK_SWEEP
102
11
  int obj_id;
103
11
  int pool_id;
104
11
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
11
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
11
#if MARK_SWEEP
110
11
  header->obj_id = obj_id;
111
11
  #ifndef NO_POOL_ALLOC
112
11
  header->pool_id = pool_id;
113
11
  #endif
114
11
#endif
115
11
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
11
  memset(obj, 0, sizeof(T));
118
11
  return new (obj) T(std::forward<Args>(args)...);
119
11
}
Unexecuted instantiation: _Z5AllocIN4args15SetAttachedBoolEJP3StrEEPT_DpOT0_
_Z5AllocIN4args9SetOptionEJP3StrEEPT_DpOT0_
Line
Count
Source
84
8
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
8
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
8
                "Expected no padding");
97
98
8
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
8
#if MARK_SWEEP
102
8
  int obj_id;
103
8
  int pool_id;
104
8
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
8
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
8
#if MARK_SWEEP
110
8
  header->obj_id = obj_id;
111
8
  #ifndef NO_POOL_ALLOC
112
8
  header->pool_id = pool_id;
113
8
  #endif
114
8
#endif
115
8
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
8
  memset(obj, 0, sizeof(T));
118
8
  return new (obj) T(std::forward<Args>(args)...);
119
8
}
_Z5AllocIN4args14SetNamedOptionEJbEEPT_DpOT0_
Line
Count
Source
84
2
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
2
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
2
                "Expected no padding");
97
98
2
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
2
#if MARK_SWEEP
102
2
  int obj_id;
103
2
  int pool_id;
104
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
2
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
2
#if MARK_SWEEP
110
2
  header->obj_id = obj_id;
111
2
  #ifndef NO_POOL_ALLOC
112
2
  header->pool_id = pool_id;
113
2
  #endif
114
2
#endif
115
2
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
2
  memset(obj, 0, sizeof(T));
118
2
  return new (obj) T(std::forward<Args>(args)...);
119
2
}
Unexecuted instantiation: _Z5AllocIN4args9SetActionEJP3StrEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN4args14SetNamedActionEJEEPT_DpOT0_
_Z5AllocI4DictIP3StrPN4args7_ActionEEJEEPT_DpOT0_
Line
Count
Source
84
6
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
6
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
6
                "Expected no padding");
97
98
6
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
6
#if MARK_SWEEP
102
6
  int obj_id;
103
6
  int pool_id;
104
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
6
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
6
#if MARK_SWEEP
110
6
  header->obj_id = obj_id;
111
6
  #ifndef NO_POOL_ALLOC
112
6
  header->pool_id = pool_id;
113
6
  #endif
114
6
#endif
115
6
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
6
  memset(obj, 0, sizeof(T));
118
6
  return new (obj) T(std::forward<Args>(args)...);
119
6
}
_Z5AllocI4DictIP3StrPN12runtime_asdl7value_tEEJEEPT_DpOT0_
Line
Count
Source
84
3
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
3
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
3
                "Expected no padding");
97
98
3
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
3
#if MARK_SWEEP
102
3
  int obj_id;
103
3
  int pool_id;
104
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
3
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
3
#if MARK_SWEEP
110
3
  header->obj_id = obj_id;
111
3
  #ifndef NO_POOL_ALLOC
112
3
  header->pool_id = pool_id;
113
3
  #endif
114
3
#endif
115
3
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
3
  memset(obj, 0, sizeof(T));
118
3
  return new (obj) T(std::forward<Args>(args)...);
119
3
}
Unexecuted instantiation: _Z5AllocIN4args6ReaderEJRP4ListIP3StrERPS2_IPN11syntax_asdl12CompoundWordEEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5error5UsageEJRP3StrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5error6StrictEJRP3StrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN5error5ParseEJRP3StrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
_Z5AllocIN5error12FatalRuntimeEJiRP3StrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
Unexecuted instantiation: _Z5AllocIN5error12FatalRuntimeEJRiRP3StrRPN11syntax_asdl5loc_tEEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI4ListIP6Tuple2IP3StrbEEJEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN12runtime_asdl12value__FloatEJRdEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocI6Tuple2IP3StrbEJRS2_RbEEPT_DpOT0_
Unexecuted instantiation: _Z5AllocIN4args11_AttributesEJRP4DictIP3StrPN12runtime_asdl7value_tEEEEPT_DpOT0_
_Z5AllocIN5match11SimpleLexerEJPFvPKhiiPiS4_ERP3StrEEPT_DpOT0_
Line
Count
Source
84
4
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
4
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
4
                "Expected no padding");
97
98
4
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
4
#if MARK_SWEEP
102
4
  int obj_id;
103
4
  int pool_id;
104
4
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
4
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
4
#if MARK_SWEEP
110
4
  header->obj_id = obj_id;
111
4
  #ifndef NO_POOL_ALLOC
112
4
  header->pool_id = pool_id;
113
4
  #endif
114
4
#endif
115
4
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
4
  memset(obj, 0, sizeof(T));
118
4
  return new (obj) T(std::forward<Args>(args)...);
119
4
}
Unexecuted instantiation: _Z5AllocI12RuntimeErrorJP3StrEEPT_DpOT0_
_Z5AllocIN11syntax_asdl9loc__WordEJRPNS0_6word_tEEEPT_DpOT0_
Line
Count
Source
84
1
T* Alloc(Args&&... args) {
85
  // Alloc() allocates space for both a header and object and guarantees that
86
  // they're adjacent in memory (so that they're at known offsets from one
87
  // another). However, this means that the address that the object is
88
  // constructed at is offset from the address returned by the memory allocator
89
  // (by the size of the header), and therefore may not be sufficiently aligned.
90
  // Here we assert that the object will be sufficiently aligned by making the
91
  // equivalent assertion that zero padding would be required to align it.
92
  // Note: the required padding is given by the following (according to
93
  // https://en.wikipedia.org/wiki/Data_structure_alignment):
94
  // `padding = -offset & (align - 1)`.
95
1
  static_assert((-sizeof(ObjHeader) & (alignof(T) - 1)) == 0,
96
1
                "Expected no padding");
97
98
1
  DCHECK(gHeap.is_initialized_);
99
100
0
  constexpr size_t num_bytes = sizeof(ObjHeader) + sizeof(T);
101
1
#if MARK_SWEEP
102
1
  int obj_id;
103
1
  int pool_id;
104
1
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
105
#else
106
  void* place = gHeap.Allocate(num_bytes);
107
#endif
108
1
  ObjHeader* header = new (place) ObjHeader(T::obj_header());
109
1
#if MARK_SWEEP
110
1
  header->obj_id = obj_id;
111
1
  #ifndef NO_POOL_ALLOC
112
1
  header->pool_id = pool_id;
113
1
  #endif
114
1
#endif
115
1
  void* obj = header->ObjectAddress();
116
  // mycpp doesn't generated constructors that initialize every field
117
1
  memset(obj, 0, sizeof(T));
118
1
  return new (obj) T(std::forward<Args>(args)...);
119
1
}
120
121
//
122
// String "Constructors".  We need these because of the "flexible array"
123
// pattern.  I don't think "new Str()" can do that, and placement new would
124
// require mycpp to generate 2 statements everywhere.
125
//
126
127
5.57k
inline Str* NewStr(int len) {
128
5.57k
  if (len == 0) {  // e.g. BufLineReader::readline() can use this optimization
129
380
    return kEmptyString;
130
380
  }
131
132
5.19k
  int obj_len = kStrHeaderSize + len + 1;  // NUL terminator
133
5.19k
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
134
5.19k
#if MARK_SWEEP
135
5.19k
  int obj_id;
136
5.19k
  int pool_id;
137
5.19k
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
138
#else
139
  void* place = gHeap.Allocate(num_bytes);
140
#endif
141
5.19k
  ObjHeader* header = new (place) ObjHeader(Str::obj_header());
142
143
5.19k
  auto s = new (header->ObjectAddress()) Str();
144
145
5.19k
  s->data_[len] = '\0';  // NUL terminate
146
5.19k
  s->len_ = len;
147
5.19k
  s->hash_value_ = -1;  // this could be a valid hash value
148
149
5.19k
#if MARK_SWEEP
150
5.19k
  header->obj_id = obj_id;
151
5.19k
  #ifndef NO_POOL_ALLOC
152
5.19k
  header->pool_id = pool_id;
153
5.19k
  #endif
154
5.19k
#endif
155
5.19k
  return s;
156
5.57k
}
157
158
// Call OverAllocatedStr() when you don't know the length of the string up
159
// front, e.g. with snprintf().  CALLER IS RESPONSIBLE for calling
160
// s->MaybeShrink() afterward!
161
93
inline Str* OverAllocatedStr(int len) {
162
93
  int obj_len = kStrHeaderSize + len + 1;  // NUL terminator
163
93
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
164
93
#if MARK_SWEEP
165
93
  int obj_id;
166
93
  int pool_id;
167
93
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
168
#else
169
  void* place = gHeap.Allocate(num_bytes);
170
#endif
171
93
  ObjHeader* header = new (place) ObjHeader(Str::obj_header());
172
93
  auto s = new (header->ObjectAddress()) Str();
173
93
  s->hash_value_ = -1;  // this could be a valid hash value
174
175
93
#if MARK_SWEEP
176
93
  header->obj_id = obj_id;
177
93
  #ifndef NO_POOL_ALLOC
178
93
  header->pool_id = pool_id;
179
93
  #endif
180
93
#endif
181
93
  return s;
182
93
}
183
184
// Copy C string into the managed heap.
185
2.76k
inline Str* StrFromC(const char* data, int len) {
186
  // Optimization that could be taken out once we have SmallStr
187
2.76k
  if (len == 0) {
188
163
    return kEmptyString;
189
163
  }
190
2.60k
  Str* s = NewStr(len);
191
2.60k
  memcpy(s->data_, data, len);
192
2.60k
  DCHECK(s->data_[len] == '\0');  // should be true because Heap was zeroed
193
194
0
  return s;
195
2.76k
}
196
197
1.52k
inline Str* StrFromC(const char* data) {
198
1.52k
  return StrFromC(data, strlen(data));
199
1.52k
}
200
201
// Create a slab with a number of entries of a certain type.
202
// Note: entries will be zero'd because we use calloc().  TODO: Consider
203
// zeroing them separately.
204
template <typename T>
205
1.19k
inline Slab<T>* NewSlab(int len) {
206
1.19k
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
1.19k
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
1.19k
#if MARK_SWEEP
209
1.19k
  int obj_id;
210
1.19k
  int pool_id;
211
1.19k
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
1.19k
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
1.19k
  void* obj = header->ObjectAddress();
217
1.19k
  if (std::is_pointer<T>()) {
218
340
    memset(obj, 0, obj_len);
219
340
  }
220
1.19k
  auto slab = new (obj) Slab<T>(len);
221
1.19k
#if MARK_SWEEP
222
1.19k
  header->obj_id = obj_id;
223
1.19k
  #ifndef NO_POOL_ALLOC
224
1.19k
  header->pool_id = pool_id;
225
1.19k
  #endif
226
1.19k
#endif
227
1.19k
  return slab;
228
1.19k
}
_Z7NewSlabIP3StrEP4SlabIT_Ei
Line
Count
Source
205
263
inline Slab<T>* NewSlab(int len) {
206
263
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
263
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
263
#if MARK_SWEEP
209
263
  int obj_id;
210
263
  int pool_id;
211
263
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
263
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
263
  void* obj = header->ObjectAddress();
217
263
  if (std::is_pointer<T>()) {
218
263
    memset(obj, 0, obj_len);
219
263
  }
220
263
  auto slab = new (obj) Slab<T>(len);
221
263
#if MARK_SWEEP
222
263
  header->obj_id = obj_id;
223
263
  #ifndef NO_POOL_ALLOC
224
263
  header->pool_id = pool_id;
225
263
  #endif
226
263
#endif
227
263
  return slab;
228
263
}
_Z7NewSlabIiEP4SlabIT_Ei
Line
Count
Source
205
850
inline Slab<T>* NewSlab(int len) {
206
850
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
850
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
850
#if MARK_SWEEP
209
850
  int obj_id;
210
850
  int pool_id;
211
850
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
850
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
850
  void* obj = header->ObjectAddress();
217
850
  if (std::is_pointer<T>()) {
218
0
    memset(obj, 0, obj_len);
219
0
  }
220
850
  auto slab = new (obj) Slab<T>(len);
221
850
#if MARK_SWEEP
222
850
  header->obj_id = obj_id;
223
850
  #ifndef NO_POOL_ALLOC
224
850
  header->pool_id = pool_id;
225
850
  #endif
226
850
#endif
227
850
  return slab;
228
850
}
Unexecuted instantiation: _Z7NewSlabIPN10classes_gc10OpaqueBaseEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN10classes_gc12PointersBaseEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIPN10classes_gc14BaseWithMethodEEP4SlabIT_Ei
_Z7NewSlabIP6Tuple2IiP3StrEEP4SlabIT_Ei
Line
Count
Source
205
9
inline Slab<T>* NewSlab(int len) {
206
9
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
9
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
9
#if MARK_SWEEP
209
9
  int obj_id;
210
9
  int pool_id;
211
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
9
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
9
  void* obj = header->ObjectAddress();
217
9
  if (std::is_pointer<T>()) {
218
9
    memset(obj, 0, obj_len);
219
9
  }
220
9
  auto slab = new (obj) Slab<T>(len);
221
9
#if MARK_SWEEP
222
9
  header->obj_id = obj_id;
223
9
  #ifndef NO_POOL_ALLOC
224
9
  header->pool_id = pool_id;
225
9
  #endif
226
9
#endif
227
9
  return slab;
228
9
}
_Z7NewSlabIP6Tuple2IP3StriEEP4SlabIT_Ei
Line
Count
Source
205
3
inline Slab<T>* NewSlab(int len) {
206
3
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
3
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
3
#if MARK_SWEEP
209
3
  int obj_id;
210
3
  int pool_id;
211
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
3
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
3
  void* obj = header->ObjectAddress();
217
3
  if (std::is_pointer<T>()) {
218
3
    memset(obj, 0, obj_len);
219
3
  }
220
3
  auto slab = new (obj) Slab<T>(len);
221
3
#if MARK_SWEEP
222
3
  header->obj_id = obj_id;
223
3
  #ifndef NO_POOL_ALLOC
224
3
  header->pool_id = pool_id;
225
3
  #endif
226
3
#endif
227
3
  return slab;
228
3
}
_Z7NewSlabIPN10hnode_asdl5FieldEEP4SlabIT_Ei
Line
Count
Source
205
37
inline Slab<T>* NewSlab(int len) {
206
37
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
37
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
37
#if MARK_SWEEP
209
37
  int obj_id;
210
37
  int pool_id;
211
37
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
37
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
37
  void* obj = header->ObjectAddress();
217
37
  if (std::is_pointer<T>()) {
218
37
    memset(obj, 0, obj_len);
219
37
  }
220
37
  auto slab = new (obj) Slab<T>(len);
221
37
#if MARK_SWEEP
222
37
  header->obj_id = obj_id;
223
37
  #ifndef NO_POOL_ALLOC
224
37
  header->pool_id = pool_id;
225
37
  #endif
226
37
#endif
227
37
  return slab;
228
37
}
_Z7NewSlabIbEP4SlabIT_Ei
Line
Count
Source
205
3
inline Slab<T>* NewSlab(int len) {
206
3
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
3
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
3
#if MARK_SWEEP
209
3
  int obj_id;
210
3
  int pool_id;
211
3
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
3
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
3
  void* obj = header->ObjectAddress();
217
3
  if (std::is_pointer<T>()) {
218
0
    memset(obj, 0, obj_len);
219
0
  }
220
3
  auto slab = new (obj) Slab<T>(len);
221
3
#if MARK_SWEEP
222
3
  header->obj_id = obj_id;
223
3
  #ifndef NO_POOL_ALLOC
224
3
  header->pool_id = pool_id;
225
3
  #endif
226
3
#endif
227
3
  return slab;
228
3
}
_Z7NewSlabIP6Tuple2IiiEEP4SlabIT_Ei
Line
Count
Source
205
6
inline Slab<T>* NewSlab(int len) {
206
6
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
6
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
6
#if MARK_SWEEP
209
6
  int obj_id;
210
6
  int pool_id;
211
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
6
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
6
  void* obj = header->ObjectAddress();
217
6
  if (std::is_pointer<T>()) {
218
6
    memset(obj, 0, obj_len);
219
6
  }
220
6
  auto slab = new (obj) Slab<T>(len);
221
6
#if MARK_SWEEP
222
6
  header->obj_id = obj_id;
223
6
  #ifndef NO_POOL_ALLOC
224
6
  header->pool_id = pool_id;
225
6
  #endif
226
6
#endif
227
6
  return slab;
228
6
}
_Z7NewSlabIdEP4SlabIT_Ei
Line
Count
Source
205
2
inline Slab<T>* NewSlab(int len) {
206
2
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
2
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
2
#if MARK_SWEEP
209
2
  int obj_id;
210
2
  int pool_id;
211
2
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
2
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
2
  void* obj = header->ObjectAddress();
217
2
  if (std::is_pointer<T>()) {
218
0
    memset(obj, 0, obj_len);
219
0
  }
220
2
  auto slab = new (obj) Slab<T>(len);
221
2
#if MARK_SWEEP
222
2
  header->obj_id = obj_id;
223
2
  #ifndef NO_POOL_ALLOC
224
2
  header->pool_id = pool_id;
225
2
  #endif
226
2
#endif
227
2
  return slab;
228
2
}
Unexecuted instantiation: _Z7NewSlabIPN10hnode_asdl7hnode_tEEP4SlabIT_Ei
_Z7NewSlabIPN4pyos11PasswdEntryEEP4SlabIT_Ei
Line
Count
Source
205
6
inline Slab<T>* NewSlab(int len) {
206
6
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
6
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
6
#if MARK_SWEEP
209
6
  int obj_id;
210
6
  int pool_id;
211
6
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
6
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
6
  void* obj = header->ObjectAddress();
217
6
  if (std::is_pointer<T>()) {
218
6
    memset(obj, 0, obj_len);
219
6
  }
220
6
  auto slab = new (obj) Slab<T>(len);
221
6
#if MARK_SWEEP
222
6
  header->obj_id = obj_id;
223
6
  #ifndef NO_POOL_ALLOC
224
6
  header->pool_id = pool_id;
225
6
  #endif
226
6
#endif
227
6
  return slab;
228
6
}
Unexecuted instantiation: _Z7NewSlabIP4ListIP6Tuple2IiiEEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IP4ListIPS1_IPS0_IiiEEEP4DictIiiEEEP4SlabIT_Ei
_Z7NewSlabIPN12runtime_asdl7value_tEEP4SlabIT_Ei
Line
Count
Source
205
9
inline Slab<T>* NewSlab(int len) {
206
9
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
9
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
9
#if MARK_SWEEP
209
9
  int obj_id;
210
9
  int pool_id;
211
9
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
9
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
9
  void* obj = header->ObjectAddress();
217
9
  if (std::is_pointer<T>()) {
218
9
    memset(obj, 0, obj_len);
219
9
  }
220
9
  auto slab = new (obj) Slab<T>(len);
221
9
#if MARK_SWEEP
222
9
  header->obj_id = obj_id;
223
9
  #ifndef NO_POOL_ALLOC
224
9
  header->pool_id = pool_id;
225
9
  #endif
226
9
#endif
227
9
  return slab;
228
9
}
_Z7NewSlabIPN4args7_ActionEEP4SlabIT_Ei
Line
Count
Source
205
7
inline Slab<T>* NewSlab(int len) {
206
7
  int obj_len = RoundUp(kSlabHeaderSize + len * sizeof(T));
207
7
  const size_t num_bytes = sizeof(ObjHeader) + obj_len;
208
7
#if MARK_SWEEP
209
7
  int obj_id;
210
7
  int pool_id;
211
7
  void* place = gHeap.Allocate(num_bytes, &obj_id, &pool_id);
212
#else
213
  void* place = gHeap.Allocate(num_bytes);
214
#endif
215
7
  ObjHeader* header = new (place) ObjHeader(Slab<T>::obj_header(len));
216
7
  void* obj = header->ObjectAddress();
217
7
  if (std::is_pointer<T>()) {
218
7
    memset(obj, 0, obj_len);
219
7
  }
220
7
  auto slab = new (obj) Slab<T>(len);
221
7
#if MARK_SWEEP
222
7
  header->obj_id = obj_id;
223
7
  #ifndef NO_POOL_ALLOC
224
7
  header->pool_id = pool_id;
225
7
  #endif
226
7
#endif
227
7
  return slab;
228
7
}
Unexecuted instantiation: _Z7NewSlabIPN11syntax_asdl12CompoundWordEEP4SlabIT_Ei
Unexecuted instantiation: _Z7NewSlabIP6Tuple2IP3StrbEEP4SlabIT_Ei
229
230
#endif  // MYCPP_GC_ALLOC_H