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/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
10 | 10 |
(...skipping 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2859 } | 2859 } |
2860 | 2860 |
2861 void WasmGraphBuilder::SetSourcePosition(Node* node, | 2861 void WasmGraphBuilder::SetSourcePosition(Node* node, |
2862 wasm::WasmCodePosition position) { | 2862 wasm::WasmCodePosition position) { |
2863 DCHECK_NE(position, wasm::kNoCodePosition); | 2863 DCHECK_NE(position, wasm::kNoCodePosition); |
2864 compiler::SourcePosition pos(position); | 2864 compiler::SourcePosition pos(position); |
2865 if (source_position_table_) | 2865 if (source_position_table_) |
2866 source_position_table_->SetSourcePosition(node, pos); | 2866 source_position_table_->SetSourcePosition(node, pos); |
2867 } | 2867 } |
2868 | 2868 |
2869 Node* WasmGraphBuilder::DefaultS128Value() { | |
2870 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), | |
titzer
2016/08/23 13:06:40
Can you add a TODO that we should just introduce a
gdeepti
2016/08/23 19:53:34
I have a partical CL that introduces a Simd128Cons
| |
2871 Int32Constant(0), Int32Constant(0), Int32Constant(0), | |
2872 Int32Constant(0)); | |
2873 } | |
2874 | |
2869 Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode, | 2875 Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode, |
2870 const NodeVector& inputs) { | 2876 const NodeVector& inputs) { |
2871 switch (opcode) { | 2877 switch (opcode) { |
2872 case wasm::kExprI32x4ExtractLane: | 2878 case wasm::kExprI32x4ExtractLane: |
2873 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), | 2879 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), |
2874 inputs[0], inputs[1]); | 2880 inputs[0], inputs[1]); |
2875 case wasm::kExprI32x4Splat: | 2881 case wasm::kExprI32x4Splat: |
2876 return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), | 2882 return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0], |
2877 inputs[0], inputs[0], inputs[0], inputs[0]); | 2883 inputs[0], inputs[0], inputs[0]); |
2878 default: | 2884 default: |
2879 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); | 2885 return graph()->NewNode(UnsupportedOpcode(opcode), nullptr); |
2880 } | 2886 } |
2881 } | 2887 } |
2882 | 2888 |
2883 static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag, | 2889 static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag, |
2884 Isolate* isolate, Handle<Code> code, | 2890 Isolate* isolate, Handle<Code> code, |
2885 const char* message, uint32_t index, | 2891 const char* message, uint32_t index, |
2886 const wasm::WasmName& module_name, | 2892 const wasm::WasmName& module_name, |
2887 const wasm::WasmName& func_name) { | 2893 const wasm::WasmName& func_name) { |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3228 function_->code_start_offset), | 3234 function_->code_start_offset), |
3229 compile_ms); | 3235 compile_ms); |
3230 } | 3236 } |
3231 | 3237 |
3232 return code; | 3238 return code; |
3233 } | 3239 } |
3234 | 3240 |
3235 } // namespace compiler | 3241 } // namespace compiler |
3236 } // namespace internal | 3242 } // namespace internal |
3237 } // namespace v8 | 3243 } // namespace v8 |
OLD | NEW |