Changeset 81da3da4 for src/InitTweak
- Timestamp:
- Dec 11, 2023, 4:18:13 AM (2 years ago)
- Branches:
- master, stuck-waitfor-destruct
- Children:
- 21ce2c7, 2554f24
- Parents:
- 5ddb8bf (diff), 1c85ffc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/InitTweak
- Files:
-
- 3 edited
- 1 moved
-
FixGlobalInit.cc (modified) (2 diffs)
-
FixInit.cpp (moved) (moved from src/InitTweak/FixInitNew.cpp ) (2 diffs)
-
InitTweak.cc (modified) (1 diff)
-
module.mk (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixGlobalInit.cc
r5ddb8bf r81da3da4 84 84 if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 85 85 auto initFunction = new ast::FunctionDecl(location, 86 "__global_init__", {}, {}, {}, 86 "__global_init__", {}, {}, {}, {}, 87 87 new ast::CompoundStmt(location, std::move(fixer.core.initStmts)), 88 88 ast::Storage::Static, ast::Linkage::C, … … 96 96 if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 97 97 auto destroyFunction = new ast::FunctionDecl( location, 98 "__global_destroy__", {}, {}, {}, 98 "__global_destroy__", {}, {}, {}, {}, 99 99 new ast::CompoundStmt(location, std::move(fixer.core.destroyStmts)), 100 100 ast::Storage::Static, ast::Linkage::C, -
src/InitTweak/FixInit.cpp
r5ddb8bf r81da3da4 74 74 fname, 75 75 std::move(typeParams), 76 {}, 76 77 {dstParam}, 77 78 {}, … … 899 900 900 901 // void __objName_dtor_atexitN(...) {...} 901 ast::FunctionDecl * dtorCaller = new ast::FunctionDecl(loc, objDecl->mangleName + dtorCallerNamer.newName(), {}, {}, {}, new ast::CompoundStmt(loc, {dtor}), ast::Storage::Static, ast::Linkage::C );902 ast::FunctionDecl * dtorCaller = new ast::FunctionDecl(loc, objDecl->mangleName + dtorCallerNamer.newName(), {}, {}, {}, {}, new ast::CompoundStmt(loc, {dtor}), ast::Storage::Static, ast::Linkage::C ); 902 903 dtorCaller->fixUniqueId(); 903 904 // dtorCaller->stmts->push_back( dtor ); -
src/InitTweak/InitTweak.cc
r5ddb8bf r81da3da4 342 342 if (!assign) { 343 343 auto td = new ast::TypeDecl(CodeLocation(), "T", {}, nullptr, ast::TypeDecl::Dtype, true); 344 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {td}, 344 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {td}, {}, 345 345 { new ast::ObjectDecl(CodeLocation(), "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))), 346 346 new ast::ObjectDecl(CodeLocation(), "_src", new ast::TypeInstType("T", td))}, -
src/InitTweak/module.mk
r5ddb8bf r81da3da4 24 24 InitTweak/FixGlobalInit.cc \ 25 25 InitTweak/FixGlobalInit.h \ 26 InitTweak/FixInit. h\27 InitTweak/FixInit New.cpp26 InitTweak/FixInit.cpp \ 27 InitTweak/FixInit.h 28 28 29 29 SRCDEMANGLE += $(SRC_INITTWEAK)
Note:
See TracChangeset
for help on using the changeset viewer.