Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1 | // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "test/unittests/test-utils.h" |
| 6 | |
| 7 | #include "src/v8.h" |
| 8 | |
| 9 | #include "src/wasm/ast-decoder.h" |
| 10 | #include "src/wasm/encoder.h" |
| 11 | |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame^] | 12 | #include "test/cctest/wasm/test-signatures.h" |
| 13 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 14 | namespace v8 { |
| 15 | namespace internal { |
| 16 | namespace wasm { |
| 17 | |
| 18 | class EncoderTest : public TestWithZone { |
| 19 | protected: |
| 20 | void AddLocal(WasmFunctionBuilder* f, LocalType type) { |
| 21 | uint16_t index = f->AddLocal(type); |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame^] | 22 | f->EmitGetLocal(index); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 23 | } |
| 24 | }; |
| 25 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 26 | } // namespace wasm |
| 27 | } // namespace internal |
| 28 | } // namespace v8 |