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

Side by Side Diff: src/full-codegen.cc

Issue 261253005: Clean up debugger flags. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/frames.h ('k') | src/ia32/full-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "codegen.h" 7 #include "codegen.h"
8 #include "compiler.h" 8 #include "compiler.h"
9 #include "debug.h" 9 #include "debug.h"
10 #include "full-codegen.h" 10 #include "full-codegen.h"
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 CodeGenerator::RecordPositions(masm_, fun->start_position()); 798 CodeGenerator::RecordPositions(masm_, fun->start_position());
799 } 799 }
800 800
801 801
802 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { 802 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
803 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); 803 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1);
804 } 804 }
805 805
806 806
807 void FullCodeGenerator::SetStatementPosition(Statement* stmt) { 807 void FullCodeGenerator::SetStatementPosition(Statement* stmt) {
808 if (!isolate()->debugger()->IsDebuggerActive()) { 808 if (!info_->is_debug()) {
809 CodeGenerator::RecordPositions(masm_, stmt->position()); 809 CodeGenerator::RecordPositions(masm_, stmt->position());
810 } else { 810 } else {
811 // Check if the statement will be breakable without adding a debug break 811 // Check if the statement will be breakable without adding a debug break
812 // slot. 812 // slot.
813 BreakableStatementChecker checker(zone()); 813 BreakableStatementChecker checker(zone());
814 checker.Check(stmt); 814 checker.Check(stmt);
815 // Record the statement position right here if the statement is not 815 // Record the statement position right here if the statement is not
816 // breakable. For breakable statements the actual recording of the 816 // breakable. For breakable statements the actual recording of the
817 // position will be postponed to the breakable code (typically an IC). 817 // position will be postponed to the breakable code (typically an IC).
818 bool position_recorded = CodeGenerator::RecordPositions( 818 bool position_recorded = CodeGenerator::RecordPositions(
819 masm_, stmt->position(), !checker.is_breakable()); 819 masm_, stmt->position(), !checker.is_breakable());
820 // If the position recording did record a new position generate a debug 820 // If the position recording did record a new position generate a debug
821 // break slot to make the statement breakable. 821 // break slot to make the statement breakable.
822 if (position_recorded) { 822 if (position_recorded) {
823 Debug::GenerateSlot(masm_); 823 Debug::GenerateSlot(masm_);
824 } 824 }
825 } 825 }
826 } 826 }
827 827
828 828
829 void FullCodeGenerator::SetExpressionPosition(Expression* expr) { 829 void FullCodeGenerator::SetExpressionPosition(Expression* expr) {
830 if (!isolate()->debugger()->IsDebuggerActive()) { 830 if (!info_->is_debug()) {
831 CodeGenerator::RecordPositions(masm_, expr->position()); 831 CodeGenerator::RecordPositions(masm_, expr->position());
832 } else { 832 } else {
833 // Check if the expression will be breakable without adding a debug break 833 // Check if the expression will be breakable without adding a debug break
834 // slot. 834 // slot.
835 BreakableStatementChecker checker(zone()); 835 BreakableStatementChecker checker(zone());
836 checker.Check(expr); 836 checker.Check(expr);
837 // Record a statement position right here if the expression is not 837 // Record a statement position right here if the expression is not
838 // breakable. For breakable expressions the actual recording of the 838 // breakable. For breakable expressions the actual recording of the
839 // position will be postponed to the breakable code (typically an IC). 839 // position will be postponed to the breakable code (typically an IC).
840 // NOTE this will record a statement position for something which might 840 // NOTE this will record a statement position for something which might
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 } 1694 }
1695 return true; 1695 return true;
1696 } 1696 }
1697 #endif // DEBUG 1697 #endif // DEBUG
1698 1698
1699 1699
1700 #undef __ 1700 #undef __
1701 1701
1702 1702
1703 } } // namespace v8::internal 1703 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698