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 8340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8351 } | 8351 } |
8352 } | 8352 } |
8353 | 8353 |
8354 // Revert to the original stack checks in the original unoptimized code. | 8354 // Revert to the original stack checks in the original unoptimized code. |
8355 if (FLAG_trace_osr) { | 8355 if (FLAG_trace_osr) { |
8356 PrintF("[restoring original stack checks in "); | 8356 PrintF("[restoring original stack checks in "); |
8357 function->PrintName(); | 8357 function->PrintName(); |
8358 PrintF("]\n"); | 8358 PrintF("]\n"); |
8359 } | 8359 } |
8360 Handle<Code> check_code; | 8360 Handle<Code> check_code; |
8361 #if defined(V8_TARGET_ARCH_IA32) || \ | |
8362 defined(V8_TARGET_ARCH_ARM) || \ | |
8363 defined(V8_TARGET_ARCH_MIPS) | |
8364 if (FLAG_count_based_interrupts) { | 8361 if (FLAG_count_based_interrupts) { |
8365 InterruptStub interrupt_stub; | 8362 InterruptStub interrupt_stub; |
8366 check_code = interrupt_stub.GetCode(); | 8363 check_code = interrupt_stub.GetCode(); |
8367 } else // NOLINT | 8364 } else // NOLINT |
8368 #endif | |
8369 { // NOLINT | 8365 { // NOLINT |
8370 StackCheckStub check_stub; | 8366 StackCheckStub check_stub; |
8371 check_code = check_stub.GetCode(); | 8367 check_code = check_stub.GetCode(); |
8372 } | 8368 } |
8373 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement(); | 8369 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement(); |
8374 Deoptimizer::RevertStackCheckCode(*unoptimized, | 8370 Deoptimizer::RevertStackCheckCode(*unoptimized, |
8375 *check_code, | 8371 *check_code, |
8376 *replacement_code); | 8372 *replacement_code); |
8377 | 8373 |
8378 // Allow OSR only at nesting level zero again. | 8374 // Allow OSR only at nesting level zero again. |
(...skipping 4968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13347 // Handle last resort GC and make sure to allow future allocations | 13343 // Handle last resort GC and make sure to allow future allocations |
13348 // to grow the heap without causing GCs (if possible). | 13344 // to grow the heap without causing GCs (if possible). |
13349 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13345 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13350 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13346 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13351 "Runtime::PerformGC"); | 13347 "Runtime::PerformGC"); |
13352 } | 13348 } |
13353 } | 13349 } |
13354 | 13350 |
13355 | 13351 |
13356 } } // namespace v8::internal | 13352 } } // namespace v8::internal |
OLD | NEW |