OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef WASM_RUN_UTILS_H | 5 #ifndef WASM_RUN_UTILS_H |
6 #define WASM_RUN_UTILS_H | 6 #define WASM_RUN_UTILS_H |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 parameters); | 380 parameters); |
381 | 381 |
382 effect = graph()->NewNode( | 382 effect = graph()->NewNode( |
383 machine()->Store( | 383 machine()->Store( |
384 StoreRepresentation(MachineTypeForC<ReturnType>().representation(), | 384 StoreRepresentation(MachineTypeForC<ReturnType>().representation(), |
385 WriteBarrierKind::kNoWriteBarrier)), | 385 WriteBarrierKind::kNoWriteBarrier)), |
386 graph()->NewNode(common()->Parameter(WASM_RUNNER_MAX_NUM_PARAMETERS), | 386 graph()->NewNode(common()->Parameter(WASM_RUNNER_MAX_NUM_PARAMETERS), |
387 graph()->start()), | 387 graph()->start()), |
388 graph()->NewNode(common()->Int32Constant(0)), call, effect, | 388 graph()->NewNode(common()->Int32Constant(0)), call, effect, |
389 graph()->start()); | 389 graph()->start()); |
| 390 Node* zero = graph()->NewNode(common()->Int32Constant(0)); |
390 Node* r = graph()->NewNode( | 391 Node* r = graph()->NewNode( |
391 common()->Return(), | 392 common()->Return(), zero, |
392 graph()->NewNode(common()->Int32Constant(WASM_WRAPPER_RETURN_VALUE)), | 393 graph()->NewNode(common()->Int32Constant(WASM_WRAPPER_RETURN_VALUE)), |
393 effect, graph()->start()); | 394 effect, graph()->start()); |
394 graph()->SetEnd(graph()->NewNode(common()->End(2), r, graph()->start())); | 395 graph()->SetEnd(graph()->NewNode(common()->End(2), r, graph()->start())); |
395 } | 396 } |
396 | 397 |
397 void SetInnerCode(Handle<Code> code_handle) { | 398 void SetInnerCode(Handle<Code> code_handle) { |
398 NodeProperties::ChangeOp(inner_code_node_, | 399 NodeProperties::ChangeOp(inner_code_node_, |
399 common()->HeapConstant(code_handle)); | 400 common()->HeapConstant(code_handle)); |
400 } | 401 } |
401 | 402 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 // interpreter. | 785 // interpreter. |
785 #define WASM_EXEC_TEST(name) \ | 786 #define WASM_EXEC_TEST(name) \ |
786 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 787 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
787 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 788 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
788 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 789 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
789 void RunWasm_##name(WasmExecutionMode execution_mode) | 790 void RunWasm_##name(WasmExecutionMode execution_mode) |
790 | 791 |
791 } // namespace | 792 } // namespace |
792 | 793 |
793 #endif | 794 #endif |
OLD | NEW |