当前位置: 首页>>代码示例>>C++>>正文


C++ ExpGenerator::genItemExpr方法代码示例

本文整理汇总了C++中ExpGenerator::genItemExpr方法的典型用法代码示例。如果您正苦于以下问题:C++ ExpGenerator::genItemExpr方法的具体用法?C++ ExpGenerator::genItemExpr怎么用?C++ ExpGenerator::genItemExpr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ExpGenerator的用法示例。


在下文中一共展示了ExpGenerator::genItemExpr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: codeGen

short BiArithCount::codeGen(Generator * generator)
{
  Attributes ** attr;
  ExpGenerator * eg = generator->getExpGenerator();
  
  if (eg->genItemExpr(this, &attr, (1+getArity()), -1) == 1)
    return 0;

  // if temp space is needed for this operation, set it.
  if (attr[0]->isComplexType())
    {
      eg->addTempsLength(((ComplexType *)attr[0])->setTempSpaceInfo(getOperatorType(),
#pragma nowarn(1506)   // warning elimination 
								    eg->getTempsLength()));
#pragma warn(1506)  // warning elimination 
    }
			      
  ex_arith_count_clause * arith_clause =
    new(generator->getSpace()) 
    ex_arith_count_clause(getOperatorType(), 
			  attr, 
			  generator->getSpace());
  
  generator->getExpGenerator()->linkClause(this, arith_clause);

  return 0;
}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:27,代码来源:GenItemExpr.cpp

示例2: codeGen

short UnArith::codeGen(Generator * generator)
{
  Attributes ** attr;
  ExpGenerator * eg = generator->getExpGenerator();
  
  if (eg->genItemExpr(this, &attr, (1+getArity()), -1) == 1)
    return 0;


  ex_arith_clause * arith_clause = 
    new(generator->getSpace()) 
    ex_arith_clause(getOperatorType(), attr, generator->getSpace(),
                    0, FALSE);
  
  generator->getExpGenerator()->linkClause(this, arith_clause);

  return 0;
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:18,代码来源:GenItemExpr.cpp

示例3: codeGen

// ItmBlockFunction::codeGen
//
// The Block function executes the code represented by both its children and
// then returns the result of the right child (child(1)).
//
short ItmBlockFunction::codeGen(Generator * generator) {
  // Get local handles...
  //
  Attributes **attr;
  Space* space = generator->getSpace();
  CollHeap *heap = generator->wHeap();
  ExpGenerator *exp = generator->getExpGenerator();

  // If this Block has already been codeGenned, then bug out...
  // Otherwise, allocate space for the result if necessary and set
  // attr[0] to point to the result attribute data. Also, mark this
  // node as codeGenned.
  //
  if (exp->genItemExpr(this, &attr, 2, 0) == 1)
    return 0;

  // CodeGen the left child.
  //
  child(0)->codeGen(generator);

  // CodeGen the right child.
  //
  child(1)->codeGen(generator);

  // The result of the Block is the result of the right child. Set
  // the src attribute for the convert (added below) to be the right child
  // The dst attribute has already been set in genItemExpr().
  //
  attr[1] = generator->getMapInfo
    (child(1)->castToItemExpr()->getValueId())->getAttr();

  // Allocate a convert clause to move the result from child(1) to the
  // result of this node. This move is necessary so that future
  // side-effects of the result of child(1) -- if it is a local variable,
  // for instance -- will not change the result of the Block.
  //
  ex_conv_clause * convClause =
    new(generator->getSpace()) ex_conv_clause
    (getOperatorType(), attr, space);
  generator->getExpGenerator()->linkClause(this, convClause);

  return 0;
}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:48,代码来源:GenFlowControlFunction.cpp


注:本文中的ExpGenerator::genItemExpr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。