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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 1842953003: Preserve exception message in iterator finalization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Turbofan Created 4 years, 8 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/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/control-flow-builders.h" 10 #include "src/interpreter/control-flow-builders.h"
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 { 1192 {
1193 ControlScopeForTryCatch scope(this, &try_control_builder); 1193 ControlScopeForTryCatch scope(this, &try_control_builder);
1194 Visit(stmt->try_block()); 1194 Visit(stmt->try_block());
1195 } 1195 }
1196 try_control_builder.EndTry(); 1196 try_control_builder.EndTry();
1197 1197
1198 // Create a catch scope that binds the exception. 1198 // Create a catch scope that binds the exception.
1199 VisitNewLocalCatchContext(stmt->variable()); 1199 VisitNewLocalCatchContext(stmt->variable());
1200 builder()->StoreAccumulatorInRegister(context); 1200 builder()->StoreAccumulatorInRegister(context);
1201 1201
1202 // Clear message object as we enter the catch block. 1202 // If requested, clear message object as we enter the catch block.
1203 builder()->CallRuntime(Runtime::kInterpreterClearPendingMessage, no_reg, 0); 1203 if (stmt->clear_pending_message()) {
1204 builder()->CallRuntime(Runtime::kInterpreterClearPendingMessage, no_reg, 0);
1205 }
1204 1206
1205 // Load the catch context into the accumulator. 1207 // Load the catch context into the accumulator.
1206 builder()->LoadAccumulatorWithRegister(context); 1208 builder()->LoadAccumulatorWithRegister(context);
1207 1209
1208 // Evaluate the catch-block. 1210 // Evaluate the catch-block.
1209 VisitInScope(stmt->catch_block(), stmt->scope()); 1211 VisitInScope(stmt->catch_block(), stmt->scope());
1210 try_control_builder.EndCatch(); 1212 try_control_builder.EndCatch();
1211 } 1213 }
1212 1214
1213 1215
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3147 } 3149 }
3148 3150
3149 3151
3150 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3152 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3151 return info()->feedback_vector()->GetIndex(slot); 3153 return info()->feedback_vector()->GetIndex(slot);
3152 } 3154 }
3153 3155
3154 } // namespace interpreter 3156 } // namespace interpreter
3155 } // namespace internal 3157 } // namespace internal
3156 } // namespace v8 3158 } // namespace v8
OLDNEW
« src/ast/ast.h ('K') | « src/full-codegen/full-codegen.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698