OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_CCTEST_COMPILER_VALUE_HELPER_H_ | 5 #ifndef V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
6 #define V8_CCTEST_COMPILER_VALUE_HELPER_H_ | 6 #define V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 // Watch out, these macros aren't hygenic; they pollute your scope. Thanks STL. | 117 // Watch out, these macros aren't hygenic; they pollute your scope. Thanks STL. |
118 #define FOR_INPUTS(ctype, itype, var) \ | 118 #define FOR_INPUTS(ctype, itype, var) \ |
119 std::vector<ctype> var##_vec = ValueHelper::itype##_vector(); \ | 119 std::vector<ctype> var##_vec = ValueHelper::itype##_vector(); \ |
120 for (std::vector<ctype>::iterator var = var##_vec.begin(); \ | 120 for (std::vector<ctype>::iterator var = var##_vec.begin(); \ |
121 var != var##_vec.end(); ++var) | 121 var != var##_vec.end(); ++var) |
122 | 122 |
123 #define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var) | 123 #define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var) |
124 #define FOR_UINT32_INPUTS(var) FOR_INPUTS(uint32_t, uint32, var) | 124 #define FOR_UINT32_INPUTS(var) FOR_INPUTS(uint32_t, uint32, var) |
125 #define FOR_FLOAT64_INPUTS(var) FOR_INPUTS(double, float64, var) | 125 #define FOR_FLOAT64_INPUTS(var) FOR_INPUTS(double, float64, var) |
126 | 126 |
127 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) | |
Benedikt Meurer
2014/08/13 09:45:02
We don't need that, shift amount is always/automat
| |
128 | |
129 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) | |
130 | |
131 | |
127 } // namespace compiler | 132 } // namespace compiler |
128 } // namespace internal | 133 } // namespace internal |
129 } // namespace v8 | 134 } // namespace v8 |
130 | 135 |
131 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ | 136 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
OLD | NEW |