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-generator.cc

Issue 1748343003: [debugger, interpreter] add break location at if-statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | test/cctest/cctest.status » ('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-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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 builder()->SetStatementPosition(stmt); 826 builder()->SetStatementPosition(stmt);
827 VisitForEffect(stmt->expression()); 827 VisitForEffect(stmt->expression());
828 } 828 }
829 829
830 830
831 void BytecodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) { 831 void BytecodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) {
832 } 832 }
833 833
834 834
835 void BytecodeGenerator::VisitIfStatement(IfStatement* stmt) { 835 void BytecodeGenerator::VisitIfStatement(IfStatement* stmt) {
836 builder()->SetStatementPosition(stmt);
836 BytecodeLabel else_label, end_label; 837 BytecodeLabel else_label, end_label;
837 if (stmt->condition()->ToBooleanIsTrue()) { 838 if (stmt->condition()->ToBooleanIsTrue()) {
838 // Generate then block unconditionally as always true. 839 // Generate then block unconditionally as always true.
839 Visit(stmt->then_statement()); 840 Visit(stmt->then_statement());
840 } else if (stmt->condition()->ToBooleanIsFalse()) { 841 } else if (stmt->condition()->ToBooleanIsFalse()) {
841 // Generate else block unconditionally if it exists. 842 // Generate else block unconditionally if it exists.
842 if (stmt->HasElseStatement()) { 843 if (stmt->HasElseStatement()) {
843 Visit(stmt->else_statement()); 844 Visit(stmt->else_statement());
844 } 845 }
845 } else { 846 } else {
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 } 3139 }
3139 3140
3140 3141
3141 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3142 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3142 return info()->feedback_vector()->GetIndex(slot); 3143 return info()->feedback_vector()->GetIndex(slot);
3143 } 3144 }
3144 3145
3145 } // namespace interpreter 3146 } // namespace interpreter
3146 } // namespace internal 3147 } // namespace internal
3147 } // namespace v8 3148 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698