| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 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 #include "test/unittests/test-utils.h" | 5 #include "test/unittests/test-utils.h" |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "test/cctest/wasm/test-signatures.h" | 9 #include "test/cctest/wasm/test-signatures.h" |
| 10 | 10 |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 return static_cast<byte>(mod.signatures.size() - 1); | 1170 return static_cast<byte>(mod.signatures.size() - 1); |
| 1171 } | 1171 } |
| 1172 byte AddFunction(FunctionSig* sig) { | 1172 byte AddFunction(FunctionSig* sig) { |
| 1173 mod.functions.push_back({sig, // sig | 1173 mod.functions.push_back({sig, // sig |
| 1174 0, // func_index | 1174 0, // func_index |
| 1175 0, // sig_index | 1175 0, // sig_index |
| 1176 0, // name_offset | 1176 0, // name_offset |
| 1177 0, // name_length | 1177 0, // name_length |
| 1178 0, // code_start_offset | 1178 0, // code_start_offset |
| 1179 0, // code_end_offset | 1179 0, // code_end_offset |
| 1180 0, // local_i32_count | |
| 1181 0, // local_i64_count | |
| 1182 0, // local_f32_count | |
| 1183 0, // local_f64_count | |
| 1184 false}); // exported | 1180 false}); // exported |
| 1185 CHECK(mod.functions.size() <= 127); | 1181 CHECK(mod.functions.size() <= 127); |
| 1186 return static_cast<byte>(mod.functions.size() - 1); | 1182 return static_cast<byte>(mod.functions.size() - 1); |
| 1187 } | 1183 } |
| 1188 byte AddImport(FunctionSig* sig) { | 1184 byte AddImport(FunctionSig* sig) { |
| 1189 mod.import_table.push_back({sig, // sig | 1185 mod.import_table.push_back({sig, // sig |
| 1190 0, // sig_index | 1186 0, // sig_index |
| 1191 0, // module_name_offset | 1187 0, // module_name_offset |
| 1192 0, // module_name_length | 1188 0, // module_name_length |
| 1193 0, // function_name_offset | 1189 0, // function_name_offset |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2441 size_t pos = 0; | 2437 size_t pos = 0; |
| 2442 pos = ExpectRun(map, pos, kAstF32, 5); | 2438 pos = ExpectRun(map, pos, kAstF32, 5); |
| 2443 pos = ExpectRun(map, pos, kAstI32, 1337); | 2439 pos = ExpectRun(map, pos, kAstI32, 1337); |
| 2444 pos = ExpectRun(map, pos, kAstI64, 212); | 2440 pos = ExpectRun(map, pos, kAstI64, 212); |
| 2445 delete[] data; | 2441 delete[] data; |
| 2446 } | 2442 } |
| 2447 | 2443 |
| 2448 } // namespace wasm | 2444 } // namespace wasm |
| 2449 } // namespace internal | 2445 } // namespace internal |
| 2450 } // namespace v8 | 2446 } // namespace v8 |
| OLD | NEW |