5 #include "src/interpreter/bytecode-label.h" 7 #include "src/interpreter/bytecode-array-builder.h" 8 #include "src/objects-inl.h" 12 namespace interpreter {
14 BytecodeLabel* BytecodeLabels::New() {
16 labels_.emplace_back(BytecodeLabel());
17 return &labels_.back();
20 void BytecodeLabels::Bind(BytecodeArrayBuilder* builder) {
21 for (
auto& label : labels_) {
22 builder->Bind(&label);
26 void BytecodeLabels::BindToLabel(BytecodeArrayBuilder* builder,
27 const BytecodeLabel& target) {
28 for (
auto& label : labels_) {
29 builder->Bind(target, &label);