73
74 };
75
76 JVMState* ParseGenerator::generate(JVMState* jvms) {
77 Compile* C = Compile::current();
78 C->print_inlining_update(this);
79
80 if (is_osr()) {
81 // The JVMS for a OSR has a single argument (see its TypeFunc).
82 assert(jvms->depth() == 1, "no inline OSR");
83 }
84
85 if (C->failing()) {
86 return NULL; // bailing out of the compile; do not try to parse
87 }
88
89 Parse parser(jvms, method(), _expected_uses);
90 // Grab signature for matching/allocation
91 #ifdef ASSERT
92 if (parser.tf() != (parser.depth() == 1 ? C->tf() : tf())) {
93 MutexLockerEx ml(Compile_lock, Mutex::_no_safepoint_check_flag);
94 assert(C->env()->system_dictionary_modification_counter_changed(),
95 "Must invalidate if TypeFuncs differ");
96 }
97 #endif
98
99 GraphKit& exits = parser.exits();
100
101 if (C->failing()) {
102 while (exits.pop_exception_state() != NULL) ;
103 return NULL;
104 }
105
106 assert(exits.jvms()->same_calls_as(jvms), "sanity");
107
108 // Simply return the exit state of the parser,
109 // augmented by any exceptional states.
110 return exits.transfer_exceptions_into_jvms();
111 }
112
113 //---------------------------DirectCallGenerator------------------------------
|
73
74 };
75
76 JVMState* ParseGenerator::generate(JVMState* jvms) {
77 Compile* C = Compile::current();
78 C->print_inlining_update(this);
79
80 if (is_osr()) {
81 // The JVMS for a OSR has a single argument (see its TypeFunc).
82 assert(jvms->depth() == 1, "no inline OSR");
83 }
84
85 if (C->failing()) {
86 return NULL; // bailing out of the compile; do not try to parse
87 }
88
89 Parse parser(jvms, method(), _expected_uses);
90 // Grab signature for matching/allocation
91 #ifdef ASSERT
92 if (parser.tf() != (parser.depth() == 1 ? C->tf() : tf())) {
93 MutexLocker ml(Compile_lock);
94 assert(C->env()->system_dictionary_modification_counter_changed(),
95 "Must invalidate if TypeFuncs differ");
96 }
97 #endif
98
99 GraphKit& exits = parser.exits();
100
101 if (C->failing()) {
102 while (exits.pop_exception_state() != NULL) ;
103 return NULL;
104 }
105
106 assert(exits.jvms()->same_calls_as(jvms), "sanity");
107
108 // Simply return the exit state of the parser,
109 // augmented by any exceptional states.
110 return exits.transfer_exceptions_into_jvms();
111 }
112
113 //---------------------------DirectCallGenerator------------------------------
|