| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 | 7 |
| 8 #include "src/snapshot/code-serializer.h" | 8 #include "src/snapshot/code-serializer.h" |
| 9 #include "src/version.h" | 9 #include "src/version.h" |
| 10 #include "src/wasm/module-decoder.h" | 10 #include "src/wasm/module-decoder.h" |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 kMemorySectionCode, // -- | 908 kMemorySectionCode, // -- |
| 909 U32V_1(4), // section size | 909 U32V_1(4), // section size |
| 910 ENTRY_COUNT(1), // -- | 910 ENTRY_COUNT(1), // -- |
| 911 kResizableMaximumFlag, // -- | 911 kResizableMaximumFlag, // -- |
| 912 0, // initial size | 912 0, // initial size |
| 913 0, // maximum size | 913 0, // maximum size |
| 914 kDataSectionCode, // -- | 914 kDataSectionCode, // -- |
| 915 U32V_1(6), // section size | 915 U32V_1(6), // section size |
| 916 ENTRY_COUNT(1), // -- | 916 ENTRY_COUNT(1), // -- |
| 917 0, // linear memory index | 917 0, // linear memory index |
| 918 WASM_I32V_1(24), // destination offset | 918 WASM_I32V_1(0), // destination offset |
| 919 kExprEnd, | 919 kExprEnd, |
| 920 U32V_1(0), // source size | 920 U32V_1(0), // source size |
| 921 }; | 921 }; |
| 922 | 922 |
| 923 testing::CompileInstantiateWasmModuleForTesting(isolate, &thrower, data, | 923 testing::CompileInstantiateWasmModuleForTesting(isolate, &thrower, data, |
| 924 data + arraysize(data), | 924 data + arraysize(data), |
| 925 ModuleOrigin::kWasmOrigin); | 925 ModuleOrigin::kWasmOrigin); |
| 926 // It should be possible to instantiate this module. | 926 // It should be possible to instantiate this module. |
| 927 CHECK(!thrower.error()); | 927 CHECK(!thrower.error()); |
| 928 } | 928 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 950 ENTRY_COUNT(1), // -- | 950 ENTRY_COUNT(1), // -- |
| 951 0, // linear memory index | 951 0, // linear memory index |
| 952 WASM_I32V_4(0x2468ace), // destination offset | 952 WASM_I32V_4(0x2468ace), // destination offset |
| 953 kExprEnd, | 953 kExprEnd, |
| 954 U32V_1(0), // source size | 954 U32V_1(0), // source size |
| 955 }; | 955 }; |
| 956 | 956 |
| 957 testing::CompileInstantiateWasmModuleForTesting(isolate, &thrower, data, | 957 testing::CompileInstantiateWasmModuleForTesting(isolate, &thrower, data, |
| 958 data + arraysize(data), | 958 data + arraysize(data), |
| 959 ModuleOrigin::kWasmOrigin); | 959 ModuleOrigin::kWasmOrigin); |
| 960 // It should be possible to instantiate this module. | 960 // It should not be possible to instantiate this module. |
| 961 CHECK(!thrower.error()); | 961 CHECK(thrower.error()); |
| 962 } | 962 } |
| 963 Cleanup(); | 963 Cleanup(); |
| 964 } | 964 } |
| OLD | NEW |