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 3681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3692 | 3692 |
3693 // Now make sure that a gc should get rid of the function | 3693 // Now make sure that a gc should get rid of the function |
3694 for (int i = 0; i < 4; i++) { | 3694 for (int i = 0; i < 4; i++) { |
3695 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); | 3695 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
3696 } | 3696 } |
3697 | 3697 |
3698 ASSERT(code->marked_for_deoptimization()); | 3698 ASSERT(code->marked_for_deoptimization()); |
3699 } | 3699 } |
3700 | 3700 |
3701 | 3701 |
| 3702 #ifdef DEBUG |
3702 TEST(AddInstructionChangesNewSpacePromotion) { | 3703 TEST(AddInstructionChangesNewSpacePromotion) { |
3703 i::FLAG_allow_natives_syntax = true; | 3704 i::FLAG_allow_natives_syntax = true; |
3704 i::FLAG_expose_gc = true; | 3705 i::FLAG_expose_gc = true; |
3705 i::FLAG_stress_compaction = true; | 3706 i::FLAG_stress_compaction = true; |
3706 i::FLAG_gc_interval = 1000; | 3707 i::FLAG_gc_interval = 1000; |
3707 CcTest::InitializeVM(); | 3708 CcTest::InitializeVM(); |
3708 if (!i::FLAG_allocation_site_pretenuring) return; | 3709 if (!i::FLAG_allocation_site_pretenuring) return; |
3709 v8::HandleScope scope(CcTest::isolate()); | 3710 v8::HandleScope scope(CcTest::isolate()); |
3710 Isolate* isolate = CcTest::i_isolate(); | 3711 Isolate* isolate = CcTest::i_isolate(); |
3711 Heap* heap = isolate->heap(); | 3712 Heap* heap = isolate->heap(); |
(...skipping 20 matching lines...) Expand all Loading... |
3732 | 3733 |
3733 v8::Handle<v8::Object> global = CcTest::global(); | 3734 v8::Handle<v8::Object> global = CcTest::global(); |
3734 v8::Handle<v8::Function> g = | 3735 v8::Handle<v8::Function> g = |
3735 v8::Handle<v8::Function>::Cast(global->Get(v8_str("crash"))); | 3736 v8::Handle<v8::Function>::Cast(global->Get(v8_str("crash"))); |
3736 v8::Handle<v8::Value> args1[] = { v8_num(1) }; | 3737 v8::Handle<v8::Value> args1[] = { v8_num(1) }; |
3737 heap->DisableInlineAllocation(); | 3738 heap->DisableInlineAllocation(); |
3738 heap->set_allocation_timeout(1); | 3739 heap->set_allocation_timeout(1); |
3739 g->Call(global, 1, args1); | 3740 g->Call(global, 1, args1); |
3740 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); | 3741 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
3741 } | 3742 } |
| 3743 #endif |
OLD | NEW |