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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 parameters); | 384 parameters); |
385 | 385 |
386 effect = graph()->NewNode( | 386 effect = graph()->NewNode( |
387 machine()->Store( | 387 machine()->Store( |
388 StoreRepresentation(MachineTypeForC<ReturnType>().representation(), | 388 StoreRepresentation(MachineTypeForC<ReturnType>().representation(), |
389 WriteBarrierKind::kNoWriteBarrier)), | 389 WriteBarrierKind::kNoWriteBarrier)), |
390 graph()->NewNode(common()->Parameter(WASM_RUNNER_MAX_NUM_PARAMETERS), | 390 graph()->NewNode(common()->Parameter(WASM_RUNNER_MAX_NUM_PARAMETERS), |
391 graph()->start()), | 391 graph()->start()), |
392 graph()->NewNode(common()->Int32Constant(0)), call, effect, | 392 graph()->NewNode(common()->Int32Constant(0)), call, effect, |
393 graph()->start()); | 393 graph()->start()); |
| 394 Node* zero = graph()->NewNode(common()->Int32Constant(0)); |
394 Node* r = graph()->NewNode( | 395 Node* r = graph()->NewNode( |
395 common()->Return(), | 396 common()->Return(), zero, |
396 graph()->NewNode(common()->Int32Constant(WASM_WRAPPER_RETURN_VALUE)), | 397 graph()->NewNode(common()->Int32Constant(WASM_WRAPPER_RETURN_VALUE)), |
397 effect, graph()->start()); | 398 effect, graph()->start()); |
398 graph()->SetEnd(graph()->NewNode(common()->End(2), r, graph()->start())); | 399 graph()->SetEnd(graph()->NewNode(common()->End(2), r, graph()->start())); |
399 } | 400 } |
400 | 401 |
401 void SetInnerCode(Handle<Code> code_handle) { | 402 void SetInnerCode(Handle<Code> code_handle) { |
402 NodeProperties::ChangeOp(inner_code_node_, | 403 NodeProperties::ChangeOp(inner_code_node_, |
403 common()->HeapConstant(code_handle)); | 404 common()->HeapConstant(code_handle)); |
404 } | 405 } |
405 | 406 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 // interpreter. | 789 // interpreter. |
789 #define WASM_EXEC_TEST(name) \ | 790 #define WASM_EXEC_TEST(name) \ |
790 void RunWasm_##name(WasmExecutionMode execution_mode); \ | 791 void RunWasm_##name(WasmExecutionMode execution_mode); \ |
791 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 792 TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |
792 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ | 793 TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ |
793 void RunWasm_##name(WasmExecutionMode execution_mode) | 794 void RunWasm_##name(WasmExecutionMode execution_mode) |
794 | 795 |
795 } // namespace | 796 } // namespace |
796 | 797 |
797 #endif | 798 #endif |
OLD | NEW |