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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 HInstruction* AddUncasted(P1 p1, P2 p2) { | 1051 HInstruction* AddUncasted(P1 p1, P2 p2) { |
1052 HInstruction* result = AddInstruction(NewUncasted<I>(p1, p2)); | 1052 HInstruction* result = AddInstruction(NewUncasted<I>(p1, p2)); |
1053 // Specializations must have their parameters properly casted | 1053 // Specializations must have their parameters properly casted |
1054 // to avoid landing here. | 1054 // to avoid landing here. |
1055 ASSERT(!result->IsSimulate()); | 1055 ASSERT(!result->IsSimulate()); |
1056 return result; | 1056 return result; |
1057 } | 1057 } |
1058 | 1058 |
1059 template<class I, class P1, class P2> | 1059 template<class I, class P1, class P2> |
1060 I* Add(P1 p1, P2 p2) { | 1060 I* Add(P1 p1, P2 p2) { |
1061 return static_cast<I*>(AddUncasted<I>(p1, p2)); | 1061 return I::cast(AddUncasted<I>(p1, p2)); |
1062 } | 1062 } |
1063 | 1063 |
1064 template<class I, class P1, class P2, class P3> | 1064 template<class I, class P1, class P2, class P3> |
1065 HInstruction* NewUncasted(P1 p1, P2 p2, P3 p3) { | 1065 HInstruction* NewUncasted(P1 p1, P2 p2, P3 p3) { |
1066 return I::New(zone(), context(), p1, p2, p3); | 1066 return I::New(zone(), context(), p1, p2, p3); |
1067 } | 1067 } |
1068 | 1068 |
1069 template<class I, class P1, class P2, class P3> | 1069 template<class I, class P1, class P2, class P3> |
1070 I* New(P1 p1, P2 p2, P3 p3) { | 1070 I* New(P1 p1, P2 p2, P3 p3) { |
1071 return I::cast(NewUncasted<I>(p1, p2, p3)); | 1071 return I::cast(NewUncasted<I>(p1, p2, p3)); |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2308 } | 2308 } |
2309 | 2309 |
2310 private: | 2310 private: |
2311 HGraphBuilder* builder_; | 2311 HGraphBuilder* builder_; |
2312 }; | 2312 }; |
2313 | 2313 |
2314 | 2314 |
2315 } } // namespace v8::internal | 2315 } } // namespace v8::internal |
2316 | 2316 |
2317 #endif // V8_HYDROGEN_H_ | 2317 #endif // V8_HYDROGEN_H_ |
OLD | NEW |