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

Side by Side Diff: src/interpreter/control-flow-builders.h

Issue 2523893003: Reland of [ignition/turbo] Perform liveness analysis on the bytecodes (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_INTERPRETER_CONTROL_FLOW_BUILDERS_H_ 5 #ifndef V8_INTERPRETER_CONTROL_FLOW_BUILDERS_H_
6 #define V8_INTERPRETER_CONTROL_FLOW_BUILDERS_H_ 6 #define V8_INTERPRETER_CONTROL_FLOW_BUILDERS_H_
7 7
8 #include "src/interpreter/bytecode-array-builder.h" 8 #include "src/interpreter/bytecode-array-builder.h"
9 9
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // A class to help with co-ordinating break and continue statements with 78 // A class to help with co-ordinating break and continue statements with
79 // their loop. 79 // their loop.
80 class LoopBuilder final : public BreakableControlFlowBuilder { 80 class LoopBuilder final : public BreakableControlFlowBuilder {
81 public: 81 public:
82 explicit LoopBuilder(BytecodeArrayBuilder* builder) 82 explicit LoopBuilder(BytecodeArrayBuilder* builder)
83 : BreakableControlFlowBuilder(builder), 83 : BreakableControlFlowBuilder(builder),
84 continue_labels_(builder->zone()), 84 continue_labels_(builder->zone()),
85 header_labels_(builder->zone()) {} 85 header_labels_(builder->zone()) {}
86 ~LoopBuilder(); 86 ~LoopBuilder();
87 87
88 void LoopHeader(ZoneVector<BytecodeLabel>* additional_labels); 88 void LoopHeader(ZoneVector<BytecodeLabel>* additional_labels = nullptr);
89 void JumpToHeader(int loop_depth); 89 void JumpToHeader(int loop_depth);
90 void BindContinueTarget(); 90 void BindContinueTarget();
91 void EndLoop(); 91 void EndLoop();
92 92
93 // This method is called when visiting continue statements in the AST. 93 // This method is called when visiting continue statements in the AST.
94 // Inserts a jump to an unbound label that is patched when BindContinueTarget 94 // Inserts a jump to an unbound label that is patched when BindContinueTarget
95 // is called. 95 // is called.
96 void Continue() { EmitJump(&continue_labels_); } 96 void Continue() { EmitJump(&continue_labels_); }
97 void ContinueIfTrue() { EmitJumpIfTrue(&continue_labels_); } 97 void ContinueIfTrue() { EmitJumpIfTrue(&continue_labels_); }
98 void ContinueIfUndefined() { EmitJumpIfUndefined(&continue_labels_); } 98 void ContinueIfUndefined() { EmitJumpIfUndefined(&continue_labels_); }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // Unbound labels that identify jumps to the finally block in the code. 184 // Unbound labels that identify jumps to the finally block in the code.
185 BytecodeLabels finalization_sites_; 185 BytecodeLabels finalization_sites_;
186 }; 186 };
187 187
188 } // namespace interpreter 188 } // namespace interpreter
189 } // namespace internal 189 } // namespace internal
190 } // namespace v8 190 } // namespace v8
191 191
192 #endif // V8_INTERPRETER_CONTROL_FLOW_BUILDERS_H_ 192 #endif // V8_INTERPRETER_CONTROL_FLOW_BUILDERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698