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

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

Issue 23530045: Remove HandleScope default ctor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/api.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | 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 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after
3415 class DummyVisitor : public ObjectVisitor { 3415 class DummyVisitor : public ObjectVisitor {
3416 public: 3416 public:
3417 void VisitPointers(Object** start, Object** end) { } 3417 void VisitPointers(Object** start, Object** end) { }
3418 }; 3418 };
3419 3419
3420 3420
3421 TEST(DeferredHandles) { 3421 TEST(DeferredHandles) {
3422 CcTest::InitializeVM(); 3422 CcTest::InitializeVM();
3423 Isolate* isolate = Isolate::Current(); 3423 Isolate* isolate = Isolate::Current();
3424 Heap* heap = isolate->heap(); 3424 Heap* heap = isolate->heap();
3425 v8::HandleScope scope; 3425 v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate));
3426 v8::ImplementationUtilities::HandleScopeData* data = 3426 v8::ImplementationUtilities::HandleScopeData* data =
3427 isolate->handle_scope_data(); 3427 isolate->handle_scope_data();
3428 Handle<Object> init(heap->empty_string(), isolate); 3428 Handle<Object> init(heap->empty_string(), isolate);
3429 while (data->next < data->limit) { 3429 while (data->next < data->limit) {
3430 Handle<Object> obj(heap->empty_string(), isolate); 3430 Handle<Object> obj(heap->empty_string(), isolate);
3431 } 3431 }
3432 // An entire block of handles has been filled. 3432 // An entire block of handles has been filled.
3433 // Next handle would require a new block. 3433 // Next handle would require a new block.
3434 ASSERT(data->next == data->limit); 3434 ASSERT(data->next == data->limit);
3435 3435
(...skipping 11 matching lines...) Expand all
3447 " var a = new Array(n);" 3447 " var a = new Array(n);"
3448 " for (var i = 0; i < n; i += 100) a[i] = i;" 3448 " for (var i = 0; i < n; i += 100) a[i] = i;"
3449 "};" 3449 "};"
3450 "f(10 * 1024 * 1024);"); 3450 "f(10 * 1024 * 1024);");
3451 IncrementalMarking* marking = HEAP->incremental_marking(); 3451 IncrementalMarking* marking = HEAP->incremental_marking();
3452 if (marking->IsStopped()) marking->Start(); 3452 if (marking->IsStopped()) marking->Start();
3453 // This big step should be sufficient to mark the whole array. 3453 // This big step should be sufficient to mark the whole array.
3454 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3454 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3455 ASSERT(marking->IsComplete()); 3455 ASSERT(marking->IsComplete());
3456 } 3456 }
OLDNEW
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698