| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 | 2 |
| 3 #include <stdlib.h> | 3 #include <stdlib.h> |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "compilation-cache.h" | 7 #include "compilation-cache.h" |
| 8 #include "execution.h" | 8 #include "execution.h" |
| 9 #include "factory.h" | 9 #include "factory.h" |
| 10 #include "macro-assembler.h" | 10 #include "macro-assembler.h" |
| (...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 SimulateIncrementalMarking(); | 2623 SimulateIncrementalMarking(); |
| 2624 HEAP->CollectAllGarbage(Heap::kNoGCFlags); | 2624 HEAP->CollectAllGarbage(Heap::kNoGCFlags); |
| 2625 | 2625 |
| 2626 // Make a new closure that will get code installed from the code map. | 2626 // Make a new closure that will get code installed from the code map. |
| 2627 // Unoptimized code is missing and the deoptimizer will go ballistic. | 2627 // Unoptimized code is missing and the deoptimizer will go ballistic. |
| 2628 CompileRun("var g = mkClosure(); g('bozo');"); | 2628 CompileRun("var g = mkClosure(); g('bozo');"); |
| 2629 } | 2629 } |
| 2630 | 2630 |
| 2631 | 2631 |
| 2632 TEST(Regress169209) { | 2632 TEST(Regress169209) { |
| 2633 i::FLAG_stress_compaction = false; |
| 2633 i::FLAG_allow_natives_syntax = true; | 2634 i::FLAG_allow_natives_syntax = true; |
| 2634 i::FLAG_flush_code_incrementally = true; | 2635 i::FLAG_flush_code_incrementally = true; |
| 2635 InitializeVM(); | 2636 InitializeVM(); |
| 2636 v8::HandleScope scope; | 2637 v8::HandleScope scope; |
| 2637 | 2638 |
| 2638 // Perform one initial GC to enable code flushing. | 2639 // Perform one initial GC to enable code flushing. |
| 2639 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); | 2640 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
| 2640 | 2641 |
| 2641 // Prepare a shared function info eligible for code flushing for which | 2642 // Prepare a shared function info eligible for code flushing for which |
| 2642 // the unoptimized code will be replaced during optimization. | 2643 // the unoptimized code will be replaced during optimization. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2829 // Now optimize the function so that it is taken off the candidate list. | 2830 // Now optimize the function so that it is taken off the candidate list. |
| 2830 { | 2831 { |
| 2831 HandleScope inner_scope; | 2832 HandleScope inner_scope; |
| 2832 CompileRun("%OptimizeFunctionOnNextCall(f); f(3);"); | 2833 CompileRun("%OptimizeFunctionOnNextCall(f); f(3);"); |
| 2833 } | 2834 } |
| 2834 | 2835 |
| 2835 // This cycle will bust the heap and subsequent cycles will go ballistic. | 2836 // This cycle will bust the heap and subsequent cycles will go ballistic. |
| 2836 HEAP->CollectAllGarbage(Heap::kNoGCFlags); | 2837 HEAP->CollectAllGarbage(Heap::kNoGCFlags); |
| 2837 HEAP->CollectAllGarbage(Heap::kNoGCFlags); | 2838 HEAP->CollectAllGarbage(Heap::kNoGCFlags); |
| 2838 } | 2839 } |
| OLD | NEW |