| 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 8523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8534 unoptimized->kind() == Code::FUNCTION) { | 8534 unoptimized->kind() == Code::FUNCTION) { |
| 8535 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); | 8535 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); |
| 8536 if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("osr"))) { | 8536 if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("osr"))) { |
| 8537 // Start patching from the currently patched loop nesting level. | 8537 // Start patching from the currently patched loop nesting level. |
| 8538 int current_level = unoptimized->allow_osr_at_loop_nesting_level(); | 8538 int current_level = unoptimized->allow_osr_at_loop_nesting_level(); |
| 8539 ASSERT(BackEdgeTable::Verify(isolate, unoptimized, current_level)); | 8539 ASSERT(BackEdgeTable::Verify(isolate, unoptimized, current_level)); |
| 8540 for (int i = current_level + 1; i <= Code::kMaxLoopNestingMarker; i++) { | 8540 for (int i = current_level + 1; i <= Code::kMaxLoopNestingMarker; i++) { |
| 8541 unoptimized->set_allow_osr_at_loop_nesting_level(i); | 8541 unoptimized->set_allow_osr_at_loop_nesting_level(i); |
| 8542 isolate->runtime_profiler()->AttemptOnStackReplacement(*function); | 8542 isolate->runtime_profiler()->AttemptOnStackReplacement(*function); |
| 8543 } | 8543 } |
| 8544 } else if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("concurrent"))) { | 8544 } else if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("concurrent")) && |
| 8545 isolate->concurrent_recompilation_enabled()) { |
| 8545 function->MarkForConcurrentRecompilation(); | 8546 function->MarkForConcurrentRecompilation(); |
| 8546 } | 8547 } |
| 8547 } | 8548 } |
| 8548 | 8549 |
| 8549 return isolate->heap()->undefined_value(); | 8550 return isolate->heap()->undefined_value(); |
| 8550 } | 8551 } |
| 8551 | 8552 |
| 8552 | 8553 |
| 8553 RUNTIME_FUNCTION(MaybeObject*, Runtime_NeverOptimizeFunction) { | 8554 RUNTIME_FUNCTION(MaybeObject*, Runtime_NeverOptimizeFunction) { |
| 8554 HandleScope scope(isolate); | 8555 HandleScope scope(isolate); |
| (...skipping 6348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14903 // Handle last resort GC and make sure to allow future allocations | 14904 // Handle last resort GC and make sure to allow future allocations |
| 14904 // to grow the heap without causing GCs (if possible). | 14905 // to grow the heap without causing GCs (if possible). |
| 14905 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14906 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14906 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14907 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14907 "Runtime::PerformGC"); | 14908 "Runtime::PerformGC"); |
| 14908 } | 14909 } |
| 14909 } | 14910 } |
| 14910 | 14911 |
| 14911 | 14912 |
| 14912 } } // namespace v8::internal | 14913 } } // namespace v8::internal |
| OLD | NEW |