Wed, 06 Jul 2011 09:27:54 -0700
7061101: adlc should complain about mixing block and expression forms of ins_encode
Reviewed-by: kvn
src/share/vm/adlc/adlparse.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/adlc/adlparse.cpp Tue Jul 05 16:07:54 2011 -0700 1.2 +++ b/src/share/vm/adlc/adlparse.cpp Wed Jul 06 09:27:54 2011 -0700 1.3 @@ -2812,6 +2812,13 @@ 1.4 params->add_entry(param); 1.5 } 1.6 1.7 + // Check for duplicate ins_encode sections after parsing the block 1.8 + // so that parsing can continue and find any other errors. 1.9 + if (inst._insencode != NULL) { 1.10 + parse_err(SYNERR, "Multiple ins_encode sections defined\n"); 1.11 + return; 1.12 + } 1.13 + 1.14 // Set encode class of this instruction. 1.15 inst._insencode = encrule; 1.16 } 1.17 @@ -3044,6 +3051,13 @@ 1.18 next_char(); // move past ';' 1.19 skipws(); // be friendly to oper_parse() 1.20 1.21 + // Check for duplicate ins_encode sections after parsing the block 1.22 + // so that parsing can continue and find any other errors. 1.23 + if (inst._insencode != NULL) { 1.24 + parse_err(SYNERR, "Multiple ins_encode sections defined\n"); 1.25 + return; 1.26 + } 1.27 + 1.28 // Debug Stuff 1.29 if (_AD._adl_debug > 1) fprintf(stderr,"Instruction Encode: %s\n", ec_name); 1.30