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

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

Issue 1995303002: [interpreter] Fix source position of yield-exceptions in generators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebaseline bytecode expectations Created 4 years, 7 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/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 explicit ControlScopeForTopLevel(BytecodeGenerator* generator) 211 explicit ControlScopeForTopLevel(BytecodeGenerator* generator)
212 : ControlScope(generator) {} 212 : ControlScope(generator) {}
213 213
214 protected: 214 protected:
215 bool Execute(Command command, Statement* statement) override { 215 bool Execute(Command command, Statement* statement) override {
216 switch (command) { 216 switch (command) {
217 case CMD_BREAK: // We should never see break/continue in top-level. 217 case CMD_BREAK: // We should never see break/continue in top-level.
218 case CMD_CONTINUE: 218 case CMD_CONTINUE:
219 UNREACHABLE(); 219 UNREACHABLE();
220 case CMD_RETURN: 220 case CMD_RETURN:
221 generator()->builder()->SetReturnPosition();
221 generator()->builder()->Return(); 222 generator()->builder()->Return();
222 return true; 223 return true;
223 case CMD_RETHROW: 224 case CMD_RETHROW:
224 generator()->builder()->ReThrow(); 225 generator()->builder()->ReThrow();
225 return true; 226 return true;
226 } 227 }
227 return false; 228 return false;
228 } 229 }
229 }; 230 };
230 231
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3274 } 3275 }
3275 3276
3276 3277
3277 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3278 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3278 return info()->shared_info()->feedback_vector()->GetIndex(slot); 3279 return info()->shared_info()->feedback_vector()->GetIndex(slot);
3279 } 3280 }
3280 3281
3281 } // namespace interpreter 3282 } // namespace interpreter
3282 } // namespace internal 3283 } // namespace internal
3283 } // namespace v8 3284 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698