src/share/vm/compiler/directivesParser.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/compiler/directivesParser.cpp

src/share/vm/compiler/directivesParser.cpp

Print this page
rev 10344 : 8150646: Add support for blocking compiles through whitebox API

*** 53,71 **** tmp = pop_tmp(); } assert(_tmp_depth == 0, "Consistency"); } ! bool DirectivesParser::parse_string(const char* text, outputStream* st) { DirectivesParser cd(text, st); if (cd.valid()) { return cd.install_directives(); } else { cd.clean_tmp(); st->flush(); st->print_cr("Parsing of compiler directives failed"); ! return false; } } bool DirectivesParser::has_file() { return CompilerDirectivesFile != NULL; --- 53,71 ---- tmp = pop_tmp(); } assert(_tmp_depth == 0, "Consistency"); } ! int DirectivesParser::parse_string(const char* text, outputStream* st) { DirectivesParser cd(text, st); if (cd.valid()) { return cd.install_directives(); } else { cd.clean_tmp(); st->flush(); st->print_cr("Parsing of compiler directives failed"); ! return 0; } } bool DirectivesParser::has_file() { return CompilerDirectivesFile != NULL;
*** 101,115 **** } } return false; } ! bool DirectivesParser::install_directives() { // Check limit if (!DirectivesStack::check_capacity(_tmp_depth, _st)) { clean_tmp(); ! return false; } // Pop from internal temporary stack and push to compileBroker. CompilerDirectives* tmp = pop_tmp(); int i = 0; --- 101,115 ---- } } return false; } ! int DirectivesParser::install_directives() { // Check limit if (!DirectivesStack::check_capacity(_tmp_depth, _st)) { clean_tmp(); ! return 0; } // Pop from internal temporary stack and push to compileBroker. CompilerDirectives* tmp = pop_tmp(); int i = 0;
*** 118,135 **** DirectivesStack::push(tmp); tmp = pop_tmp(); } if (i == 0) { _st->print_cr("No directives in file"); ! return false; } else { _st->print_cr("%i compiler directives added", i); if (CompilerDirectivesPrint) { // Print entire directives stack after new has been pushed. DirectivesStack::print(_st); } ! return true; } } DirectivesParser::DirectivesParser(const char* text, outputStream* st) : JSON(text, false, st), depth(0), current_directive(NULL), current_directiveset(NULL), _tmp_top(NULL), _tmp_depth(0) { --- 118,135 ---- DirectivesStack::push(tmp); tmp = pop_tmp(); } if (i == 0) { _st->print_cr("No directives in file"); ! return 0; } else { _st->print_cr("%i compiler directives added", i); if (CompilerDirectivesPrint) { // Print entire directives stack after new has been pushed. DirectivesStack::print(_st); } ! return i; } } DirectivesParser::DirectivesParser(const char* text, outputStream* st) : JSON(text, false, st), depth(0), current_directive(NULL), current_directiveset(NULL), _tmp_top(NULL), _tmp_depth(0) {
src/share/vm/compiler/directivesParser.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File