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

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

Issue 77963002: Re-enable EnsureAllocationSiteDependentCodesProcessed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « test/cctest/cctest.status ('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 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after
3563 3563
3564 3564
3565 TEST(EnsureAllocationSiteDependentCodesProcessed) { 3565 TEST(EnsureAllocationSiteDependentCodesProcessed) {
3566 if (i::FLAG_always_opt || !i::FLAG_crankshaft) return; 3566 if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
3567 i::FLAG_allow_natives_syntax = true; 3567 i::FLAG_allow_natives_syntax = true;
3568 CcTest::InitializeVM(); 3568 CcTest::InitializeVM();
3569 Isolate* isolate = CcTest::i_isolate(); 3569 Isolate* isolate = CcTest::i_isolate();
3570 v8::internal::Heap* heap = CcTest::heap(); 3570 v8::internal::Heap* heap = CcTest::heap();
3571 GlobalHandles* global_handles = isolate->global_handles(); 3571 GlobalHandles* global_handles = isolate->global_handles();
3572 3572
3573 if (!isolate->use_crankshaft()) return;
3574
3573 // The allocation site at the head of the list is ours. 3575 // The allocation site at the head of the list is ours.
3574 Handle<AllocationSite> site; 3576 Handle<AllocationSite> site;
3575 { 3577 {
3576 LocalContext context; 3578 LocalContext context;
3577 v8::HandleScope scope(context->GetIsolate()); 3579 v8::HandleScope scope(context->GetIsolate());
3578 3580
3579 int count = AllocationSitesCount(heap); 3581 int count = AllocationSitesCount(heap);
3580 CompileRun("var bar = function() { return (new Array()); };" 3582 CompileRun("var bar = function() { return (new Array()); };"
3581 "var a = bar();" 3583 "var a = bar();"
3582 "bar();" 3584 "bar();"
(...skipping 25 matching lines...) Expand all
3608 for (int i = 0; i < 4; i++) { 3610 for (int i = 0; i < 4; i++) {
3609 heap->CollectAllGarbage(false); 3611 heap->CollectAllGarbage(false);
3610 } 3612 }
3611 3613
3612 // The site still exists because of our global handle, but the code is no 3614 // The site still exists because of our global handle, but the code is no
3613 // longer referred to by dependent_code(). 3615 // longer referred to by dependent_code().
3614 DependentCode::GroupStartIndexes starts(site->dependent_code()); 3616 DependentCode::GroupStartIndexes starts(site->dependent_code());
3615 int index = starts.at(DependentCode::kAllocationSiteTransitionChangedGroup); 3617 int index = starts.at(DependentCode::kAllocationSiteTransitionChangedGroup);
3616 CHECK(!(site->dependent_code()->is_code_at(index))); 3618 CHECK(!(site->dependent_code()->is_code_at(index)));
3617 } 3619 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698