Mercurial > hg > Papers > 2011 > nobu-prosym
view Paper/source/rid-goto.c @ 61:2c543a47737b
modify explanation of fastcall
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 26 Dec 2011 11:18:47 +0900 |
parents | e07c7952f237 |
children |
line wrap: on
line source
case RID_GOTO: c_parser_consume_token (parser); #ifndef noCbC if ( c_parser_next_token_is (parser, CPP_NAME) && c_parser_peek_2nd_token (parser)->type == CPP_SEMICOLON ) { #else if (c_parser_next_token_is (parser, CPP_NAME)) { #endif stmt = c_finish_goto_label (loc, c_parser_peek_token (parser)->value); c_parser_consume_token (parser); } else if (c_parser_next_token_is (parser, CPP_MULT)) { tree val; c_parser_consume_token (parser); val = c_parser_expression (parser).value; mark_exp_read (val); stmt = c_finish_goto_ptr (loc, val); } else #ifndef noCbC { if (c_parser_next_token_is (parser, CPP_NAME)) { tree id = c_parser_peek_token (parser)->value; location_t loc = c_parser_peek_token (parser)->location; /** build_external_ref (id,RID_CbC_CODE , loc); **/ build_external_ref (loc, id, RID_CbC_CODE, &expr.original_type); } expr = c_parser_expr_no_commas (parser, NULL); if (TREE_CODE(expr.value) == CALL_EXPR ) { location_t loc = c_parser_peek_token (parser)->location; cbc_replace_arguments (loc, expr.value); TREE_TYPE(expr.value) = void_type_node; /*tree env = NULL_TREE;**/ CbC_IS_CbC_GOTO (expr.value) = 1; CALL_EXPR_TAILCALL (expr.value) = 1; add_stmt(expr.value); stmt = c_finish_return(loc, NULL_TREE, NULL_TREE); /* stmt = c_finish_return (0); */ } else c_parser_error (parser, "expected code segment jump or %<*%>"); } #else c_parser_error (parser, "expected identifier or %<*%>");