本文整理汇总了C++中symbols::shift方法的典型用法代码示例。如果您正苦于以下问题:C++ symbols::shift方法的具体用法?C++ symbols::shift怎么用?C++ symbols::shift使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类symbols
的用法示例。
在下文中一共展示了symbols::shift方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toObjFile
//.........这里部分代码省略.........
{
b->BC = BCretexp;
b->Belem = el_combine(b->Belem, el_var(sthis));
}
}
}
}
// If static constructor
#if DMDV2
if (isSharedStaticCtorDeclaration()) // must come first because it derives from StaticCtorDeclaration
{
ssharedctors.push(s);
}
else
#endif
if (isStaticCtorDeclaration())
{
sctors.push(s);
}
// If static destructor
#if DMDV2
if (isSharedStaticDtorDeclaration()) // must come first because it derives from StaticDtorDeclaration
{
SharedStaticDtorDeclaration *f = isSharedStaticDtorDeclaration();
assert(f);
if (f->vgate)
{ /* Increment destructor's vgate at construction time
*/
esharedctorgates.push(f);
}
sshareddtors.shift(s);
}
else
#endif
if (isStaticDtorDeclaration())
{
StaticDtorDeclaration *f = isStaticDtorDeclaration();
assert(f);
if (f->vgate)
{ /* Increment destructor's vgate at construction time
*/
ectorgates.push(f);
}
sdtors.shift(s);
}
// If unit test
if (isUnitTestDeclaration())
{
stests.push(s);
}
if (global.errors)
return;
writefunc(s);
if (isExport())
obj_export(s, Poffset);
for (size_t i = 0; i < irs.deferToObj->dim; i++)
{
Dsymbol *s = (*irs.deferToObj)[i];
示例2: FuncDeclaration_toObjFile
//.........这里部分代码省略.........
// einit = el_combine(einit,bx.init);
if (fd->isCtorDeclaration())
{
assert(sthis);
for (block *b = f->Fstartblock; b; b = b->Bnext)
{
if (b->BC == BCret)
{
b->BC = BCretexp;
b->Belem = el_combine(b->Belem, el_var(sthis));
}
}
}
}
// If static constructor
if (fd->isSharedStaticCtorDeclaration()) // must come first because it derives from StaticCtorDeclaration
{
ssharedctors.push(s);
}
else if (fd->isStaticCtorDeclaration())
{
sctors.push(s);
}
// If static destructor
if (fd->isSharedStaticDtorDeclaration()) // must come first because it derives from StaticDtorDeclaration
{
SharedStaticDtorDeclaration *f = fd->isSharedStaticDtorDeclaration();
assert(f);
if (f->vgate)
{
/* Increment destructor's vgate at construction time
*/
esharedctorgates.push(f);
}
sshareddtors.shift(s);
}
else if (fd->isStaticDtorDeclaration())
{
StaticDtorDeclaration *f = fd->isStaticDtorDeclaration();
assert(f);
if (f->vgate)
{
/* Increment destructor's vgate at construction time
*/
ectorgates.push(f);
}
sdtors.shift(s);
}
// If unit test
if (ud)
{
stests.push(s);
}
if (global.errors)
{
// Restore symbol table
cstate.CSpsymtab = symtabsave;
return;
}
writefunc(s);
// Restore symbol table
cstate.CSpsymtab = symtabsave;
if (fd->isExport())
objmod->export_symbol(s, Para.offset);
for (size_t i = 0; i < irs.deferToObj->dim; i++)
{
Dsymbol *s = (*irs.deferToObj)[i];
toObjFile(s, false);
}
if (ud)
{
for (size_t i = 0; i < ud->deferredNested.dim; i++)
{
FuncDeclaration *fd = ud->deferredNested[i];
toObjFile(fd, false);
}
}
#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS
// A hack to get a pointer to this function put in the .dtors segment
if (fd->ident && memcmp(fd->ident->toChars(), "_STD", 4) == 0)
objmod->staticdtor(s);
#endif
if (irs.startaddress)
{
//printf("Setting start address\n");
objmod->startaddress(irs.startaddress);
}
}
示例3: toObjFile
//.........这里部分代码省略.........
{
b->BC = BCretexp;
b->Belem = el_combine(b->Belem, el_var(sthis));
}
}
}
}
// If static constructor
#if DMDV2
if (isSharedStaticCtorDeclaration()) // must come first because it derives from StaticCtorDeclaration
{
ssharedctors.push(s);
}
else
#endif
if (isStaticCtorDeclaration())
{
sctors.push(s);
}
// If static destructor
#if DMDV2
if (isSharedStaticDtorDeclaration()) // must come first because it derives from StaticDtorDeclaration
{
SharedStaticDtorDeclaration *f = isSharedStaticDtorDeclaration();
assert(f);
if (f->vgate)
{ /* Increment destructor's vgate at construction time
*/
esharedctorgates.push(f);
}
sshareddtors.shift(s);
}
else
#endif
if (isStaticDtorDeclaration())
{
StaticDtorDeclaration *f = isStaticDtorDeclaration();
assert(f);
if (f->vgate)
{ /* Increment destructor's vgate at construction time
*/
ectorgates.push(f);
}
sdtors.shift(s);
}
// If unit test
if (isUnitTestDeclaration())
{
stests.push(s);
}
if (global.errors)
return;
writefunc(s);
if (isExport())
objmod->export_symbol(s, Para.offset);
for (size_t i = 0; i < irs.deferToObj->dim; i++)
{
Dsymbol *s = (*irs.deferToObj)[i];