Exemplo n.º 1
0
static void name_params(compile_t* c, reachable_type_t* t,
  reachable_method_t* m, ast_t* params, LLVMValueRef func)
{
  // Name the receiver 'this'.
  name_param(c, t, m, func, c->str_this, 0, ast_line(params), ast_pos(params));

  // Name each parameter.
  ast_t* param = ast_child(params);

  for(size_t i = 0; i < m->param_count; i++)
  {
    name_param(c, m->params[i], m, func, ast_name(ast_child(param)),
      (unsigned)i + 1, ast_line(param), ast_pos(param));
    param = ast_sibling(param);
  }
}
Exemplo n.º 2
0
Arquivo: genfun.c Projeto: fydot/ponyc
static void name_params(compile_t* c, ast_t* type, ast_t* params,
  LLVMValueRef func)
{
  int count = 0;

  // Name the receiver 'this'.
  name_param(c, func, stringtab("this"), type, count++);

  // Name each parameter.
  ast_t* param = ast_child(params);

  while(param != NULL)
  {
    AST_GET_CHILDREN(param, id, type);
    name_param(c, func, ast_name(id), type, count++);
    param = ast_sibling(param);
  }
}
Exemplo n.º 3
0
bool
HttpUtils::normalizeHeader(const std::string &name, const Range &value, std::string &result) {   
    MessageParam<const std::string> name_param(&name);
    MessageParam<const Range> value_param(&value);
    MessageParam<std::string> result_param(&result);
    
    MessageParamBase* param_list[3];
    param_list[0] = &name_param;
    param_list[1] = &value_param;
    param_list[2] = &result_param;
    
    MessageParams params(3, param_list);
    MessageResult<bool> res;
  
    MessageProcessor::instance()->process(NORMALIZE_HEADER_METHOD, params, res);
    return res.get();
}