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

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

Issue 1607433005: [interpreter] Implement exception handler table building. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added moar tests. Created 4 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/interpreter/control-flow-builders.h ('k') | src/interpreter/handler-table-builder.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 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
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
OLDNEW
« no previous file with comments | « src/interpreter/control-flow-builders.h ('k') | src/interpreter/handler-table-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698