Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: test/cctest/test-heap.cc

Issue 14794007: Preserve optimized code map during GCs weakly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Hannes Payer. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698