| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "src/wasm/wasm-macro-gen.h" | 9 #include "src/wasm/wasm-macro-gen.h" |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 TestingModule module; | 166 TestingModule module; |
| 167 WasmFunctionCompiler t(&sig, &module); | 167 WasmFunctionCompiler t(&sig, &module); |
| 168 if (i == 2 || i == 3) { | 168 if (i == 2 || i == 3) { |
| 169 continue; | 169 continue; |
| 170 } else { | 170 } else { |
| 171 BUILD(t, WASM_GET_LOCAL(i)); | 171 BUILD(t, WASM_GET_LOCAL(i)); |
| 172 } | 172 } |
| 173 uint32_t index = t.CompileAndAdd(); | 173 uint32_t index = t.CompileAndAdd(); |
| 174 | 174 |
| 175 // Build the calling function. | 175 // Build the calling function. |
| 176 WasmRunner<int32_t> r; | 176 WasmRunner<int32_t> r(&module); |
| 177 r.env()->module = &module; | |
| 178 BUILD(r, | 177 BUILD(r, |
| 179 WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION( | 178 WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION( |
| 180 index, WASM_I64(0xbcd12340000000b), WASM_I64(0xbcd12340000000c), | 179 index, WASM_I64(0xbcd12340000000b), WASM_I64(0xbcd12340000000c), |
| 181 WASM_I32(0xd), WASM_I32_CONVERT_I64(WASM_I64(0xbcd12340000000e)), | 180 WASM_I32(0xd), WASM_I32_CONVERT_I64(WASM_I64(0xbcd12340000000e)), |
| 182 WASM_I64(0xbcd12340000000f), WASM_I64(0xbcd1234000000010), | 181 WASM_I64(0xbcd12340000000f), WASM_I64(0xbcd1234000000010), |
| 183 WASM_I64(0xbcd1234000000011), WASM_I64(0xbcd1234000000012), | 182 WASM_I64(0xbcd1234000000011), WASM_I64(0xbcd1234000000012), |
| 184 WASM_I64(0xbcd1234000000013), WASM_I64(0xbcd1234000000014), | 183 WASM_I64(0xbcd1234000000013), WASM_I64(0xbcd1234000000014), |
| 185 WASM_I64(0xbcd1234000000015), WASM_I64(0xbcd1234000000016), | 184 WASM_I64(0xbcd1234000000015), WASM_I64(0xbcd1234000000016), |
| 186 WASM_I64(0xbcd1234000000017), WASM_I64(0xbcd1234000000018), | 185 WASM_I64(0xbcd1234000000017), WASM_I64(0xbcd1234000000018), |
| 187 WASM_I64(0xbcd1234000000019), WASM_I64(0xbcd123400000001a), | 186 WASM_I64(0xbcd1234000000019), WASM_I64(0xbcd123400000001a), |
| 188 WASM_I64(0xbcd123400000001b), WASM_I64(0xbcd123400000001c), | 187 WASM_I64(0xbcd123400000001b), WASM_I64(0xbcd123400000001c), |
| 189 WASM_I64(0xbcd123400000001d)))); | 188 WASM_I64(0xbcd123400000001d)))); |
| 190 | 189 |
| 191 CHECK_EQ(i + 0xb, r.Call()); | 190 CHECK_EQ(i + 0xb, r.Call()); |
| 192 } | 191 } |
| 193 } | 192 } |
| OLD | NEW |