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

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

Issue 172203002: When clearing filled call target caches we should go back to the Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 years, 10 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/objects-inl.h ('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 2849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 Handle<FixedArray> feedback_vector(TypeFeedbackInfo::cast( 2860 Handle<FixedArray> feedback_vector(TypeFeedbackInfo::cast(
2861 f->shared()->code()->type_feedback_info())->feedback_vector()); 2861 f->shared()->code()->type_feedback_info())->feedback_vector());
2862 2862
2863 CHECK_EQ(2, feedback_vector->length()); 2863 CHECK_EQ(2, feedback_vector->length());
2864 CHECK(feedback_vector->get(0)->IsJSFunction()); 2864 CHECK(feedback_vector->get(0)->IsJSFunction());
2865 CHECK(feedback_vector->get(1)->IsJSFunction()); 2865 CHECK(feedback_vector->get(1)->IsJSFunction());
2866 2866
2867 SimulateIncrementalMarking(); 2867 SimulateIncrementalMarking();
2868 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); 2868 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
2869 2869
2870 // Make sure we go back to the premonomorphic cache state.
2870 CHECK_EQ(2, feedback_vector->length()); 2871 CHECK_EQ(2, feedback_vector->length());
2871 CHECK(feedback_vector->get(0)->IsTheHole()); 2872 CHECK(feedback_vector->get(0)->IsNull());
2872 CHECK(feedback_vector->get(1)->IsTheHole()); 2873 CHECK(feedback_vector->get(1)->IsNull());
2873 } 2874 }
2874 2875
2875 2876
2876 static Code* FindFirstIC(Code* code, Code::Kind kind) { 2877 static Code* FindFirstIC(Code* code, Code::Kind kind) {
2877 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | 2878 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |
2878 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | 2879 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) |
2879 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID); 2880 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID);
2880 for (RelocIterator it(code, mask); !it.done(); it.next()) { 2881 for (RelocIterator it(code, mask); !it.done(); it.next()) {
2881 RelocInfo* info = it.rinfo(); 2882 RelocInfo* info = it.rinfo();
2882 Code* target = Code::GetCodeFromTargetAddress(info->target_address()); 2883 Code* target = Code::GetCodeFromTargetAddress(info->target_address());
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 code = scope.CloseAndEscape(Handle<Code>(bar->code())); 3684 code = scope.CloseAndEscape(Handle<Code>(bar->code()));
3684 } 3685 }
3685 3686
3686 // Now make sure that a gc should get rid of the function 3687 // Now make sure that a gc should get rid of the function
3687 for (int i = 0; i < 4; i++) { 3688 for (int i = 0; i < 4; i++) {
3688 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); 3689 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
3689 } 3690 }
3690 3691
3691 ASSERT(code->marked_for_deoptimization()); 3692 ASSERT(code->marked_for_deoptimization());
3692 } 3693 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698