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 "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2813 arraysize(parameters), effect_, *control_); | 2813 arraysize(parameters), effect_, *control_); |
2814 | 2814 |
2815 // Read back the return value. | 2815 // Read back the return value. |
2816 if (sig->return_count() == 0) { | 2816 if (sig->return_count() == 0) { |
2817 Return(Int32Constant(0)); | 2817 Return(Int32Constant(0)); |
2818 } else if (Int64Lowering::IsI64AsTwoParameters(jsgraph()->machine(), | 2818 } else if (Int64Lowering::IsI64AsTwoParameters(jsgraph()->machine(), |
2819 sig->GetReturn())) { | 2819 sig->GetReturn())) { |
2820 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(wasm::kWasmI32); | 2820 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(wasm::kWasmI32); |
2821 Node* lower = | 2821 Node* lower = |
2822 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, | 2822 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, |
2823 Int32Constant(0), *effect_, *control_); | 2823 Int32Constant(kInt64LowerHalfMemoryOffset), *effect_, |
| 2824 *control_); |
2824 Node* upper = | 2825 Node* upper = |
2825 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, | 2826 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, |
2826 Int32Constant(sizeof(int32_t)), lower, *control_); | 2827 Int32Constant(kInt64UpperHalfMemoryOffset), lower, |
| 2828 *control_); |
2827 *effect_ = upper; | 2829 *effect_ = upper; |
2828 Return(lower, upper); | 2830 Return(lower, upper); |
2829 } else { | 2831 } else { |
2830 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(sig->GetReturn()); | 2832 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(sig->GetReturn()); |
2831 Node* val = | 2833 Node* val = |
2832 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, | 2834 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, |
2833 Int32Constant(0), *effect_, *control_); | 2835 Int32Constant(0), *effect_, *control_); |
2834 Return(val); | 2836 Return(val); |
2835 } | 2837 } |
2836 } | 2838 } |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4033 wasm::ErrorThrower* thrower, Isolate* isolate, | 4035 wasm::ErrorThrower* thrower, Isolate* isolate, |
4034 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { | 4036 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { |
4035 WasmCompilationUnit unit(isolate, module_env, function); | 4037 WasmCompilationUnit unit(isolate, module_env, function); |
4036 unit.ExecuteCompilation(); | 4038 unit.ExecuteCompilation(); |
4037 return unit.FinishCompilation(thrower); | 4039 return unit.FinishCompilation(thrower); |
4038 } | 4040 } |
4039 | 4041 |
4040 } // namespace compiler | 4042 } // namespace compiler |
4041 } // namespace internal | 4043 } // namespace internal |
4042 } // namespace v8 | 4044 } // namespace v8 |
OLD | NEW |