object.cc (12955:9c8bf6a5f2e3) | object.cc (12984:02f20eeeb8ce) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 104 unchanged lines hidden (view full) --- 113Object & 114Object::operator = (const Object &) 115{ 116 return *this; 117} 118 119Object::~Object() 120{ | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 104 unchanged lines hidden (view full) --- 113Object & 114Object::operator = (const Object &) 115{ 116 return *this; 117} 118 119Object::~Object() 120{ |
121 panic_if(!children.empty(), "Parent object still has children.\n"); | 121 // Promote all children to be top level objects. 122 for (auto child: children) { 123 addObject(&topLevelObjects, child); 124 child->_gem5_object->parent = nullptr; 125 } 126 children.clear(); |
122 123 if (parent) 124 popObject(&parent->_gem5_object->children, _name); 125 else 126 popObject(&topLevelObjects, _name); 127 popObject(&allObjects, _name); 128} 129 --- 122 unchanged lines hidden --- | 127 128 if (parent) 129 popObject(&parent->_gem5_object->children, _name); 130 else 131 popObject(&topLevelObjects, _name); 132 popObject(&allObjects, _name); 133} 134 --- 122 unchanged lines hidden --- |