Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index f7c89175da75c2fb7916015a34adf9954b565eef..f471f77a89aa32214e599a570f57e288bd303bd0 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -9727,20 +9727,6 @@ bool JSFunction::EnsureCompiled(Handle<JSFunction> function, |
| } |
| -bool JSFunction::IsInlineable() { |
| - if (IsBuiltin()) return false; |
| - SharedFunctionInfo* shared_info = shared(); |
| - // Check that the function has a script associated with it. |
| - if (!shared_info->script()->IsScript()) return false; |
| - if (shared_info->optimization_disabled()) return false; |
| - Code* code = shared_info->code(); |
| - if (code->kind() == Code::OPTIMIZED_FUNCTION) return true; |
| - // If we never ran this (unlikely) then lets try to optimize it. |
| - if (code->kind() != Code::FUNCTION) return true; |
| - return code->optimizable(); |
| -} |
| - |
| - |
| void JSObject::OptimizeAsPrototype(Handle<JSObject> object) { |
| if (object->IsGlobalObject()) return; |
| @@ -9967,6 +9953,17 @@ Handle<Object> SharedFunctionInfo::GetSourceCode() { |
| } |
| +bool SharedFunctionInfo::IsInlineable() { |
| + // Check that the function has a script associated with it. |
| + if (!script()->IsScript()) return false; |
| + if (optimization_disabled()) return false; |
| + if (code()->kind() == Code::OPTIMIZED_FUNCTION) return true; |
|
Jakob Kummerow
2013/10/29 17:17:53
I know you just moved this line around, but I thin
|
| + // If we never ran this (unlikely) then lets try to optimize it. |
| + if (code()->kind() != Code::FUNCTION) return true; |
| + return code()->optimizable(); |
| +} |
| + |
| + |
| int SharedFunctionInfo::SourceSize() { |
| return end_position() - start_position(); |
| } |