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 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 | 634 |
635 // Adds the [[HomeObject]] to |initializer| if it is a FunctionLiteral. | 635 // Adds the [[HomeObject]] to |initializer| if it is a FunctionLiteral. |
636 // The value of the initializer is expected to be at the top of the stack. | 636 // The value of the initializer is expected to be at the top of the stack. |
637 // |offset| is the offset in the stack where the home object can be found. | 637 // |offset| is the offset in the stack where the home object can be found. |
638 void EmitSetHomeObject(Expression* initializer, int offset, | 638 void EmitSetHomeObject(Expression* initializer, int offset, |
639 FeedbackVectorSlot slot); | 639 FeedbackVectorSlot slot); |
640 | 640 |
641 void EmitSetHomeObjectAccumulator(Expression* initializer, int offset, | 641 void EmitSetHomeObjectAccumulator(Expression* initializer, int offset, |
642 FeedbackVectorSlot slot); | 642 FeedbackVectorSlot slot); |
643 | 643 |
| 644 void EmitLoadStoreICSlot(FeedbackVectorSlot slot); |
| 645 |
644 void CallIC(Handle<Code> code, | 646 void CallIC(Handle<Code> code, |
645 TypeFeedbackId id = TypeFeedbackId::None()); | 647 TypeFeedbackId id = TypeFeedbackId::None()); |
646 | 648 |
647 // Inside typeof reference errors are never thrown. | 649 // Inside typeof reference errors are never thrown. |
648 void CallLoadIC(TypeofMode typeof_mode, | 650 void CallLoadIC(TypeofMode typeof_mode, |
649 TypeFeedbackId id = TypeFeedbackId::None()); | 651 TypeFeedbackId id = TypeFeedbackId::None()); |
650 void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None()); | 652 void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None()); |
651 | 653 |
652 void SetFunctionPosition(FunctionLiteral* fun); | 654 void SetFunctionPosition(FunctionLiteral* fun); |
653 void SetReturnPosition(FunctionLiteral* fun); | 655 void SetReturnPosition(FunctionLiteral* fun); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 void VisitForTypeofValue(Expression* expr); | 738 void VisitForTypeofValue(Expression* expr); |
737 | 739 |
738 void Generate(); | 740 void Generate(); |
739 void PopulateDeoptimizationData(Handle<Code> code); | 741 void PopulateDeoptimizationData(Handle<Code> code); |
740 void PopulateTypeFeedbackInfo(Handle<Code> code); | 742 void PopulateTypeFeedbackInfo(Handle<Code> code); |
741 void PopulateHandlerTable(Handle<Code> code); | 743 void PopulateHandlerTable(Handle<Code> code); |
742 | 744 |
743 bool MustCreateObjectLiteralWithRuntime(ObjectLiteral* expr) const; | 745 bool MustCreateObjectLiteralWithRuntime(ObjectLiteral* expr) const; |
744 bool MustCreateArrayLiteralWithRuntime(ArrayLiteral* expr) const; | 746 bool MustCreateArrayLiteralWithRuntime(ArrayLiteral* expr) const; |
745 | 747 |
746 void EmitLoadStoreICSlot(FeedbackVectorSlot slot); | |
747 | |
748 int NewHandlerTableEntry(); | 748 int NewHandlerTableEntry(); |
749 | 749 |
750 struct BailoutEntry { | 750 struct BailoutEntry { |
751 BailoutId id; | 751 BailoutId id; |
752 unsigned pc_and_state; | 752 unsigned pc_and_state; |
753 }; | 753 }; |
754 | 754 |
755 struct BackEdgeEntry { | 755 struct BackEdgeEntry { |
756 BailoutId id; | 756 BailoutId id; |
757 unsigned pc; | 757 unsigned pc; |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 Address start_; | 1057 Address start_; |
1058 Address instruction_start_; | 1058 Address instruction_start_; |
1059 uint32_t length_; | 1059 uint32_t length_; |
1060 }; | 1060 }; |
1061 | 1061 |
1062 | 1062 |
1063 } // namespace internal | 1063 } // namespace internal |
1064 } // namespace v8 | 1064 } // namespace v8 |
1065 | 1065 |
1066 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 1066 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
OLD | NEW |