OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 WASM_RUN_UTILS_H | 5 #ifndef WASM_RUN_UTILS_H |
6 #define WASM_RUN_UTILS_H | 6 #define WASM_RUN_UTILS_H |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
651 static size_t GetParameterCount(MachineType p0, MachineType p1, | 651 static size_t GetParameterCount(MachineType p0, MachineType p1, |
652 MachineType p2, MachineType p3) { | 652 MachineType p2, MachineType p3) { |
653 if (p0 == MachineType::None()) return 0; | 653 if (p0 == MachineType::None()) return 0; |
654 if (p1 == MachineType::None()) return 1; | 654 if (p1 == MachineType::None()) return 1; |
655 if (p2 == MachineType::None()) return 2; | 655 if (p2 == MachineType::None()) return 2; |
656 if (p3 == MachineType::None()) return 3; | 656 if (p3 == MachineType::None()) return 3; |
657 return 4; | 657 return 4; |
658 } | 658 } |
659 }; | 659 }; |
660 | 660 |
661 // A macro to define tests that run in different engine configurations. | |
662 // Currently only supports compiled tests, but a future | |
663 // RunWasmInterpreted_##name version will allow each test to also run in the | |
664 // interpreter. | |
665 #define WASM_EXEC_TEST(name) \ | |
666 void RunWasm_##name(); \ | |
667 TEST(RunWasmCompiled_##name) { RunWasm_##name(); } \ | |
ahaas
2016/05/18 15:43:26
Could we use shorter test names here? Maybe RunWas
| |
668 void RunWasm_##name() | |
669 | |
661 } // namespace | 670 } // namespace |
662 | 671 |
663 #endif | 672 #endif |
OLD | NEW |