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_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 return new (zone) HEnterInlined(return_id, closure, closure_context, | 1951 return new (zone) HEnterInlined(return_id, closure, closure_context, |
1952 arguments_count, function, inlining_kind, | 1952 arguments_count, function, inlining_kind, |
1953 arguments_var, arguments_object, zone); | 1953 arguments_var, arguments_object, zone); |
1954 } | 1954 } |
1955 | 1955 |
1956 void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); | 1956 void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); |
1957 ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; } | 1957 ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; } |
1958 | 1958 |
1959 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 1959 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
1960 | 1960 |
| 1961 Handle<SharedFunctionInfo> shared() const { return shared_; } |
1961 Handle<JSFunction> closure() const { return closure_; } | 1962 Handle<JSFunction> closure() const { return closure_; } |
1962 HConstant* closure_context() const { return closure_context_; } | 1963 HConstant* closure_context() const { return closure_context_; } |
1963 int arguments_count() const { return arguments_count_; } | 1964 int arguments_count() const { return arguments_count_; } |
1964 bool arguments_pushed() const { return arguments_pushed_; } | 1965 bool arguments_pushed() const { return arguments_pushed_; } |
1965 void set_arguments_pushed() { arguments_pushed_ = true; } | 1966 void set_arguments_pushed() { arguments_pushed_ = true; } |
1966 FunctionLiteral* function() const { return function_; } | 1967 FunctionLiteral* function() const { return function_; } |
1967 InliningKind inlining_kind() const { return inlining_kind_; } | 1968 InliningKind inlining_kind() const { return inlining_kind_; } |
1968 BailoutId ReturnId() const { return return_id_; } | 1969 BailoutId ReturnId() const { return return_id_; } |
1969 int inlining_id() const { return inlining_id_; } | 1970 int inlining_id() const { return inlining_id_; } |
1970 void set_inlining_id(int inlining_id) { inlining_id_ = inlining_id; } | 1971 void set_inlining_id(int inlining_id) { inlining_id_ = inlining_id; } |
1971 | 1972 |
1972 Representation RequiredInputRepresentation(int index) override { | 1973 Representation RequiredInputRepresentation(int index) override { |
1973 return Representation::None(); | 1974 return Representation::None(); |
1974 } | 1975 } |
1975 | 1976 |
1976 Variable* arguments_var() { return arguments_var_; } | 1977 Variable* arguments_var() { return arguments_var_; } |
1977 HArgumentsObject* arguments_object() { return arguments_object_; } | 1978 HArgumentsObject* arguments_object() { return arguments_object_; } |
1978 | 1979 |
1979 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) | 1980 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) |
1980 | 1981 |
1981 private: | 1982 private: |
1982 HEnterInlined(BailoutId return_id, Handle<JSFunction> closure, | 1983 HEnterInlined(BailoutId return_id, Handle<JSFunction> closure, |
1983 HConstant* closure_context, int arguments_count, | 1984 HConstant* closure_context, int arguments_count, |
1984 FunctionLiteral* function, InliningKind inlining_kind, | 1985 FunctionLiteral* function, InliningKind inlining_kind, |
1985 Variable* arguments_var, HArgumentsObject* arguments_object, | 1986 Variable* arguments_var, HArgumentsObject* arguments_object, |
1986 Zone* zone) | 1987 Zone* zone) |
1987 : return_id_(return_id), | 1988 : return_id_(return_id), |
| 1989 shared_(handle(closure->shared())), |
1988 closure_(closure), | 1990 closure_(closure), |
1989 closure_context_(closure_context), | 1991 closure_context_(closure_context), |
1990 arguments_count_(arguments_count), | 1992 arguments_count_(arguments_count), |
1991 arguments_pushed_(false), | 1993 arguments_pushed_(false), |
1992 function_(function), | 1994 function_(function), |
1993 inlining_kind_(inlining_kind), | 1995 inlining_kind_(inlining_kind), |
1994 inlining_id_(0), | 1996 inlining_id_(0), |
1995 arguments_var_(arguments_var), | 1997 arguments_var_(arguments_var), |
1996 arguments_object_(arguments_object), | 1998 arguments_object_(arguments_object), |
1997 return_targets_(2, zone) {} | 1999 return_targets_(2, zone) {} |
1998 | 2000 |
1999 BailoutId return_id_; | 2001 BailoutId return_id_; |
| 2002 Handle<SharedFunctionInfo> shared_; |
2000 Handle<JSFunction> closure_; | 2003 Handle<JSFunction> closure_; |
2001 HConstant* closure_context_; | 2004 HConstant* closure_context_; |
2002 int arguments_count_; | 2005 int arguments_count_; |
2003 bool arguments_pushed_; | 2006 bool arguments_pushed_; |
2004 FunctionLiteral* function_; | 2007 FunctionLiteral* function_; |
2005 InliningKind inlining_kind_; | 2008 InliningKind inlining_kind_; |
2006 int inlining_id_; | 2009 int inlining_id_; |
2007 Variable* arguments_var_; | 2010 Variable* arguments_var_; |
2008 HArgumentsObject* arguments_object_; | 2011 HArgumentsObject* arguments_object_; |
2009 ZoneList<HBasicBlock*> return_targets_; | 2012 ZoneList<HBasicBlock*> return_targets_; |
(...skipping 5892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7902 }; | 7905 }; |
7903 | 7906 |
7904 | 7907 |
7905 | 7908 |
7906 #undef DECLARE_INSTRUCTION | 7909 #undef DECLARE_INSTRUCTION |
7907 #undef DECLARE_CONCRETE_INSTRUCTION | 7910 #undef DECLARE_CONCRETE_INSTRUCTION |
7908 | 7911 |
7909 } } // namespace v8::internal | 7912 } } // namespace v8::internal |
7910 | 7913 |
7911 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7914 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |