| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 6291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6302 void JSFunction::MarkForLazyRecompilation() { | 6302 void JSFunction::MarkForLazyRecompilation() { |
| 6303 ASSERT(is_compiled() && !IsOptimized()); | 6303 ASSERT(is_compiled() && !IsOptimized()); |
| 6304 ASSERT(shared()->allows_lazy_compilation() || | 6304 ASSERT(shared()->allows_lazy_compilation() || |
| 6305 code()->optimizable()); | 6305 code()->optimizable()); |
| 6306 Builtins* builtins = GetIsolate()->builtins(); | 6306 Builtins* builtins = GetIsolate()->builtins(); |
| 6307 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); | 6307 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
| 6308 } | 6308 } |
| 6309 | 6309 |
| 6310 | 6310 |
| 6311 bool JSFunction::IsInlineable() { | 6311 bool JSFunction::IsInlineable() { |
| 6312 if (IsBuiltin()) return false; | 6312 // if (IsBuiltin()) return false; |
| 6313 SharedFunctionInfo* shared_info = shared(); | 6313 SharedFunctionInfo* shared_info = shared(); |
| 6314 // Check that the function has a script associated with it. | 6314 // Check that the function has a script associated with it. |
| 6315 if (!shared_info->script()->IsScript()) return false; | 6315 if (!shared_info->script()->IsScript()) return false; |
| 6316 if (shared_info->optimization_disabled()) return false; | 6316 if (shared_info->optimization_disabled()) return false; |
| 6317 Code* code = shared_info->code(); | 6317 Code* code = shared_info->code(); |
| 6318 if (code->kind() == Code::OPTIMIZED_FUNCTION) return true; | 6318 if (code->kind() == Code::OPTIMIZED_FUNCTION) return true; |
| 6319 // If we never ran this (unlikely) then lets try to optimize it. | 6319 // If we never ran this (unlikely) then lets try to optimize it. |
| 6320 if (code->kind() != Code::FUNCTION) return true; | 6320 if (code->kind() != Code::FUNCTION) return true; |
| 6321 return code->optimizable(); | 6321 return code->optimizable(); |
| 6322 } | 6322 } |
| (...skipping 5268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11591 if (break_point_objects()->IsUndefined()) return 0; | 11591 if (break_point_objects()->IsUndefined()) return 0; |
| 11592 // Single break point. | 11592 // Single break point. |
| 11593 if (!break_point_objects()->IsFixedArray()) return 1; | 11593 if (!break_point_objects()->IsFixedArray()) return 1; |
| 11594 // Multiple break points. | 11594 // Multiple break points. |
| 11595 return FixedArray::cast(break_point_objects())->length(); | 11595 return FixedArray::cast(break_point_objects())->length(); |
| 11596 } | 11596 } |
| 11597 #endif | 11597 #endif |
| 11598 | 11598 |
| 11599 | 11599 |
| 11600 } } // namespace v8::internal | 11600 } } // namespace v8::internal |
| OLD | NEW |