Deleted Added
sdiff udiff text old ( 12988:df70e73818e4 ) new ( 13045:ccedccd0d93d )
full compact
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

--- 64 unchanged lines hidden (view full) ---

73
74Object::Object(sc_core::sc_object *_sc_obj, const char *obj_name) :
75 _sc_obj(_sc_obj), _basename(obj_name), parent(nullptr)
76{
77 if (_basename == "")
78 _basename = "object";
79
80 Module *p = currentModule();
81
82 Module *n = newModule();
83 if (n) {
84 // We are a module in the process of being constructed.
85 n->finish(this);
86 }
87
88 if (p) {
89 // We're "within" a parent module, ie we're being created while its
90 // constructor is running.
91 parent = p->obj()->_sc_obj;
92 addObject(&parent->_gem5_object->children, _sc_obj);
93 } else if (scheduler.current()) {
94 // Our parent is the currently running process.
95 parent = scheduler.current();
96 } else {
97 // We're a top level object.
98 addObject(&topLevelObjects, _sc_obj);

--- 162 unchanged lines hidden ---