| 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 "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 | 1987 |
| 1988 enum InliningKind { | 1988 enum InliningKind { |
| 1989 NORMAL_RETURN, // Drop the function from the environment on return. | 1989 NORMAL_RETURN, // Drop the function from the environment on return. |
| 1990 CONSTRUCT_CALL_RETURN, // Either use allocated receiver or return value. | 1990 CONSTRUCT_CALL_RETURN, // Either use allocated receiver or return value. |
| 1991 GETTER_CALL_RETURN, // Returning from a getter, need to restore context. | 1991 GETTER_CALL_RETURN, // Returning from a getter, need to restore context. |
| 1992 SETTER_CALL_RETURN // Use the RHS of the assignment as the return value. | 1992 SETTER_CALL_RETURN // Use the RHS of the assignment as the return value. |
| 1993 }; | 1993 }; |
| 1994 | 1994 |
| 1995 | 1995 |
| 1996 class HArgumentsObject; | 1996 class HArgumentsObject; |
| 1997 class HConstant; |
| 1997 | 1998 |
| 1998 | 1999 |
| 1999 class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { | 2000 class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { |
| 2000 public: | 2001 public: |
| 2001 static HEnterInlined* New(Zone* zone, | 2002 static HEnterInlined* New(Zone* zone, HValue* context, BailoutId return_id, |
| 2002 HValue* context, | |
| 2003 BailoutId return_id, | |
| 2004 Handle<JSFunction> closure, | 2003 Handle<JSFunction> closure, |
| 2005 int arguments_count, | 2004 HConstant* closure_context, int arguments_count, |
| 2006 FunctionLiteral* function, | 2005 FunctionLiteral* function, |
| 2007 InliningKind inlining_kind, | 2006 InliningKind inlining_kind, Variable* arguments_var, |
| 2008 Variable* arguments_var, | |
| 2009 HArgumentsObject* arguments_object) { | 2007 HArgumentsObject* arguments_object) { |
| 2010 return new(zone) HEnterInlined(return_id, closure, arguments_count, | 2008 return new (zone) HEnterInlined(return_id, closure, closure_context, |
| 2011 function, inlining_kind, arguments_var, | 2009 arguments_count, function, inlining_kind, |
| 2012 arguments_object, zone); | 2010 arguments_var, arguments_object, zone); |
| 2013 } | 2011 } |
| 2014 | 2012 |
| 2015 void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); | 2013 void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); |
| 2016 ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; } | 2014 ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; } |
| 2017 | 2015 |
| 2018 virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT | 2016 virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT |
| 2019 | 2017 |
| 2020 Handle<JSFunction> closure() const { return closure_; } | 2018 Handle<JSFunction> closure() const { return closure_; } |
| 2019 HConstant* closure_context() const { return closure_context_; } |
| 2021 int arguments_count() const { return arguments_count_; } | 2020 int arguments_count() const { return arguments_count_; } |
| 2022 bool arguments_pushed() const { return arguments_pushed_; } | 2021 bool arguments_pushed() const { return arguments_pushed_; } |
| 2023 void set_arguments_pushed() { arguments_pushed_ = true; } | 2022 void set_arguments_pushed() { arguments_pushed_ = true; } |
| 2024 FunctionLiteral* function() const { return function_; } | 2023 FunctionLiteral* function() const { return function_; } |
| 2025 InliningKind inlining_kind() const { return inlining_kind_; } | 2024 InliningKind inlining_kind() const { return inlining_kind_; } |
| 2026 BailoutId ReturnId() const { return return_id_; } | 2025 BailoutId ReturnId() const { return return_id_; } |
| 2027 | 2026 |
| 2028 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 2027 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 2029 return Representation::None(); | 2028 return Representation::None(); |
| 2030 } | 2029 } |
| 2031 | 2030 |
| 2032 Variable* arguments_var() { return arguments_var_; } | 2031 Variable* arguments_var() { return arguments_var_; } |
| 2033 HArgumentsObject* arguments_object() { return arguments_object_; } | 2032 HArgumentsObject* arguments_object() { return arguments_object_; } |
| 2034 | 2033 |
| 2035 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) | 2034 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) |
| 2036 | 2035 |
| 2037 private: | 2036 private: |
| 2038 HEnterInlined(BailoutId return_id, | 2037 HEnterInlined(BailoutId return_id, Handle<JSFunction> closure, |
| 2039 Handle<JSFunction> closure, | 2038 HConstant* closure_context, int arguments_count, |
| 2040 int arguments_count, | 2039 FunctionLiteral* function, InliningKind inlining_kind, |
| 2041 FunctionLiteral* function, | 2040 Variable* arguments_var, HArgumentsObject* arguments_object, |
| 2042 InliningKind inlining_kind, | |
| 2043 Variable* arguments_var, | |
| 2044 HArgumentsObject* arguments_object, | |
| 2045 Zone* zone) | 2041 Zone* zone) |
| 2046 : return_id_(return_id), | 2042 : return_id_(return_id), |
| 2047 closure_(closure), | 2043 closure_(closure), |
| 2044 closure_context_(closure_context), |
| 2048 arguments_count_(arguments_count), | 2045 arguments_count_(arguments_count), |
| 2049 arguments_pushed_(false), | 2046 arguments_pushed_(false), |
| 2050 function_(function), | 2047 function_(function), |
| 2051 inlining_kind_(inlining_kind), | 2048 inlining_kind_(inlining_kind), |
| 2052 arguments_var_(arguments_var), | 2049 arguments_var_(arguments_var), |
| 2053 arguments_object_(arguments_object), | 2050 arguments_object_(arguments_object), |
| 2054 return_targets_(2, zone) { | 2051 return_targets_(2, zone) {} |
| 2055 } | |
| 2056 | 2052 |
| 2057 BailoutId return_id_; | 2053 BailoutId return_id_; |
| 2058 Handle<JSFunction> closure_; | 2054 Handle<JSFunction> closure_; |
| 2055 HConstant* closure_context_; |
| 2059 int arguments_count_; | 2056 int arguments_count_; |
| 2060 bool arguments_pushed_; | 2057 bool arguments_pushed_; |
| 2061 FunctionLiteral* function_; | 2058 FunctionLiteral* function_; |
| 2062 InliningKind inlining_kind_; | 2059 InliningKind inlining_kind_; |
| 2063 Variable* arguments_var_; | 2060 Variable* arguments_var_; |
| 2064 HArgumentsObject* arguments_object_; | 2061 HArgumentsObject* arguments_object_; |
| 2065 ZoneList<HBasicBlock*> return_targets_; | 2062 ZoneList<HBasicBlock*> return_targets_; |
| 2066 }; | 2063 }; |
| 2067 | 2064 |
| 2068 | 2065 |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3047 bool limit_is_included; | 3044 bool limit_is_included; |
| 3048 | 3045 |
| 3049 InductionVariableLimitUpdate() | 3046 InductionVariableLimitUpdate() |
| 3050 : updated_variable(NULL), limit(NULL), | 3047 : updated_variable(NULL), limit(NULL), |
| 3051 limit_is_upper(false), limit_is_included(false) {} | 3048 limit_is_upper(false), limit_is_included(false) {} |
| 3052 }; | 3049 }; |
| 3053 | 3050 |
| 3054 | 3051 |
| 3055 class HBoundsCheck; | 3052 class HBoundsCheck; |
| 3056 class HPhi; | 3053 class HPhi; |
| 3057 class HConstant; | |
| 3058 class HBitwise; | 3054 class HBitwise; |
| 3059 | 3055 |
| 3060 | 3056 |
| 3061 class InductionVariableData V8_FINAL : public ZoneObject { | 3057 class InductionVariableData V8_FINAL : public ZoneObject { |
| 3062 public: | 3058 public: |
| 3063 class InductionVariableCheck : public ZoneObject { | 3059 class InductionVariableCheck : public ZoneObject { |
| 3064 public: | 3060 public: |
| 3065 HBoundsCheck* check() { return check_; } | 3061 HBoundsCheck* check() { return check_; } |
| 3066 InductionVariableCheck* next() { return next_; } | 3062 InductionVariableCheck* next() { return next_; } |
| 3067 bool HasUpperLimit() { return upper_limit_ >= 0; } | 3063 bool HasUpperLimit() { return upper_limit_ >= 0; } |
| (...skipping 4790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7858 }; | 7854 }; |
| 7859 | 7855 |
| 7860 | 7856 |
| 7861 | 7857 |
| 7862 #undef DECLARE_INSTRUCTION | 7858 #undef DECLARE_INSTRUCTION |
| 7863 #undef DECLARE_CONCRETE_INSTRUCTION | 7859 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7864 | 7860 |
| 7865 } } // namespace v8::internal | 7861 } } // namespace v8::internal |
| 7866 | 7862 |
| 7867 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7863 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |