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 2796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 i::FLAG_flush_code_incrementally = true; | 2807 i::FLAG_flush_code_incrementally = true; |
2808 | 2808 |
2809 // Experimental natives are compiled during snapshot deserialization. | 2809 // Experimental natives are compiled during snapshot deserialization. |
2810 // This test breaks because heap layout changes in a way that closure | 2810 // This test breaks because heap layout changes in a way that closure |
2811 // is visited before shared function info. | 2811 // is visited before shared function info. |
2812 i::FLAG_harmony_typed_arrays = false; | 2812 i::FLAG_harmony_typed_arrays = false; |
2813 i::FLAG_harmony_array_buffer = false; | 2813 i::FLAG_harmony_array_buffer = false; |
2814 | 2814 |
2815 CcTest::InitializeVM(); | 2815 CcTest::InitializeVM(); |
2816 Isolate* isolate = Isolate::Current(); | 2816 Isolate* isolate = Isolate::Current(); |
2817 // Force experimental natives to compile to normalize heap layout. | |
2818 Heap* heap = isolate->heap(); | 2817 Heap* heap = isolate->heap(); |
2819 HandleScope scope(isolate); | 2818 HandleScope scope(isolate); |
2820 | 2819 |
2821 // Perform one initial GC to enable code flushing. | 2820 // Perform one initial GC to enable code flushing. |
2822 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); | 2821 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
2823 | 2822 |
2824 // Prepare a shared function info eligible for code flushing for which | 2823 // Prepare a shared function info eligible for code flushing for which |
2825 // the unoptimized code will be replaced during optimization. | 2824 // the unoptimized code will be replaced during optimization. |
2826 Handle<SharedFunctionInfo> shared1; | 2825 Handle<SharedFunctionInfo> shared1; |
2827 { | 2826 { |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3097 } | 3096 } |
3098 // An entire block of handles has been filled. | 3097 // An entire block of handles has been filled. |
3099 // Next handle would require a new block. | 3098 // Next handle would require a new block. |
3100 ASSERT(data->next == data->limit); | 3099 ASSERT(data->next == data->limit); |
3101 | 3100 |
3102 DeferredHandleScope deferred(isolate); | 3101 DeferredHandleScope deferred(isolate); |
3103 DummyVisitor visitor; | 3102 DummyVisitor visitor; |
3104 isolate->handle_scope_implementer()->Iterate(&visitor); | 3103 isolate->handle_scope_implementer()->Iterate(&visitor); |
3105 deferred.Detach(); | 3104 deferred.Detach(); |
3106 } | 3105 } |
OLD | NEW |