1.1 --- a/src/share/vm/adlc/adlparse.cpp Thu Feb 26 16:57:21 2009 -0800 1.2 +++ b/src/share/vm/adlc/adlparse.cpp Fri Feb 27 03:35:40 2009 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -298,7 +298,7 @@ 1.11 rule->count_commutative_op(count); 1.12 if (count > 0) { 1.13 // Clone match rule and swap commutative operation's operands. 1.14 - rule->swap_commutative_op(instr_ident, count, match_rules_cnt); 1.15 + rule->matchrule_swap_commutative_op(instr_ident, count, match_rules_cnt); 1.16 } 1.17 } 1.18 1.19 @@ -2586,7 +2586,7 @@ 1.20 while( _curchar != ')' ) { 1.21 // Get information on the left instruction and its operand 1.22 // left-instructions's number 1.23 - intptr_t left_inst = get_int(); 1.24 + int left_inst = get_int(); 1.25 // Left-instruction's operand 1.26 skipws(); 1.27 if( _curchar != '.' ) { 1.28 @@ -2602,7 +2602,7 @@ 1.29 1.30 skipws(); 1.31 // Get information on the right instruction and its operand 1.32 - intptr_t right_inst; // Right-instructions's number 1.33 + int right_inst; // Right-instructions's number 1.34 if( isdigit(_curchar) ) { 1.35 right_inst = get_int(); 1.36 // Right-instruction's operand 1.37 @@ -3497,22 +3497,24 @@ 1.38 1.39 // (1) 1.40 // Check if there is a string to pass through to output 1.41 - char *start = _ptr; // Record start of the next string 1.42 - while ((_curchar != '$') && ((_curchar != '%') || (*(_ptr+1) != '}')) ) { 1.43 - // If at the start of a comment, skip past it 1.44 - if( (_curchar == '/') && ((*(_ptr+1) == '/') || (*(_ptr+1) == '*')) ) { 1.45 - skipws_no_preproc(); 1.46 - } else { 1.47 - // ELSE advance to the next character, or start of the next line 1.48 - next_char_or_line(); 1.49 + { 1.50 + char *start = _ptr; // Record start of the next string 1.51 + while ((_curchar != '$') && ((_curchar != '%') || (*(_ptr+1) != '}')) ) { 1.52 + // If at the start of a comment, skip past it 1.53 + if( (_curchar == '/') && ((*(_ptr+1) == '/') || (*(_ptr+1) == '*')) ) { 1.54 + skipws_no_preproc(); 1.55 + } else { 1.56 + // ELSE advance to the next character, or start of the next line 1.57 + next_char_or_line(); 1.58 + } 1.59 } 1.60 - } 1.61 - // If a string was found, terminate it and record in EncClass 1.62 - if ( start != _ptr ) { 1.63 - *_ptr = '\0'; // Terminate the string 1.64 - // Add flag to _strings list indicating we should check _rep_vars 1.65 - format->_strings.addName(NameList::_signal2); 1.66 - format->_strings.addName(start); 1.67 + // If a string was found, terminate it and record in EncClass 1.68 + if ( start != _ptr ) { 1.69 + *_ptr = '\0'; // Terminate the string 1.70 + // Add flag to _strings list indicating we should check _rep_vars 1.71 + format->_strings.addName(NameList::_signal2); 1.72 + format->_strings.addName(start); 1.73 + } 1.74 } 1.75 1.76 // (2) 1.77 @@ -3563,10 +3565,10 @@ 1.78 // copy it and record in FormatRule 1.79 if ( _curchar == '$' ) { 1.80 next_char(); // Move past the '$' 1.81 - char* rep_var = get_ident(); // Nil terminate the variable name 1.82 - rep_var = strdup(rep_var);// Copy the string 1.83 + char* next_rep_var = get_ident(); // Nil terminate the variable name 1.84 + next_rep_var = strdup(next_rep_var);// Copy the string 1.85 *_ptr = _curchar; // and replace Nil with original character 1.86 - format->_rep_vars.addName(rep_var); 1.87 + format->_rep_vars.addName(next_rep_var); 1.88 // Add flag to _strings list indicating we should check _rep_vars 1.89 format->_strings.addName(NameList::_signal); 1.90 } 1.91 @@ -3714,13 +3716,13 @@ 1.92 parse_err(SYNERR, "identifier expected at %c\n", _curchar); 1.93 continue; 1.94 } // Check that you have a valid operand 1.95 - const Form *form = instr->_localNames[ident2]; 1.96 - if (!form) { 1.97 + const Form *form2 = instr->_localNames[ident2]; 1.98 + if (!form2) { 1.99 parse_err(SYNERR, "operand name expected at %s\n", ident2); 1.100 continue; 1.101 } 1.102 - oper = form->is_operand(); 1.103 - if (oper == NULL && !form->is_opclass()) { 1.104 + oper = form2->is_operand(); 1.105 + if (oper == NULL && !form2->is_opclass()) { 1.106 parse_err(SYNERR, "operand name expected at %s\n", ident2); 1.107 continue; 1.108 } // Add operand to list 1.109 @@ -4271,7 +4273,7 @@ 1.110 int result; // Storage for integer result 1.111 1.112 if( _curline == NULL ) // Return NULL at EOF. 1.113 - return NULL; 1.114 + return 0; 1.115 1.116 skipws(); // Skip whitespace before identifier 1.117 start = end = _ptr; // Start points at first character