equal
deleted
inserted
replaced
133 // ------------------------------------------------------------------ |
133 // ------------------------------------------------------------------ |
134 // CompileTask::code/set_code |
134 // CompileTask::code/set_code |
135 // |
135 // |
136 nmethod* CompileTask::code() const { |
136 nmethod* CompileTask::code() const { |
137 if (_code_handle == NULL) return NULL; |
137 if (_code_handle == NULL) return NULL; |
138 return _code_handle->code(); |
138 CodeBlob *blob = _code_handle->code(); |
|
139 if (blob != NULL) { |
|
140 return blob->as_nmethod(); |
|
141 } |
|
142 return NULL; |
139 } |
143 } |
140 |
144 |
141 void CompileTask::set_code(nmethod* nm) { |
145 void CompileTask::set_code(nmethod* nm) { |
142 if (_code_handle == NULL && nm == NULL) return; |
146 if (_code_handle == NULL && nm == NULL) return; |
143 guarantee(_code_handle != NULL, ""); |
147 guarantee(_code_handle != NULL, ""); |