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

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

Issue 181283003: Symbols for type cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 years, 9 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/x64/lithium-codegen-x64.cc ('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 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 f->shared()->code()->type_feedback_info())->feedback_vector()); 2859 f->shared()->code()->type_feedback_info())->feedback_vector());
2860 2860
2861 CHECK_EQ(2, feedback_vector->length()); 2861 CHECK_EQ(2, feedback_vector->length());
2862 CHECK(feedback_vector->get(0)->IsJSFunction()); 2862 CHECK(feedback_vector->get(0)->IsJSFunction());
2863 CHECK(feedback_vector->get(1)->IsJSFunction()); 2863 CHECK(feedback_vector->get(1)->IsJSFunction());
2864 2864
2865 SimulateIncrementalMarking(); 2865 SimulateIncrementalMarking();
2866 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); 2866 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags);
2867 2867
2868 CHECK_EQ(2, feedback_vector->length()); 2868 CHECK_EQ(2, feedback_vector->length());
2869 CHECK(feedback_vector->get(0)->IsTheHole()); 2869 CHECK_EQ(feedback_vector->get(0),
2870 CHECK(feedback_vector->get(1)->IsTheHole()); 2870 *TypeFeedbackInfo::UninitializedSentinel(CcTest::i_isolate()));
2871 CHECK_EQ(feedback_vector->get(1),
2872 *TypeFeedbackInfo::UninitializedSentinel(CcTest::i_isolate()));
2871 } 2873 }
2872 2874
2873 2875
2874 static Code* FindFirstIC(Code* code, Code::Kind kind) { 2876 static Code* FindFirstIC(Code* code, Code::Kind kind) {
2875 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | 2877 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |
2876 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | 2878 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) |
2877 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID); 2879 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID);
2878 for (RelocIterator it(code, mask); !it.done(); it.next()) { 2880 for (RelocIterator it(code, mask); !it.done(); it.next()) {
2879 RelocInfo* info = it.rinfo(); 2881 RelocInfo* info = it.rinfo();
2880 Code* target = Code::GetCodeFromTargetAddress(info->target_address()); 2882 Code* target = Code::GetCodeFromTargetAddress(info->target_address());
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3681 code = scope.CloseAndEscape(Handle<Code>(bar->code())); 3683 code = scope.CloseAndEscape(Handle<Code>(bar->code()));
3682 } 3684 }
3683 3685
3684 // Now make sure that a gc should get rid of the function 3686 // Now make sure that a gc should get rid of the function
3685 for (int i = 0; i < 4; i++) { 3687 for (int i = 0; i < 4; i++) {
3686 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); 3688 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
3687 } 3689 }
3688 3690
3689 ASSERT(code->marked_for_deoptimization()); 3691 ASSERT(code->marked_for_deoptimization());
3690 } 3692 }
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698