| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 private: | 1015 private: |
| 1016 Representation from_; | 1016 Representation from_; |
| 1017 Representation to_; | 1017 Representation to_; |
| 1018 }; | 1018 }; |
| 1019 | 1019 |
| 1020 | 1020 |
| 1021 class HSimulate: public HInstruction { | 1021 class HSimulate: public HInstruction { |
| 1022 public: | 1022 public: |
| 1023 HSimulate(int ast_id, int pop_count, int environment_height) | 1023 HSimulate(int ast_id, int pop_count, int environment_length) |
| 1024 : ast_id_(ast_id), | 1024 : ast_id_(ast_id), |
| 1025 pop_count_(pop_count), | 1025 pop_count_(pop_count), |
| 1026 environment_height_(environment_height), | 1026 environment_length_(environment_length), |
| 1027 values_(2), | 1027 values_(2), |
| 1028 assigned_indexes_(2) {} | 1028 assigned_indexes_(2) {} |
| 1029 virtual ~HSimulate() {} | 1029 virtual ~HSimulate() {} |
| 1030 | 1030 |
| 1031 virtual void PrintDataTo(StringStream* stream) const; | 1031 virtual void PrintDataTo(StringStream* stream) const; |
| 1032 | 1032 |
| 1033 bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; } | 1033 bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; } |
| 1034 int ast_id() const { return ast_id_; } | 1034 int ast_id() const { return ast_id_; } |
| 1035 void set_ast_id(int id) { | 1035 void set_ast_id(int id) { |
| 1036 ASSERT(!HasAstId()); | 1036 ASSERT(!HasAstId()); |
| 1037 ast_id_ = id; | 1037 ast_id_ = id; |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 int environment_height() const { return environment_height_; } | 1040 int environment_length() const { return environment_length_; } |
| 1041 int pop_count() const { return pop_count_; } | 1041 int pop_count() const { return pop_count_; } |
| 1042 const ZoneList<HValue*>* values() const { return &values_; } | 1042 const ZoneList<HValue*>* values() const { return &values_; } |
| 1043 int GetAssignedIndexAt(int index) const { | 1043 int GetAssignedIndexAt(int index) const { |
| 1044 ASSERT(HasAssignedIndexAt(index)); | 1044 ASSERT(HasAssignedIndexAt(index)); |
| 1045 return assigned_indexes_[index]; | 1045 return assigned_indexes_[index]; |
| 1046 } | 1046 } |
| 1047 bool HasAssignedIndexAt(int index) const { | 1047 bool HasAssignedIndexAt(int index) const { |
| 1048 return assigned_indexes_[index] != kNoIndex; | 1048 return assigned_indexes_[index] != kNoIndex; |
| 1049 } | 1049 } |
| 1050 void AddAssignedValue(int index, HValue* value) { | 1050 void AddAssignedValue(int index, HValue* value) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1072 void AddValue(int index, HValue* value) { | 1072 void AddValue(int index, HValue* value) { |
| 1073 assigned_indexes_.Add(index); | 1073 assigned_indexes_.Add(index); |
| 1074 // Resize the list of pushed values. | 1074 // Resize the list of pushed values. |
| 1075 values_.Add(NULL); | 1075 values_.Add(NULL); |
| 1076 // Set the operand through the base method in HValue to make sure that the | 1076 // Set the operand through the base method in HValue to make sure that the |
| 1077 // use lists are correctly updated. | 1077 // use lists are correctly updated. |
| 1078 SetOperandAt(values_.length() - 1, value); | 1078 SetOperandAt(values_.length() - 1, value); |
| 1079 } | 1079 } |
| 1080 int ast_id_; | 1080 int ast_id_; |
| 1081 int pop_count_; | 1081 int pop_count_; |
| 1082 int environment_height_; | 1082 int environment_length_; |
| 1083 ZoneList<HValue*> values_; | 1083 ZoneList<HValue*> values_; |
| 1084 ZoneList<int> assigned_indexes_; | 1084 ZoneList<int> assigned_indexes_; |
| 1085 }; | 1085 }; |
| 1086 | 1086 |
| 1087 | 1087 |
| 1088 class HStackCheck: public HInstruction { | 1088 class HStackCheck: public HInstruction { |
| 1089 public: | 1089 public: |
| 1090 HStackCheck() { } | 1090 HStackCheck() { } |
| 1091 | 1091 |
| 1092 DECLARE_CONCRETE_INSTRUCTION(Throw, "stack_check") | 1092 DECLARE_CONCRETE_INSTRUCTION(Throw, "stack_check") |
| (...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2998 HValue* object() const { return left(); } | 2998 HValue* object() const { return left(); } |
| 2999 HValue* key() const { return right(); } | 2999 HValue* key() const { return right(); } |
| 3000 }; | 3000 }; |
| 3001 | 3001 |
| 3002 #undef DECLARE_INSTRUCTION | 3002 #undef DECLARE_INSTRUCTION |
| 3003 #undef DECLARE_CONCRETE_INSTRUCTION | 3003 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3004 | 3004 |
| 3005 } } // namespace v8::internal | 3005 } } // namespace v8::internal |
| 3006 | 3006 |
| 3007 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3007 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |