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

Side by Side Diff: src/interpreter/bytecode-label.cc

Issue 2254493002: [interpreter] Use VisitForTest for loop conditions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase(line) golden file Created 4 years, 4 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/interpreter/bytecode-label.h ('k') | src/interpreter/control-flow-builders.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/interpreter/bytecode-label.h" 5 #include "src/interpreter/bytecode-label.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace interpreter { 11 namespace interpreter {
12 12
13 BytecodeLabel* BytecodeLabels::New() { 13 BytecodeLabel* BytecodeLabels::New() {
14 DCHECK(!is_bound());
14 labels_.push_back(BytecodeLabel()); 15 labels_.push_back(BytecodeLabel());
15 return &labels_.back(); 16 return &labels_.back();
16 } 17 }
17 18
18 void BytecodeLabels::Bind(BytecodeArrayBuilder* builder) { 19 void BytecodeLabels::Bind(BytecodeArrayBuilder* builder) {
19 for (auto label : labels_) { 20 for (auto& label : labels_) {
20 builder->Bind(&label); 21 builder->Bind(&label);
21 } 22 }
22 } 23 }
23 24
25 void BytecodeLabels::BindToLabel(BytecodeArrayBuilder* builder,
26 const BytecodeLabel& target) {
27 for (auto& label : labels_) {
28 builder->Bind(target, &label);
29 }
30 }
31
24 } // namespace interpreter 32 } // namespace interpreter
25 } // namespace internal 33 } // namespace internal
26 } // namespace v8 34 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-label.h ('k') | src/interpreter/control-flow-builders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698