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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 2387363003: [interpreter] Implement support for the --trace flag. (Closed)
Patch Set: Addressed comments. Created 4 years, 2 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.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/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" 9 #include "src/interpreter/bytecode-dead-code-optimizer.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 return *this; 709 return *this;
710 } 710 }
711 711
712 BytecodeArrayBuilder& BytecodeArrayBuilder::MarkTryEnd(int handler_id) { 712 BytecodeArrayBuilder& BytecodeArrayBuilder::MarkTryEnd(int handler_id) {
713 BytecodeLabel try_end; 713 BytecodeLabel try_end;
714 Bind(&try_end); 714 Bind(&try_end);
715 handler_table_builder()->SetTryRegionEnd(handler_id, try_end.offset()); 715 handler_table_builder()->SetTryRegionEnd(handler_id, try_end.offset());
716 return *this; 716 return *this;
717 } 717 }
718 718
719 void BytecodeArrayBuilder::EnsureReturn() {
720 if (!return_seen_in_block_) {
721 LoadUndefined();
722 Return();
723 }
724 DCHECK(return_seen_in_block_);
725 }
726
727 BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable, 719 BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
728 RegisterList args, 720 RegisterList args,
729 int feedback_slot, 721 int feedback_slot,
730 TailCallMode tail_call_mode) { 722 TailCallMode tail_call_mode) {
731 if (tail_call_mode == TailCallMode::kDisallow) { 723 if (tail_call_mode == TailCallMode::kDisallow) {
732 Output(Bytecode::kCall, RegisterOperand(callable), 724 Output(Bytecode::kCall, RegisterOperand(callable),
733 RegisterOperand(args.first_register()), 725 RegisterOperand(args.first_register()),
734 UnsignedOperand(args.register_count()), 726 UnsignedOperand(args.register_count()),
735 UnsignedOperand(feedback_slot)); 727 UnsignedOperand(feedback_slot));
736 } else { 728 } else {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 } 924 }
933 } 925 }
934 } 926 }
935 927
936 return true; 928 return true;
937 } 929 }
938 930
939 } // namespace interpreter 931 } // namespace interpreter
940 } // namespace internal 932 } // namespace internal
941 } // namespace v8 933 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698