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 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2208 } | 2208 } |
2209 | 2209 |
2210 static int CountMapTransitions(Map* map) { | 2210 static int CountMapTransitions(Map* map) { |
2211 return map->transitions()->number_of_transitions(); | 2211 return map->transitions()->number_of_transitions(); |
2212 } | 2212 } |
2213 | 2213 |
2214 | 2214 |
2215 // Test that map transitions are cleared and maps are collected with | 2215 // Test that map transitions are cleared and maps are collected with |
2216 // incremental marking as well. | 2216 // incremental marking as well. |
2217 TEST(Regress1465) { | 2217 TEST(Regress1465) { |
| 2218 i::FLAG_stress_compaction = false; |
2218 i::FLAG_allow_natives_syntax = true; | 2219 i::FLAG_allow_natives_syntax = true; |
2219 i::FLAG_trace_incremental_marking = true; | 2220 i::FLAG_trace_incremental_marking = true; |
2220 CcTest::InitializeVM(); | 2221 CcTest::InitializeVM(); |
2221 v8::HandleScope scope(CcTest::isolate()); | 2222 v8::HandleScope scope(CcTest::isolate()); |
2222 static const int transitions_count = 256; | 2223 static const int transitions_count = 256; |
2223 | 2224 |
2224 { | 2225 { |
2225 AlwaysAllocateScope always_allocate; | 2226 AlwaysAllocateScope always_allocate; |
2226 for (int i = 0; i < transitions_count; i++) { | 2227 for (int i = 0; i < transitions_count; i++) { |
2227 EmbeddedVector<char, 64> buffer; | 2228 EmbeddedVector<char, 64> buffer; |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3172 " var a = new Array(n);" | 3173 " var a = new Array(n);" |
3173 " for (var i = 0; i < n; i += 100) a[i] = i;" | 3174 " for (var i = 0; i < n; i += 100) a[i] = i;" |
3174 "};" | 3175 "};" |
3175 "f(10 * 1024 * 1024);"); | 3176 "f(10 * 1024 * 1024);"); |
3176 IncrementalMarking* marking = HEAP->incremental_marking(); | 3177 IncrementalMarking* marking = HEAP->incremental_marking(); |
3177 if (marking->IsStopped()) marking->Start(); | 3178 if (marking->IsStopped()) marking->Start(); |
3178 // This big step should be sufficient to mark the whole array. | 3179 // This big step should be sufficient to mark the whole array. |
3179 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 3180 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
3180 ASSERT(marking->IsComplete()); | 3181 ASSERT(marking->IsComplete()); |
3181 } | 3182 } |
OLD | NEW |