| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 TestingModule module; | 199 TestingModule module; |
| 200 WasmFunctionCompiler t(&sig, &module); | 200 WasmFunctionCompiler t(&sig, &module); |
| 201 if (i == 2 || i == 3) { | 201 if (i == 2 || i == 3) { |
| 202 continue; | 202 continue; |
| 203 } else { | 203 } else { |
| 204 BUILD(t, WASM_GET_LOCAL(i)); | 204 BUILD(t, WASM_GET_LOCAL(i)); |
| 205 } | 205 } |
| 206 uint32_t index = t.CompileAndAdd(); | 206 uint32_t index = t.CompileAndAdd(); |
| 207 | 207 |
| 208 // Build the calling function. | 208 // Build the calling function. |
| 209 WasmRunner<int32_t> r; | 209 WasmRunner<int32_t> r(&module); |
| 210 r.env()->module = &module; | |
| 211 BUILD( | 210 BUILD( |
| 212 r, | 211 r, |
| 213 WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION( | 212 WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION( |
| 214 index, WASM_I64V_9(0xbcd12340000000b), | 213 index, WASM_I64V_9(0xbcd12340000000b), |
| 215 WASM_I64V_9(0xbcd12340000000c), WASM_I32V_1(0xd), | 214 WASM_I64V_9(0xbcd12340000000c), WASM_I32V_1(0xd), |
| 216 WASM_I32_CONVERT_I64(WASM_I64V_9(0xbcd12340000000e)), | 215 WASM_I32_CONVERT_I64(WASM_I64V_9(0xbcd12340000000e)), |
| 217 WASM_I64V_9(0xbcd12340000000f), WASM_I64V_10(0xbcd1234000000010), | 216 WASM_I64V_9(0xbcd12340000000f), WASM_I64V_10(0xbcd1234000000010), |
| 218 WASM_I64V_10(0xbcd1234000000011), WASM_I64V_10(0xbcd1234000000012), | 217 WASM_I64V_10(0xbcd1234000000011), WASM_I64V_10(0xbcd1234000000012), |
| 219 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014), | 218 WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014), |
| 220 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016), | 219 WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016), |
| 221 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018), | 220 WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018), |
| 222 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a), | 221 WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a), |
| 223 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c), | 222 WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c), |
| 224 WASM_I64V_10(0xbcd123400000001d)))); | 223 WASM_I64V_10(0xbcd123400000001d)))); |
| 225 | 224 |
| 226 CHECK_EQ(i + 0xb, r.Call()); | 225 CHECK_EQ(i + 0xb, r.Call()); |
| 227 } | 226 } |
| 228 } | 227 } |
| OLD | NEW |