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

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

Issue 8060053: Enable code flushing for full (non-incremental) collections. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: update test and remove FLAG_flush_code = false Created 9 years, 2 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/mark-compact.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 "execution.h" 7 #include "execution.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 #include "global-handles.h" 10 #include "global-handles.h"
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 CompileRun(source); 954 CompileRun(source);
955 } 955 }
956 956
957 // Check function is compiled. 957 // Check function is compiled.
958 Object* func_value = Isolate::Current()->context()->global()-> 958 Object* func_value = Isolate::Current()->context()->global()->
959 GetProperty(*foo_name)->ToObjectChecked(); 959 GetProperty(*foo_name)->ToObjectChecked();
960 CHECK(func_value->IsJSFunction()); 960 CHECK(func_value->IsJSFunction());
961 Handle<JSFunction> function(JSFunction::cast(func_value)); 961 Handle<JSFunction> function(JSFunction::cast(func_value));
962 CHECK(function->shared()->is_compiled()); 962 CHECK(function->shared()->is_compiled());
963 963
964 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 964 // TODO(1609) Currently incremental marker does not support code flushing.
965 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 965 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
966 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
966 967
967 CHECK(function->shared()->is_compiled()); 968 CHECK(function->shared()->is_compiled());
968 969
969 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 970 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
970 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 971 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
971 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 972 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
972 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 973 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
973 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 974 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
974 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 975 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask);
975 976
976 // foo should no longer be in the compilation cache 977 // foo should no longer be in the compilation cache
977 CHECK(!function->shared()->is_compiled() || function->IsOptimized()); 978 CHECK(!function->shared()->is_compiled() || function->IsOptimized());
978 CHECK(!function->is_compiled() || function->IsOptimized()); 979 CHECK(!function->is_compiled() || function->IsOptimized());
979 // Call foo to get it recompiled. 980 // Call foo to get it recompiled.
980 CompileRun("foo()"); 981 CompileRun("foo()");
981 CHECK(function->shared()->is_compiled()); 982 CHECK(function->shared()->is_compiled());
982 CHECK(function->is_compiled()); 983 CHECK(function->is_compiled());
983 } 984 }
984 985
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 CHECK(old_capacity == 2 * new_capacity); 1266 CHECK(old_capacity == 2 * new_capacity);
1266 1267
1267 // Consecutive shrinking should not affect space capacity. 1268 // Consecutive shrinking should not affect space capacity.
1268 old_capacity = new_space->Capacity(); 1269 old_capacity = new_space->Capacity();
1269 new_space->Shrink(); 1270 new_space->Shrink();
1270 new_space->Shrink(); 1271 new_space->Shrink();
1271 new_space->Shrink(); 1272 new_space->Shrink();
1272 new_capacity = new_space->Capacity(); 1273 new_capacity = new_space->Capacity();
1273 CHECK(old_capacity == new_capacity); 1274 CHECK(old_capacity == new_capacity);
1274 } 1275 }
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698