| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 SharedFunctionInfo* shared = function->shared(); | 165 SharedFunctionInfo* shared = function->shared(); |
| 166 // If the code is not optimizable, don't try OSR. | 166 // If the code is not optimizable, don't try OSR. |
| 167 if (!shared->code()->optimizable()) return; | 167 if (!shared->code()->optimizable()) return; |
| 168 | 168 |
| 169 // We are not prepared to do OSR for a function that already has an | 169 // We are not prepared to do OSR for a function that already has an |
| 170 // allocated arguments object. The optimized code would bypass it for | 170 // allocated arguments object. The optimized code would bypass it for |
| 171 // arguments accesses, which is unsound. Don't try OSR. | 171 // arguments accesses, which is unsound. Don't try OSR. |
| 172 if (shared->uses_arguments()) return; | 172 if (shared->uses_arguments()) return; |
| 173 | 173 |
| 174 // We are not prepared to do OSR for a function has catch clauses. |
| 175 // TODO(mmassi): Fix this. |
| 176 if (shared->dont_osr()) return; |
| 177 |
| 174 // We're using on-stack replacement: patch the unoptimized code so that | 178 // We're using on-stack replacement: patch the unoptimized code so that |
| 175 // any back edge in any unoptimized frame will trigger on-stack | 179 // any back edge in any unoptimized frame will trigger on-stack |
| 176 // replacement for that frame. | 180 // replacement for that frame. |
| 177 if (FLAG_trace_osr) { | 181 if (FLAG_trace_osr) { |
| 178 PrintF("[patching back edges in "); | 182 PrintF("[patching back edges in "); |
| 179 function->PrintName(); | 183 function->PrintName(); |
| 180 PrintF(" for on-stack replacement]\n"); | 184 PrintF(" for on-stack replacement]\n"); |
| 181 } | 185 } |
| 182 | 186 |
| 183 // Get the interrupt stub code object to match against. We aren't | 187 // Get the interrupt stub code object to match against. We aren't |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 437 |
| 434 | 438 |
| 435 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { | 439 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { |
| 436 for (int i = 0; i < kSamplerWindowSize; i++) { | 440 for (int i = 0; i < kSamplerWindowSize; i++) { |
| 437 visitor->VisitPointer(&sampler_window_[i]); | 441 visitor->VisitPointer(&sampler_window_[i]); |
| 438 } | 442 } |
| 439 } | 443 } |
| 440 | 444 |
| 441 | 445 |
| 442 } } // namespace v8::internal | 446 } } // namespace v8::internal |
| OLD | NEW |