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 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2842 } else if (Int64Lowering::IsI64AsTwoParameters(jsgraph()->machine(), | 2842 } else if (Int64Lowering::IsI64AsTwoParameters(jsgraph()->machine(), |
2843 sig->GetReturn())) { | 2843 sig->GetReturn())) { |
2844 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(wasm::kWasmI32); | 2844 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(wasm::kWasmI32); |
2845 Node* lower = | 2845 Node* lower = |
2846 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, | 2846 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, |
2847 Int32Constant(0), *effect_, *control_); | 2847 Int32Constant(0), *effect_, *control_); |
2848 Node* upper = | 2848 Node* upper = |
2849 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, | 2849 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, |
2850 Int32Constant(sizeof(int32_t)), lower, *control_); | 2850 Int32Constant(sizeof(int32_t)), lower, *control_); |
2851 *effect_ = upper; | 2851 *effect_ = upper; |
2852 #if defined(V8_TARGET_LITTLE_ENDIAN) | |
Clemens Hammacher
2017/03/21 08:36:10
Instead of introducing another "#if defined(...)",
rayb
2017/03/22 17:21:47
Done.
| |
2852 Return(lower, upper); | 2853 Return(lower, upper); |
2854 #elif defined(V8_TARGET_BIG_ENDIAN) | |
2855 Return(upper, lower); | |
2856 #endif | |
2853 } else { | 2857 } else { |
2854 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(sig->GetReturn()); | 2858 MachineType load_rep = wasm::WasmOpcodes::MachineTypeFor(sig->GetReturn()); |
2855 Node* val = | 2859 Node* val = |
2856 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, | 2860 graph()->NewNode(jsgraph()->machine()->Load(load_rep), arg_buffer, |
2857 Int32Constant(0), *effect_, *control_); | 2861 Int32Constant(0), *effect_, *control_); |
2858 Return(val); | 2862 Return(val); |
2859 } | 2863 } |
2860 } | 2864 } |
2861 | 2865 |
2862 Node* WasmGraphBuilder::MemBuffer(uint32_t offset) { | 2866 Node* WasmGraphBuilder::MemBuffer(uint32_t offset) { |
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4057 wasm::ErrorThrower* thrower, Isolate* isolate, | 4061 wasm::ErrorThrower* thrower, Isolate* isolate, |
4058 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { | 4062 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { |
4059 WasmCompilationUnit unit(isolate, module_env, function); | 4063 WasmCompilationUnit unit(isolate, module_env, function); |
4060 unit.ExecuteCompilation(); | 4064 unit.ExecuteCompilation(); |
4061 return unit.FinishCompilation(thrower); | 4065 return unit.FinishCompilation(thrower); |
4062 } | 4066 } |
4063 | 4067 |
4064 } // namespace compiler | 4068 } // namespace compiler |
4065 } // namespace internal | 4069 } // namespace internal |
4066 } // namespace v8 | 4070 } // namespace v8 |
OLD | NEW |