AOT: Enable optimizing native functions. Removes some initialization of unused split slots.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2359393003 .
This commit is contained in:
Ryan Macnak 2016-09-26 09:01:58 -07:00
parent 79b682b885
commit bace87bc00

View file

@ -5977,13 +5977,13 @@ void Function::SetNumOptionalParameters(intptr_t num_optional_parameters,
bool Function::IsOptimizable() const {
if (FLAG_precompiled_mode) {
return true;
}
if (is_native()) {
// Native methods don't need to be optimized.
return false;
}
if (FLAG_precompiled_mode) {
return true;
}
const intptr_t function_length = end_token_pos().Pos() - token_pos().Pos();
if (is_optimizable() && (script() != Script::null()) &&
(function_length < FLAG_huge_method_cutoff_in_tokens)) {