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

Side by Side Diff: src/compiler/jump-threading.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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 | « src/compiler/js-inlining.cc ('k') | src/compiler/linkage.h » ('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/jump-threading.h" 5 #include "src/compiler/jump-threading.h"
6 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 return state.forwarded; 135 return state.forwarded;
136 } 136 }
137 137
138 138
139 void JumpThreading::ApplyForwarding(ZoneVector<RpoNumber>& result, 139 void JumpThreading::ApplyForwarding(ZoneVector<RpoNumber>& result,
140 InstructionSequence* code) { 140 InstructionSequence* code) {
141 if (!FLAG_turbo_jt) return; 141 if (!FLAG_turbo_jt) return;
142 142
143 Zone local_zone(code->zone()->isolate()); 143 Zone local_zone;
144 ZoneVector<bool> skip(static_cast<int>(result.size()), false, &local_zone); 144 ZoneVector<bool> skip(static_cast<int>(result.size()), false, &local_zone);
145 145
146 // Skip empty blocks when the previous block doesn't fall through. 146 // Skip empty blocks when the previous block doesn't fall through.
147 bool prev_fallthru = true; 147 bool prev_fallthru = true;
148 for (auto const block : code->instruction_blocks()) { 148 for (auto const block : code->instruction_blocks()) {
149 int block_num = block->rpo_number().ToInt(); 149 int block_num = block->rpo_number().ToInt();
150 skip[block_num] = !prev_fallthru && result[block_num].ToInt() != block_num; 150 skip[block_num] = !prev_fallthru && result[block_num].ToInt() != block_num;
151 151
152 bool fallthru = true; 152 bool fallthru = true;
153 for (int i = block->code_start(); i < block->code_end(); ++i) { 153 for (int i = block->code_start(); i < block->code_end(); ++i) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (block->IsDeferred()) { 189 if (block->IsDeferred()) {
190 block->set_ao_number(RpoNumber::FromInt(ao)); 190 block->set_ao_number(RpoNumber::FromInt(ao));
191 if (!skip[block->rpo_number().ToInt()]) ao++; 191 if (!skip[block->rpo_number().ToInt()]) ao++;
192 } 192 }
193 } 193 }
194 } 194 }
195 195
196 } // namespace compiler 196 } // namespace compiler
197 } // namespace internal 197 } // namespace internal
198 } // namespace v8 198 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698