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

Side by Side Diff: test/cctest/compiler/test-jump-threading.cc

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 8 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
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | test/cctest/compiler/test-linkage.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction.h" 5 #include "src/compiler/instruction.h"
6 #include "src/compiler/instruction-codes.h" 6 #include "src/compiler/instruction-codes.h"
7 #include "src/compiler/jump-threading.h" 7 #include "src/compiler/jump-threading.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void AddGapMove(int index, const InstructionOperand& from, 99 void AddGapMove(int index, const InstructionOperand& from,
100 const InstructionOperand& to) { 100 const InstructionOperand& to) {
101 sequence_.InstructionAt(index) 101 sequence_.InstructionAt(index)
102 ->GetOrCreateParallelMove(Instruction::START, main_zone()) 102 ->GetOrCreateParallelMove(Instruction::START, main_zone())
103 ->AddMove(from, to); 103 ->AddMove(from, to);
104 } 104 }
105 }; 105 };
106 106
107 107
108 void VerifyForwarding(TestCode& code, int count, int* expected) { 108 void VerifyForwarding(TestCode& code, int count, int* expected) {
109 Zone local_zone; 109 base::AccountingAllocator allocator;
110 Zone local_zone(&allocator);
110 ZoneVector<RpoNumber> result(&local_zone); 111 ZoneVector<RpoNumber> result(&local_zone);
111 JumpThreading::ComputeForwarding(&local_zone, result, &code.sequence_, true); 112 JumpThreading::ComputeForwarding(&local_zone, result, &code.sequence_, true);
112 113
113 CHECK(count == static_cast<int>(result.size())); 114 CHECK(count == static_cast<int>(result.size()));
114 for (int i = 0; i < count; i++) { 115 for (int i = 0; i < count; i++) {
115 CHECK(expected[i] == result[i].ToInt()); 116 CHECK(expected[i] == result[i].ToInt());
116 } 117 }
117 } 118 }
118 119
119 120
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 for (int k = 4; k < 5; k++) assembly[k]--; 760 for (int k = 4; k < 5; k++) assembly[k]--;
760 } 761 }
761 CheckAssemblyOrder(code, 5, assembly); 762 CheckAssemblyOrder(code, 5, assembly);
762 } 763 }
763 } 764 }
764 } 765 }
765 766
766 } // namespace compiler 767 } // namespace compiler
767 } // namespace internal 768 } // namespace internal
768 } // namespace v8 769 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | test/cctest/compiler/test-linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698