OLD | NEW |
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 #include "src/interpreter/control-flow-builders.h" | 5 #include "src/interpreter/control-flow-builders.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace interpreter { | 9 namespace interpreter { |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 #endif | 131 #endif |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 void SwitchBuilder::SetCaseTarget(int index) { | 135 void SwitchBuilder::SetCaseTarget(int index) { |
136 BytecodeLabel& site = case_sites_.at(index); | 136 BytecodeLabel& site = case_sites_.at(index); |
137 builder()->Bind(&site); | 137 builder()->Bind(&site); |
138 } | 138 } |
139 | 139 |
| 140 |
| 141 void TryCatchBuilder::BeginTry(Register context) { |
| 142 builder()->MarkTryBegin(handler_id_, context); |
| 143 } |
| 144 |
| 145 |
| 146 void TryCatchBuilder::EndTry() { |
| 147 builder()->MarkTryEnd(handler_id_); |
| 148 builder()->Jump(&exit_); |
| 149 builder()->Bind(&handler_); |
| 150 builder()->MarkHandler(handler_id_, true); |
| 151 } |
| 152 |
| 153 |
| 154 void TryCatchBuilder::EndCatch() { builder()->Bind(&exit_); } |
| 155 |
| 156 |
| 157 void TryFinallyBuilder::BeginTry(Register context) { |
| 158 builder()->MarkTryBegin(handler_id_, context); |
| 159 } |
| 160 |
| 161 |
| 162 void TryFinallyBuilder::EndTry() { |
| 163 builder()->MarkTryEnd(handler_id_); |
| 164 builder()->Bind(&handler_); |
| 165 builder()->MarkHandler(handler_id_, false); |
| 166 } |
| 167 |
| 168 |
| 169 void TryFinallyBuilder::EndFinally() { |
| 170 // Nothing to be done here. |
| 171 } |
| 172 |
140 } // namespace interpreter | 173 } // namespace interpreter |
141 } // namespace internal | 174 } // namespace internal |
142 } // namespace v8 | 175 } // namespace v8 |
OLD | NEW |