Mercurial > hg > graal-compiler
comparison src/share/vm/adlc/adlparse.cpp @ 3793:fe240d87c6ec
7061101: adlc should complain about mixing block and expression forms of ins_encode
Reviewed-by: kvn
author | never |
---|---|
date | Wed, 06 Jul 2011 09:27:54 -0700 |
parents | 2f644f85485d |
children | c7b60b601eb4 |
comparison
equal
deleted
inserted
replaced
3792:15559220ce79 | 3793:fe240d87c6ec |
---|---|
2810 inst._parameters.reset(); | 2810 inst._parameters.reset(); |
2811 while ((param = inst._parameters.iter()) != NULL) { | 2811 while ((param = inst._parameters.iter()) != NULL) { |
2812 params->add_entry(param); | 2812 params->add_entry(param); |
2813 } | 2813 } |
2814 | 2814 |
2815 // Check for duplicate ins_encode sections after parsing the block | |
2816 // so that parsing can continue and find any other errors. | |
2817 if (inst._insencode != NULL) { | |
2818 parse_err(SYNERR, "Multiple ins_encode sections defined\n"); | |
2819 return; | |
2820 } | |
2821 | |
2815 // Set encode class of this instruction. | 2822 // Set encode class of this instruction. |
2816 inst._insencode = encrule; | 2823 inst._insencode = encrule; |
2817 } | 2824 } |
2818 | 2825 |
2819 | 2826 |
3041 parse_err(SYNERR, "Missing ';' at end of ins_encode.\n"); | 3048 parse_err(SYNERR, "Missing ';' at end of ins_encode.\n"); |
3042 return; | 3049 return; |
3043 } | 3050 } |
3044 next_char(); // move past ';' | 3051 next_char(); // move past ';' |
3045 skipws(); // be friendly to oper_parse() | 3052 skipws(); // be friendly to oper_parse() |
3053 | |
3054 // Check for duplicate ins_encode sections after parsing the block | |
3055 // so that parsing can continue and find any other errors. | |
3056 if (inst._insencode != NULL) { | |
3057 parse_err(SYNERR, "Multiple ins_encode sections defined\n"); | |
3058 return; | |
3059 } | |
3046 | 3060 |
3047 // Debug Stuff | 3061 // Debug Stuff |
3048 if (_AD._adl_debug > 1) fprintf(stderr,"Instruction Encode: %s\n", ec_name); | 3062 if (_AD._adl_debug > 1) fprintf(stderr,"Instruction Encode: %s\n", ec_name); |
3049 | 3063 |
3050 // Set encode class of this instruction. | 3064 // Set encode class of this instruction. |