| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // The next call to the function will trigger optimization. | 164 // The next call to the function will trigger optimization. |
| 165 function->MarkForLazyRecompilation(); | 165 function->MarkForLazyRecompilation(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 | 168 |
| 169 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) { | 169 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) { |
| 170 // See AlwaysFullCompiler (in compiler.cc) comment on why we need | 170 // See AlwaysFullCompiler (in compiler.cc) comment on why we need |
| 171 // Debug::has_break_points(). | 171 // Debug::has_break_points(). |
| 172 ASSERT(function->IsMarkedForLazyRecompilation()); | 172 ASSERT(function->IsMarkedForLazyRecompilation()); |
| 173 if (!FLAG_use_osr || | 173 if (!FLAG_use_osr || |
| 174 isolate_->debug()->has_break_points() || | 174 isolate_->DebuggerHasBreakPoints() || |
| 175 function->IsBuiltin()) { | 175 function->IsBuiltin()) { |
| 176 return; | 176 return; |
| 177 } | 177 } |
| 178 | 178 |
| 179 SharedFunctionInfo* shared = function->shared(); | 179 SharedFunctionInfo* shared = function->shared(); |
| 180 // If the code is not optimizable or references context slots, don't try OSR. | 180 // If the code is not optimizable or references context slots, don't try OSR. |
| 181 if (!shared->code()->optimizable() || !shared->allows_lazy_compilation()) { | 181 if (!shared->code()->optimizable() || !shared->allows_lazy_compilation()) { |
| 182 return; | 182 return; |
| 183 } | 183 } |
| 184 | 184 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 } else { | 480 } else { |
| 481 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 481 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
| 482 } | 482 } |
| 483 } | 483 } |
| 484 #endif | 484 #endif |
| 485 return false; | 485 return false; |
| 486 } | 486 } |
| 487 | 487 |
| 488 | 488 |
| 489 } } // namespace v8::internal | 489 } } // namespace v8::internal |
| OLD | NEW |