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 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 } | 3096 } |
3097 // An entire block of handles has been filled. | 3097 // An entire block of handles has been filled. |
3098 // Next handle would require a new block. | 3098 // Next handle would require a new block. |
3099 ASSERT(data->next == data->limit); | 3099 ASSERT(data->next == data->limit); |
3100 | 3100 |
3101 DeferredHandleScope deferred(isolate); | 3101 DeferredHandleScope deferred(isolate); |
3102 DummyVisitor visitor; | 3102 DummyVisitor visitor; |
3103 isolate->handle_scope_implementer()->Iterate(&visitor); | 3103 isolate->handle_scope_implementer()->Iterate(&visitor); |
3104 deferred.Detach(); | 3104 deferred.Detach(); |
3105 } | 3105 } |
| 3106 |
| 3107 |
| 3108 TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) { |
| 3109 CcTest::InitializeVM(); |
| 3110 v8::HandleScope scope(CcTest::isolate()); |
| 3111 CompileRun("function f(n) {" |
| 3112 " var a = new Array(n);" |
| 3113 " for (var i = 0; i < n; i += 100) a[i] = i;" |
| 3114 "};" |
| 3115 "f(10 * 1024 * 1024);"); |
| 3116 IncrementalMarking* marking = HEAP->incremental_marking(); |
| 3117 if (marking->IsStopped()) marking->Start(); |
| 3118 // This big step should be sufficient to mark the whole array. |
| 3119 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| 3120 ASSERT(marking->IsComplete()); |
| 3121 } |
OLD | NEW |