コード例 #1
0
FunctionCall::FunctionCall
(EXPRESSION_CONSTRUCTOR_BASE_PARAMETERS,
 ExpressionPtr nameExp, const std::string &name, ExpressionListPtr params,
 ExpressionPtr classExp)
  : Expression(EXPRESSION_CONSTRUCTOR_BASE_PARAMETER_VALUES),
    StaticClassName(classExp), m_nameExp(nameExp),
    m_ciTemp(-1), m_params(params), m_valid(false),
    m_extraArg(0), m_variableArgument(false), m_voidReturn(false),
    m_voidWrapper(false), m_redeclared(false),
    m_noStatic(false), m_noInline(false), m_invokeFewArgsDecision(true),
    m_arrayParams(false),
    m_argArrayId(-1), m_argArrayHash(-1), m_argArrayIndex(-1) {

  if (m_nameExp &&
      m_nameExp->getKindOf() == Expression::KindOfScalarExpression) {
    assert(m_name.empty());
    ScalarExpressionPtr c = dynamic_pointer_cast<ScalarExpression>(m_nameExp);
    m_origName = c->getOriginalLiteralString();
    c->toLower(true /* func call*/);
    m_name = c->getLiteralString();
  } else {
    m_origName = name;
    m_name = Util::toLower(name);
  }
  m_clsNameTemp = -1;
}
コード例 #2
0
ファイル: function_call.cpp プロジェクト: kreshano/hiphop-php
FunctionCall::FunctionCall
(EXPRESSION_CONSTRUCTOR_PARAMETERS,
 ExpressionPtr nameExp, const std::string &name, ExpressionListPtr params,
 ExpressionPtr classExp)
    : Expression(EXPRESSION_CONSTRUCTOR_PARAMETER_VALUES),
      StaticClassName(classExp), m_nameExp(nameExp), m_params(params),
      m_valid(false), m_validClass(false),
      m_extraArg(0), m_variableArgument(false), m_voidReturn(false),
      m_voidWrapper(false), m_allowVoidReturn(false), m_redeclared(false),
      m_redeclaredClass(false), m_derivedFromRedeclaring(false),
      m_argArrayId(-1) {

    if (m_nameExp &&
            m_nameExp->getKindOf() == Expression::KindOfScalarExpression) {
        ASSERT(m_name.empty());
        ScalarExpressionPtr c = dynamic_pointer_cast<ScalarExpression>(m_nameExp);
        m_origName = c->getString();
        c->toLower(true /* func call*/);
        m_name = c->getString();
        ASSERT(!m_name.empty());
    } else {
        m_origName = name;
        m_name = Util::toLower(name);
    }
}
コード例 #3
0
ファイル: function_call.cpp プロジェクト: RavenB/hhvm
FunctionCall::FunctionCall
(EXPRESSION_CONSTRUCTOR_BASE_PARAMETERS,
 ExpressionPtr nameExp, const std::string &name, bool hadBackslash,
 ExpressionListPtr params, ExpressionPtr classExp)
    : Expression(EXPRESSION_CONSTRUCTOR_BASE_PARAMETER_VALUES),
      StaticClassName(classExp),
      m_nameExp(nameExp),
      m_params(params),
      m_valid(false),
      m_variableArgument(false),
      m_redeclared(false),
      m_arrayParams(false),
      m_hadBackslash(hadBackslash) {

    if (m_nameExp &&
            m_nameExp->getKindOf() == Expression::KindOfScalarExpression) {
        assert(m_origName.empty());
        ScalarExpressionPtr c = dynamic_pointer_cast<ScalarExpression>(m_nameExp);
        m_origName = c->getOriginalLiteralString();
        c->toLower(true /* func call*/);
    } else {
        m_origName = name;
    }
}
コード例 #4
0
void ExpressionList::toLower() {
  for (unsigned int i = 0; i < m_exps.size(); i++) {
    ScalarExpressionPtr s = dynamic_pointer_cast<ScalarExpression>(m_exps[i]);
    s->toLower();
  }
}