| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 IfBuilder(HGraphBuilder* builder, | 1084 IfBuilder(HGraphBuilder* builder, |
| 1085 HIfContinuation* continuation); | 1085 HIfContinuation* continuation); |
| 1086 | 1086 |
| 1087 ~IfBuilder() { | 1087 ~IfBuilder() { |
| 1088 if (!finished_) End(); | 1088 if (!finished_) End(); |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 HInstruction* IfCompare( | 1091 HInstruction* IfCompare( |
| 1092 HValue* left, | 1092 HValue* left, |
| 1093 HValue* right, | 1093 HValue* right, |
| 1094 Token::Value token, | 1094 Token::Value token); |
| 1095 Representation input_representation = Representation::Integer32()); | |
| 1096 | 1095 |
| 1097 HInstruction* IfCompareMap(HValue* left, Handle<Map> map); | 1096 HInstruction* IfCompareMap(HValue* left, Handle<Map> map); |
| 1098 | 1097 |
| 1099 template<class Condition> | 1098 template<class Condition> |
| 1100 HInstruction* If(HValue *p) { | 1099 HInstruction* If(HValue *p) { |
| 1101 HControlInstruction* compare = new(zone()) Condition(p); | 1100 HControlInstruction* compare = new(zone()) Condition(p); |
| 1102 AddCompare(compare); | 1101 AddCompare(compare); |
| 1103 return compare; | 1102 return compare; |
| 1104 } | 1103 } |
| 1105 | 1104 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1117 HBasicBlock* block0 = compare->SuccessorAt(0); | 1116 HBasicBlock* block0 = compare->SuccessorAt(0); |
| 1118 HBasicBlock* block1 = compare->SuccessorAt(1); | 1117 HBasicBlock* block1 = compare->SuccessorAt(1); |
| 1119 compare->SetSuccessorAt(0, block1); | 1118 compare->SetSuccessorAt(0, block1); |
| 1120 compare->SetSuccessorAt(1, block0); | 1119 compare->SetSuccessorAt(1, block0); |
| 1121 return compare; | 1120 return compare; |
| 1122 } | 1121 } |
| 1123 | 1122 |
| 1124 HInstruction* OrIfCompare( | 1123 HInstruction* OrIfCompare( |
| 1125 HValue* p1, | 1124 HValue* p1, |
| 1126 HValue* p2, | 1125 HValue* p2, |
| 1127 Token::Value token, | 1126 Token::Value token) { |
| 1128 Representation input_representation = Representation::Integer32()) { | |
| 1129 Or(); | 1127 Or(); |
| 1130 return IfCompare(p1, p2, token, input_representation); | 1128 return IfCompare(p1, p2, token); |
| 1131 } | 1129 } |
| 1132 | 1130 |
| 1133 HInstruction* OrIfCompareMap(HValue* left, Handle<Map> map) { | 1131 HInstruction* OrIfCompareMap(HValue* left, Handle<Map> map) { |
| 1134 Or(); | 1132 Or(); |
| 1135 return IfCompareMap(left, map); | 1133 return IfCompareMap(left, map); |
| 1136 } | 1134 } |
| 1137 | 1135 |
| 1138 template<class Condition> | 1136 template<class Condition> |
| 1139 HInstruction* OrIf(HValue *p) { | 1137 HInstruction* OrIf(HValue *p) { |
| 1140 Or(); | 1138 Or(); |
| 1141 return If<Condition>(p); | 1139 return If<Condition>(p); |
| 1142 } | 1140 } |
| 1143 | 1141 |
| 1144 template<class Condition, class P2> | 1142 template<class Condition, class P2> |
| 1145 HInstruction* OrIf(HValue* p1, P2 p2) { | 1143 HInstruction* OrIf(HValue* p1, P2 p2) { |
| 1146 Or(); | 1144 Or(); |
| 1147 return If<Condition>(p1, p2); | 1145 return If<Condition>(p1, p2); |
| 1148 } | 1146 } |
| 1149 | 1147 |
| 1150 HInstruction* AndIfCompare( | 1148 HInstruction* AndIfCompare( |
| 1151 HValue* p1, | 1149 HValue* p1, |
| 1152 HValue* p2, | 1150 HValue* p2, |
| 1153 Token::Value token, | 1151 Token::Value token) { |
| 1154 Representation input_representation = Representation::Integer32()) { | |
| 1155 And(); | 1152 And(); |
| 1156 return IfCompare(p1, p2, token, input_representation); | 1153 return IfCompare(p1, p2, token); |
| 1157 } | 1154 } |
| 1158 | 1155 |
| 1159 HInstruction* AndIfCompareMap(HValue* left, Handle<Map> map) { | 1156 HInstruction* AndIfCompareMap(HValue* left, Handle<Map> map) { |
| 1160 And(); | 1157 And(); |
| 1161 return IfCompareMap(left, map); | 1158 return IfCompareMap(left, map); |
| 1162 } | 1159 } |
| 1163 | 1160 |
| 1164 template<class Condition> | 1161 template<class Condition> |
| 1165 HInstruction* AndIf(HValue *p) { | 1162 HInstruction* AndIf(HValue *p) { |
| 1166 And(); | 1163 And(); |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 EmbeddedVector<char, 64> filename_; | 2031 EmbeddedVector<char, 64> filename_; |
| 2035 HeapStringAllocator string_allocator_; | 2032 HeapStringAllocator string_allocator_; |
| 2036 StringStream trace_; | 2033 StringStream trace_; |
| 2037 int indent_; | 2034 int indent_; |
| 2038 }; | 2035 }; |
| 2039 | 2036 |
| 2040 | 2037 |
| 2041 } } // namespace v8::internal | 2038 } } // namespace v8::internal |
| 2042 | 2039 |
| 2043 #endif // V8_HYDROGEN_H_ | 2040 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |