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_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 class CallNew final : public Expression { | 1961 class CallNew final : public Expression { |
1962 public: | 1962 public: |
1963 DECLARE_NODE_TYPE(CallNew) | 1963 DECLARE_NODE_TYPE(CallNew) |
1964 | 1964 |
1965 Expression* expression() const { return expression_; } | 1965 Expression* expression() const { return expression_; } |
1966 ZoneList<Expression*>* arguments() const { return arguments_; } | 1966 ZoneList<Expression*>* arguments() const { return arguments_; } |
1967 | 1967 |
1968 // Type feedback information. | 1968 // Type feedback information. |
1969 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, | 1969 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, |
1970 FeedbackVectorSlotCache* cache) override { | 1970 FeedbackVectorSlotCache* cache) override { |
1971 callnew_feedback_slot_ = spec->AddConstructICSlot(); | 1971 callnew_feedback_slot_ = spec->AddGeneralSlot(); |
1972 } | 1972 } |
1973 | 1973 |
1974 FeedbackVectorSlot CallNewFeedbackSlot() { | 1974 FeedbackVectorSlot CallNewFeedbackSlot() { |
1975 DCHECK(!callnew_feedback_slot_.IsInvalid()); | 1975 DCHECK(!callnew_feedback_slot_.IsInvalid()); |
1976 return callnew_feedback_slot_; | 1976 return callnew_feedback_slot_; |
1977 } | 1977 } |
1978 | 1978 |
1979 bool IsMonomorphic() override { return is_monomorphic_; } | 1979 bool IsMonomorphic() override { return is_monomorphic_; } |
1980 Handle<JSFunction> target() const { return target_; } | 1980 Handle<JSFunction> target() const { return target_; } |
1981 Handle<AllocationSite> allocation_site() const { | 1981 Handle<AllocationSite> allocation_site() const { |
1982 return allocation_site_; | 1982 return allocation_site_; |
1983 } | 1983 } |
1984 | 1984 |
1985 static int num_ids() { return parent_num_ids() + 1; } | 1985 static int num_ids() { return parent_num_ids() + 1; } |
| 1986 static int feedback_slots() { return 1; } |
1986 BailoutId ReturnId() const { return BailoutId(local_id(0)); } | 1987 BailoutId ReturnId() const { return BailoutId(local_id(0)); } |
1987 | 1988 |
1988 void set_allocation_site(Handle<AllocationSite> site) { | 1989 void set_allocation_site(Handle<AllocationSite> site) { |
1989 allocation_site_ = site; | 1990 allocation_site_ = site; |
1990 } | 1991 } |
1991 void set_is_monomorphic(bool monomorphic) { is_monomorphic_ = monomorphic; } | 1992 void set_is_monomorphic(bool monomorphic) { is_monomorphic_ = monomorphic; } |
1992 void set_target(Handle<JSFunction> target) { target_ = target; } | 1993 void set_target(Handle<JSFunction> target) { target_ = target; } |
1993 void SetKnownGlobalTarget(Handle<JSFunction> target) { | 1994 void SetKnownGlobalTarget(Handle<JSFunction> target) { |
1994 target_ = target; | 1995 target_ = target; |
1995 is_monomorphic_ = true; | 1996 is_monomorphic_ = true; |
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3666 // the parser-level zone. | 3667 // the parser-level zone. |
3667 Zone* parser_zone_; | 3668 Zone* parser_zone_; |
3668 AstValueFactory* ast_value_factory_; | 3669 AstValueFactory* ast_value_factory_; |
3669 }; | 3670 }; |
3670 | 3671 |
3671 | 3672 |
3672 } // namespace internal | 3673 } // namespace internal |
3673 } // namespace v8 | 3674 } // namespace v8 |
3674 | 3675 |
3675 #endif // V8_AST_AST_H_ | 3676 #endif // V8_AST_AST_H_ |
OLD | NEW |