Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/c2compiler.cpp @ 1685:0e35fa8ebccd
6973963: SEGV in ciBlock::start_bci() with EA
Summary: Added more checks into ResourceObj and growableArray to verify correctness of allocation type.
Reviewed-by: never, coleenp, dholmes
author | kvn |
---|---|
date | Tue, 03 Aug 2010 15:55:03 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1684:66c5dadb4d61 | 1685:0e35fa8ebccd |
---|---|
101 ciMethod* target, | 101 ciMethod* target, |
102 int entry_bci) { | 102 int entry_bci) { |
103 if (!is_initialized()) { | 103 if (!is_initialized()) { |
104 initialize(); | 104 initialize(); |
105 } | 105 } |
106 bool subsume_loads = true; | 106 bool subsume_loads = SubsumeLoads; |
107 bool do_escape_analysis = DoEscapeAnalysis && | 107 bool do_escape_analysis = DoEscapeAnalysis && |
108 !env->jvmti_can_access_local_variables(); | 108 !env->jvmti_can_access_local_variables(); |
109 while (!env->failing()) { | 109 while (!env->failing()) { |
110 // Attempt to compile while subsuming loads into machine instructions. | 110 // Attempt to compile while subsuming loads into machine instructions. |
111 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis); | 111 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis); |
112 | |
112 | 113 |
113 // Check result and retry if appropriate. | 114 // Check result and retry if appropriate. |
114 if (C.failure_reason() != NULL) { | 115 if (C.failure_reason() != NULL) { |
115 if (C.failure_reason_is(retry_no_subsuming_loads())) { | 116 if (C.failure_reason_is(retry_no_subsuming_loads())) { |
116 assert(subsume_loads, "must make progress"); | 117 assert(subsume_loads, "must make progress"); |
125 // Pass any other failure reason up to the ciEnv. | 126 // Pass any other failure reason up to the ciEnv. |
126 // Note that serious, irreversible failures are already logged | 127 // Note that serious, irreversible failures are already logged |
127 // on the ciEnv via env->record_method_not_compilable(). | 128 // on the ciEnv via env->record_method_not_compilable(). |
128 env->record_failure(C.failure_reason()); | 129 env->record_failure(C.failure_reason()); |
129 } | 130 } |
131 if (StressRecompilation) { | |
132 if (subsume_loads) { | |
133 subsume_loads = false; | |
134 continue; // retry | |
135 } | |
136 if (do_escape_analysis) { | |
137 do_escape_analysis = false; | |
138 continue; // retry | |
139 } | |
140 } | |
130 | 141 |
131 // No retry; just break the loop. | 142 // No retry; just break the loop. |
132 break; | 143 break; |
133 } | 144 } |
134 } | 145 } |