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

Side by Side Diff: src/interpreter/bytecode-array-builder.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
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('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/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-peephole-optimizer.h" 9 #include "src/interpreter/bytecode-peephole-optimizer.h"
10 #include "src/interpreter/interpreter-intrinsics.h" 10 #include "src/interpreter/interpreter-intrinsics.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 753
754 754
755 BytecodeArrayBuilder& BytecodeArrayBuilder::ReThrow() { 755 BytecodeArrayBuilder& BytecodeArrayBuilder::ReThrow() {
756 Output(Bytecode::kReThrow); 756 Output(Bytecode::kReThrow);
757 exit_seen_in_block_ = true; 757 exit_seen_in_block_ = true;
758 return *this; 758 return *this;
759 } 759 }
760 760
761 761
762 BytecodeArrayBuilder& BytecodeArrayBuilder::Return() { 762 BytecodeArrayBuilder& BytecodeArrayBuilder::Return() {
763 SetReturnPosition();
764 Output(Bytecode::kReturn); 763 Output(Bytecode::kReturn);
765 exit_seen_in_block_ = true; 764 exit_seen_in_block_ = true;
766 return *this; 765 return *this;
767 } 766 }
768 767
769 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() { 768 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() {
770 Output(Bytecode::kDebugger); 769 Output(Bytecode::kDebugger);
771 return *this; 770 return *this;
772 } 771 }
773 772
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 856
858 857
859 void BytecodeArrayBuilder::LeaveBasicBlock() { 858 void BytecodeArrayBuilder::LeaveBasicBlock() {
860 exit_seen_in_block_ = false; 859 exit_seen_in_block_ = false;
861 pipeline()->FlushBasicBlock(); 860 pipeline()->FlushBasicBlock();
862 } 861 }
863 862
864 void BytecodeArrayBuilder::EnsureReturn() { 863 void BytecodeArrayBuilder::EnsureReturn() {
865 if (!exit_seen_in_block_) { 864 if (!exit_seen_in_block_) {
866 LoadUndefined(); 865 LoadUndefined();
866 SetReturnPosition();
867 Return(); 867 Return();
868 } 868 }
869 DCHECK(exit_seen_in_block_); 869 DCHECK(exit_seen_in_block_);
870 } 870 }
871 871
872 BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable, 872 BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
873 Register receiver_args, 873 Register receiver_args,
874 size_t receiver_args_count, 874 size_t receiver_args_count,
875 int feedback_slot, 875 int feedback_slot,
876 TailCallMode tail_call_mode) { 876 TailCallMode tail_call_mode) {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 } 1284 }
1285 1285
1286 uint32_t BytecodeArrayBuilder::UnsignedOperand(size_t value) { 1286 uint32_t BytecodeArrayBuilder::UnsignedOperand(size_t value) {
1287 DCHECK_LE(value, kMaxUInt32); 1287 DCHECK_LE(value, kMaxUInt32);
1288 return static_cast<uint32_t>(value); 1288 return static_cast<uint32_t>(value);
1289 } 1289 }
1290 1290
1291 } // namespace interpreter 1291 } // namespace interpreter
1292 } // namespace internal 1292 } // namespace internal
1293 } // namespace v8 1293 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698