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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 : RelocInfo::DEBUG_BREAK_SLOT_AT_CALL; | 676 : RelocInfo::DEBUG_BREAK_SLOT_AT_CALL; |
677 // Always emit a debug break slot before a call. | 677 // Always emit a debug break slot before a call. |
678 DebugCodegen::GenerateSlot(masm_, mode); | 678 DebugCodegen::GenerateSlot(masm_, mode); |
679 } | 679 } |
680 } | 680 } |
681 | 681 |
682 | 682 |
683 void FullCodeGenerator::VisitSuperPropertyReference( | 683 void FullCodeGenerator::VisitSuperPropertyReference( |
684 SuperPropertyReference* super) { | 684 SuperPropertyReference* super) { |
685 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); | 685 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); |
| 686 // Even though this expression doesn't produce a value, we need to simulate |
| 687 // plugging of the value context to ensure stack depth tracking is in sync. |
| 688 if (context()->IsStackValue()) OperandStackDepthIncrement(1); |
686 } | 689 } |
687 | 690 |
688 | 691 |
689 void FullCodeGenerator::VisitSuperCallReference(SuperCallReference* super) { | 692 void FullCodeGenerator::VisitSuperCallReference(SuperCallReference* super) { |
690 __ CallRuntime(Runtime::kThrowUnsupportedSuperError); | 693 // Handled by VisitCall |
| 694 UNREACHABLE(); |
691 } | 695 } |
692 | 696 |
693 | 697 |
694 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { | 698 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { |
695 context()->Plug(handle(Smi::FromInt(0), isolate())); | 699 context()->Plug(handle(Smi::FromInt(0), isolate())); |
696 } | 700 } |
697 | 701 |
698 | 702 |
699 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { | 703 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { |
700 switch (expr->op()) { | 704 switch (expr->op()) { |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 return var->scope()->is_nonlinear() || | 1940 return var->scope()->is_nonlinear() || |
1937 var->initializer_position() >= proxy->position(); | 1941 var->initializer_position() >= proxy->position(); |
1938 } | 1942 } |
1939 | 1943 |
1940 | 1944 |
1941 #undef __ | 1945 #undef __ |
1942 | 1946 |
1943 | 1947 |
1944 } // namespace internal | 1948 } // namespace internal |
1945 } // namespace v8 | 1949 } // namespace v8 |
OLD | NEW |