| OLD | NEW |
| 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 "src/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 664 |
| 665 | 665 |
| 666 void FullCodeGenerator::SetExpressionAsStatementPosition(Expression* expr) { | 666 void FullCodeGenerator::SetExpressionAsStatementPosition(Expression* expr) { |
| 667 if (expr->position() == RelocInfo::kNoPosition) return; | 667 if (expr->position() == RelocInfo::kNoPosition) return; |
| 668 bool recorded = RecordStatementPosition(masm_, expr->position()); | 668 bool recorded = RecordStatementPosition(masm_, expr->position()); |
| 669 if (recorded && info_->is_debug()) { | 669 if (recorded && info_->is_debug()) { |
| 670 DebugCodegen::GenerateSlot(masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_POSITION); | 670 DebugCodegen::GenerateSlot(masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_POSITION); |
| 671 } | 671 } |
| 672 } | 672 } |
| 673 | 673 |
| 674 | 674 void FullCodeGenerator::SetCallPosition(Expression* expr, |
| 675 void FullCodeGenerator::SetCallPosition(Expression* expr) { | 675 TailCallMode tail_call_mode) { |
| 676 if (expr->position() == RelocInfo::kNoPosition) return; | 676 if (expr->position() == RelocInfo::kNoPosition) return; |
| 677 RecordPosition(masm_, expr->position()); | 677 RecordPosition(masm_, expr->position()); |
| 678 if (info_->is_debug()) { | 678 if (info_->is_debug()) { |
| 679 RelocInfo::Mode mode = (tail_call_mode == TailCallMode::kAllow) |
| 680 ? RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL |
| 681 : RelocInfo::DEBUG_BREAK_SLOT_AT_CALL; |
| 679 // Always emit a debug break slot before a call. | 682 // Always emit a debug break slot before a call. |
| 680 DebugCodegen::GenerateSlot(masm_, RelocInfo::DEBUG_BREAK_SLOT_AT_CALL); | 683 DebugCodegen::GenerateSlot(masm_, mode); |
| 681 } | 684 } |
| 682 } | 685 } |
| 683 | 686 |
| 684 | 687 |
| 685 void FullCodeGenerator::VisitSuperPropertyReference( | 688 void FullCodeGenerator::VisitSuperPropertyReference( |
| 686 SuperPropertyReference* super) { | 689 SuperPropertyReference* super) { |
| 687 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); | 690 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); |
| 688 } | 691 } |
| 689 | 692 |
| 690 | 693 |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1955 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1958 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1956 var->initializer_position() >= proxy->position(); | 1959 var->initializer_position() >= proxy->position(); |
| 1957 } | 1960 } |
| 1958 | 1961 |
| 1959 | 1962 |
| 1960 #undef __ | 1963 #undef __ |
| 1961 | 1964 |
| 1962 | 1965 |
| 1963 } // namespace internal | 1966 } // namespace internal |
| 1964 } // namespace v8 | 1967 } // namespace v8 |
| OLD | NEW |