src/share/vm/adlc/dfa.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hs-6771309 Cdiff src/share/vm/adlc/dfa.cpp

src/share/vm/adlc/dfa.cpp

Print this page
rev 461 : Fixed 6771309: debugging AD files is difficult without #line directives in generated code
Summary: more and better #line and #define directives in the generated code; ADLC itself accepts #line directives
Reviewed-by: never, kvn

*** 456,466 **** Expr::check_buffers(); } class dfa_shared_preds { ! enum { count = 2 }; static bool _found[count]; static const char* _type [count]; static const char* _var [count]; static const char* _pred [count]; --- 456,466 ---- Expr::check_buffers(); } class dfa_shared_preds { ! enum { count = 4 }; static bool _found[count]; static const char* _type [count]; static const char* _var [count]; static const char* _pred [count];
*** 477,492 **** --- 477,495 ---- // Check previous character and recurse if needed char *prev = shared - 1; char c = *prev; switch( c ) { case ' ': + case '\n': return dfa_shared_preds::valid_loc(pred, prev); case '!': case '(': case '<': case '=': return true; + case '"': // such as: #line 10 "myfile.ad"\n mypredicate + return true; case '|': if( prev != pred && *(prev-1) == '|' ) return true; case '&': if( prev != pred && *(prev-1) == '&' ) return true; default:
*** 562,575 **** } } } }; // shared predicates, _var and _pred entry should be the same length ! bool dfa_shared_preds::_found[dfa_shared_preds::count] = { false, false }; ! const char* dfa_shared_preds::_type[dfa_shared_preds::count] = { "int", "bool" }; ! const char* dfa_shared_preds::_var [dfa_shared_preds::count] = { "_n_get_int__", "Compile__current____select_24_bit_instr__" }; ! const char* dfa_shared_preds::_pred[dfa_shared_preds::count] = { "n->get_int()", "Compile::current()->select_24_bit_instr()" }; void ArchDesc::gen_dfa_state_body(FILE* fp, Dict &minimize, ProductionState &status, Dict &operands_chained_from, int i) { // Start the body of each Op_XXX sub-dfa with a clean state. status.initialize(); --- 565,582 ---- } } } }; // shared predicates, _var and _pred entry should be the same length ! bool dfa_shared_preds::_found[dfa_shared_preds::count] ! = { false, false, false, false }; ! const char* dfa_shared_preds::_type[dfa_shared_preds::count] ! = { "int", "jlong", "intptr_t", "bool" }; ! const char* dfa_shared_preds::_var [dfa_shared_preds::count] ! = { "_n_get_int__", "_n_get_long__", "_n_get_intptr_t__", "Compile__current____select_24_bit_instr__" }; ! const char* dfa_shared_preds::_pred[dfa_shared_preds::count] ! = { "n->get_int()", "n->get_long()", "n->get_intptr_t()", "Compile::current()->select_24_bit_instr()" }; void ArchDesc::gen_dfa_state_body(FILE* fp, Dict &minimize, ProductionState &status, Dict &operands_chained_from, int i) { // Start the body of each Op_XXX sub-dfa with a clean state. status.initialize();
src/share/vm/adlc/dfa.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File