1.1 --- a/src/share/vm/adlc/adlparse.cpp Mon Nov 21 00:57:43 2011 -0800 1.2 +++ b/src/share/vm/adlc/adlparse.cpp Wed Sep 14 09:22:51 2011 +0200 1.3 @@ -3818,7 +3818,7 @@ 1.4 return; 1.5 } 1.6 // Get list of effect-operand pairs and insert into dictionary 1.7 - else get_effectlist(instr->_effects, instr->_localNames); 1.8 + else get_effectlist(instr->_effects, instr->_localNames, instr->_has_call); 1.9 1.10 // Debug Stuff 1.11 if (_AD._adl_debug > 1) fprintf(stderr,"Effect description: %s\n", desc); 1.12 @@ -4596,7 +4596,7 @@ 1.13 // effect, and the second must be the name of an operand defined in the 1.14 // operand list of this instruction. Stores the names with a pointer to the 1.15 // effect form in a local effects table. 1.16 -void ADLParser::get_effectlist(FormDict &effects, FormDict &operands) { 1.17 +void ADLParser::get_effectlist(FormDict &effects, FormDict &operands, bool& has_call) { 1.18 OperandForm *opForm; 1.19 Effect *eForm; 1.20 char *ident; 1.21 @@ -4629,26 +4629,31 @@ 1.22 // Debugging Stuff 1.23 if (_AD._adl_debug > 1) fprintf(stderr, "\tEffect Type: %s\t", ident); 1.24 skipws(); 1.25 - // Get name of operand and check that it is in the local name table 1.26 - if( (ident = get_unique_ident(effects, "effect")) == NULL) { 1.27 - parse_err(SYNERR, "missing operand identifier in effect list\n"); 1.28 - return; 1.29 + if (eForm->is(Component::CALL)) { 1.30 + if (_AD._adl_debug > 1) fprintf(stderr, "\n"); 1.31 + has_call = true; 1.32 + } else { 1.33 + // Get name of operand and check that it is in the local name table 1.34 + if( (ident = get_unique_ident(effects, "effect")) == NULL) { 1.35 + parse_err(SYNERR, "missing operand identifier in effect list\n"); 1.36 + return; 1.37 + } 1.38 + const Form *form = operands[ident]; 1.39 + opForm = form ? form->is_operand() : NULL; 1.40 + if( opForm == NULL ) { 1.41 + if( form && form->is_opclass() ) { 1.42 + const char* cname = form->is_opclass()->_ident; 1.43 + parse_err(SYNERR, "operand classes are illegal in effect lists (found %s %s)\n", cname, ident); 1.44 + } else { 1.45 + parse_err(SYNERR, "undefined operand %s in effect list\n", ident); 1.46 + } 1.47 + return; 1.48 + } 1.49 + // Add the pair to the effects table 1.50 + effects.Insert(ident, eForm); 1.51 + // Debugging Stuff 1.52 + if (_AD._adl_debug > 1) fprintf(stderr, "\tOperand Name: %s\n", ident); 1.53 } 1.54 - const Form *form = operands[ident]; 1.55 - opForm = form ? form->is_operand() : NULL; 1.56 - if( opForm == NULL ) { 1.57 - if( form && form->is_opclass() ) { 1.58 - const char* cname = form->is_opclass()->_ident; 1.59 - parse_err(SYNERR, "operand classes are illegal in effect lists (found %s %s)\n", cname, ident); 1.60 - } else { 1.61 - parse_err(SYNERR, "undefined operand %s in effect list\n", ident); 1.62 - } 1.63 - return; 1.64 - } 1.65 - // Add the pair to the effects table 1.66 - effects.Insert(ident, eForm); 1.67 - // Debugging Stuff 1.68 - if (_AD._adl_debug > 1) fprintf(stderr, "\tOperand Name: %s\n", ident); 1.69 skipws(); 1.70 } while(_curchar == ','); 1.71