< prev index next >
src/share/vm/adlc/adlparse.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 3483,3511 ****
}
next_char(); // skip open paren
skipws();
if (_curchar != ')') {
// Parse primary, secondary, and tertiary opcodes, if provided.
! if ( ((primary = get_ident_or_literal_constant("primary opcode")) == NULL) ) {
parse_err(SYNERR, "primary hex opcode expected at %c\n", _curchar);
return NULL;
}
skipws();
if (_curchar == ',') {
next_char();
skipws();
// Parse secondary opcode
! if ( ((secondary = get_ident_or_literal_constant("secondary opcode")) == NULL) ) {
parse_err(SYNERR, "secondary hex opcode expected at %c\n", _curchar);
return NULL;
}
skipws();
if (_curchar == ',') {
next_char();
skipws();
// Parse tertiary opcode
! if ( ((tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL) ) {
parse_err(SYNERR,"tertiary hex opcode expected at %c\n", _curchar);
return NULL;
}
skipws();
}
--- 3483,3511 ----
}
next_char(); // skip open paren
skipws();
if (_curchar != ')') {
// Parse primary, secondary, and tertiary opcodes, if provided.
! if ( (primary = get_ident_or_literal_constant("primary opcode")) == NULL ) {
parse_err(SYNERR, "primary hex opcode expected at %c\n", _curchar);
return NULL;
}
skipws();
if (_curchar == ',') {
next_char();
skipws();
// Parse secondary opcode
! if ( (secondary = get_ident_or_literal_constant("secondary opcode")) == NULL ) {
parse_err(SYNERR, "secondary hex opcode expected at %c\n", _curchar);
return NULL;
}
skipws();
if (_curchar == ',') {
next_char();
skipws();
// Parse tertiary opcode
! if ( (tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL ) {
parse_err(SYNERR,"tertiary hex opcode expected at %c\n", _curchar);
return NULL;
}
skipws();
}
*** 4771,4782 ****
return 0;
skipws(); // Skip whitespace before identifier
start = end = _ptr; // Start points at first character
c = *end; // Grab character to test
! while ((c >= '0') && (c <= '9')
! || ((c == '-') && (end == start))) {
end++; // Increment end pointer
c = *end; // Grab character to test
}
if (start == end) { // We popped out on the first try
parse_err(SYNERR, "integer expected at %c\n", c);
--- 4771,4781 ----
return 0;
skipws(); // Skip whitespace before identifier
start = end = _ptr; // Start points at first character
c = *end; // Grab character to test
! while ((c >= '0' && c <= '9') || (c == '-' && end == start)) {
end++; // Increment end pointer
c = *end; // Grab character to test
}
if (start == end) { // We popped out on the first try
parse_err(SYNERR, "integer expected at %c\n", c);
*** 4810,4820 ****
char *start = _ptr; // Store start of relational operator
char first = *_ptr; // the first character
if( (first == '=') || (first == '!') || (first == '<') || (first == '>') ) {
next_char();
char second = *_ptr; // the second character
! if( (second == '=') ) {
next_char();
char tmp = *_ptr;
*_ptr = '\0'; // NULL terminate
result = strdup(start); // Duplicate the string
*_ptr = tmp; // restore buffer
--- 4809,4819 ----
char *start = _ptr; // Store start of relational operator
char first = *_ptr; // the first character
if( (first == '=') || (first == '!') || (first == '<') || (first == '>') ) {
next_char();
char second = *_ptr; // the second character
! if( second == '=' ) {
next_char();
char tmp = *_ptr;
*_ptr = '\0'; // NULL terminate
result = strdup(start); // Duplicate the string
*_ptr = tmp; // restore buffer
< prev index next >