| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 SharedFunctionInfo* shared = function->shared(); | 176 SharedFunctionInfo* shared = function->shared(); |
| 177 // If the code is not optimizable, don't try OSR. | 177 // If the code is not optimizable, don't try OSR. |
| 178 if (!shared->code()->optimizable()) return; | 178 if (!shared->code()->optimizable()) return; |
| 179 | 179 |
| 180 // We are not prepared to do OSR for a function that already has an | 180 // We are not prepared to do OSR for a function that already has an |
| 181 // allocated arguments object. The optimized code would bypass it for | 181 // allocated arguments object. The optimized code would bypass it for |
| 182 // arguments accesses, which is unsound. Don't try OSR. | 182 // arguments accesses, which is unsound. Don't try OSR. |
| 183 if (shared->uses_arguments()) return; | 183 if (shared->uses_arguments()) return; |
| 184 | 184 |
| 185 // We are not prepared to do OSR for a function has catch clauses. |
| 186 // TODO(mmassi): Fix this. |
| 187 if (shared->dont_osr()) return; |
| 188 |
| 185 // We're using on-stack replacement: patch the unoptimized code so that | 189 // We're using on-stack replacement: patch the unoptimized code so that |
| 186 // any back edge in any unoptimized frame will trigger on-stack | 190 // any back edge in any unoptimized frame will trigger on-stack |
| 187 // replacement for that frame. | 191 // replacement for that frame. |
| 188 if (FLAG_trace_osr) { | 192 if (FLAG_trace_osr) { |
| 189 PrintF("[patching stack checks in "); | 193 PrintF("[patching stack checks in "); |
| 190 function->PrintName(); | 194 function->PrintName(); |
| 191 PrintF(" for on-stack replacement]\n"); | 195 PrintF(" for on-stack replacement]\n"); |
| 192 } | 196 } |
| 193 | 197 |
| 194 // Get the stack check stub code object to match against. We aren't | 198 // Get the stack check stub code object to match against. We aren't |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 | 500 |
| 497 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { | 501 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { |
| 498 if (!RuntimeProfiler::IsSomeIsolateInJS()) { | 502 if (!RuntimeProfiler::IsSomeIsolateInJS()) { |
| 499 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 503 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
| 500 } | 504 } |
| 501 return false; | 505 return false; |
| 502 } | 506 } |
| 503 | 507 |
| 504 | 508 |
| 505 } } // namespace v8::internal | 509 } } // namespace v8::internal |
| OLD | NEW |