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

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

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 void TryCatchBuilder::BeginTry(Register context) { 136 void TryCatchBuilder::BeginTry(Register context) {
137 builder()->MarkTryBegin(handler_id_, context); 137 builder()->MarkTryBegin(handler_id_, context);
138 } 138 }
139 139
140 140
141 void TryCatchBuilder::EndTry() { 141 void TryCatchBuilder::EndTry() {
142 builder()->MarkTryEnd(handler_id_); 142 builder()->MarkTryEnd(handler_id_);
143 builder()->Jump(&exit_); 143 builder()->Jump(&exit_);
144 builder()->Bind(&handler_); 144 builder()->Bind(&handler_);
145 builder()->MarkHandler(handler_id_, catch_predicted_); 145 builder()->MarkHandler(handler_id_, catch_prediction_);
146 } 146 }
147 147
148 148
149 void TryCatchBuilder::EndCatch() { builder()->Bind(&exit_); } 149 void TryCatchBuilder::EndCatch() { builder()->Bind(&exit_); }
150 150
151 151
152 void TryFinallyBuilder::BeginTry(Register context) { 152 void TryFinallyBuilder::BeginTry(Register context) {
153 builder()->MarkTryBegin(handler_id_, context); 153 builder()->MarkTryBegin(handler_id_, context);
154 } 154 }
155 155
156 156
157 void TryFinallyBuilder::LeaveTry() { 157 void TryFinallyBuilder::LeaveTry() {
158 finalization_sites_.push_back(BytecodeLabel()); 158 finalization_sites_.push_back(BytecodeLabel());
159 builder()->Jump(&finalization_sites_.back()); 159 builder()->Jump(&finalization_sites_.back());
160 } 160 }
161 161
162 162
163 void TryFinallyBuilder::EndTry() { 163 void TryFinallyBuilder::EndTry() {
164 builder()->MarkTryEnd(handler_id_); 164 builder()->MarkTryEnd(handler_id_);
165 } 165 }
166 166
167 167
168 void TryFinallyBuilder::BeginHandler() { 168 void TryFinallyBuilder::BeginHandler() {
169 builder()->Bind(&handler_); 169 builder()->Bind(&handler_);
170 builder()->MarkHandler(handler_id_, catch_predicted_); 170 builder()->MarkHandler(handler_id_, catch_prediction_);
171 } 171 }
172 172
173 173
174 void TryFinallyBuilder::BeginFinally() { 174 void TryFinallyBuilder::BeginFinally() {
175 for (size_t i = 0; i < finalization_sites_.size(); i++) { 175 for (size_t i = 0; i < finalization_sites_.size(); i++) {
176 BytecodeLabel& site = finalization_sites_.at(i); 176 BytecodeLabel& site = finalization_sites_.at(i);
177 builder()->Bind(&site); 177 builder()->Bind(&site);
178 } 178 }
179 } 179 }
180 180
181 181
182 void TryFinallyBuilder::EndFinally() { 182 void TryFinallyBuilder::EndFinally() {
183 // Nothing to be done here. 183 // Nothing to be done here.
184 } 184 }
185 185
186 } // namespace interpreter 186 } // namespace interpreter
187 } // namespace internal 187 } // namespace internal
188 } // namespace v8 188 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698