Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: src/compiler/int64-lowering.h

Issue 1704033002: [wasm] WasmRunner can run tests with I64 parameters and return value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@new_wasm_runner
Patch Set: remove DCHECK Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/int64-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 V8_COMPILER_INT64_REDUCER_H_ 5 #ifndef V8_COMPILER_INT64_REDUCER_H_
6 #define V8_COMPILER_INT64_REDUCER_H_ 6 #define V8_COMPILER_INT64_REDUCER_H_
7 7
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
11 #include "src/compiler/node-marker.h" 11 #include "src/compiler/node-marker.h"
12 #include "src/zone-containers.h" 12 #include "src/zone-containers.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 namespace compiler { 16 namespace compiler {
17 17
18 class Int64Lowering { 18 class Int64Lowering {
19 public: 19 public:
20 Int64Lowering(Graph* graph, MachineOperatorBuilder* machine, 20 Int64Lowering(Graph* graph, MachineOperatorBuilder* machine,
21 CommonOperatorBuilder* common, Zone* zone); 21 CommonOperatorBuilder* common, Zone* zone,
22 Signature<MachineRepresentation>* signature);
22 23
23 void ReduceGraph(); 24 void LowerGraph();
24 Graph* graph() const { return graph_; }
25 MachineOperatorBuilder* machine() const { return machine_; }
26 CommonOperatorBuilder* common() const { return common_; }
27 25
28 private: 26 private:
29 enum class State : uint8_t { kUnvisited, kOnStack, kInputsPushed, kVisited }; 27 enum class State : uint8_t { kUnvisited, kOnStack, kInputsPushed, kVisited };
30 28
31 struct Replacement { 29 struct Replacement {
32 Node* low; 30 Node* low;
33 Node* high; 31 Node* high;
34 }; 32 };
35 33
36 void ReduceTop(); 34 Zone* zone() const { return zone_; }
37 void ReduceNode(Node* node); 35 Graph* graph() const { return graph_; }
36 MachineOperatorBuilder* machine() const { return machine_; }
37 CommonOperatorBuilder* common() const { return common_; }
38 Signature<MachineRepresentation>* signature() const { return signature_; }
38 39
40 void LowerNode(Node* node);
41 bool DefaultLowering(Node* node);
42
43 void ReplaceNode(Node* old, Node* new_low, Node* new_high);
44 bool HasReplacementLow(Node* node);
45 Node* GetReplacementLow(Node* node);
46 bool HasReplacementHigh(Node* node);
47 Node* GetReplacementHigh(Node* node);
48
49 Zone* zone_;
39 Graph* const graph_; 50 Graph* const graph_;
40 MachineOperatorBuilder* machine_; 51 MachineOperatorBuilder* machine_;
41 CommonOperatorBuilder* common_; 52 CommonOperatorBuilder* common_;
42 NodeMarker<State> state_; 53 NodeMarker<State> state_;
43 ZoneStack<Node*> stack_; 54 ZoneStack<Node*> stack_;
44 Replacement* replacements_; 55 Replacement* replacements_;
56 Signature<MachineRepresentation>* signature_;
45 }; 57 };
46 58
47 } // namespace compiler 59 } // namespace compiler
48 } // namespace internal 60 } // namespace internal
49 } // namespace v8 61 } // namespace v8
50 62
51 #endif // V8_COMPILER_INT64_REDUCER_H_ 63 #endif // V8_COMPILER_INT64_REDUCER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/int64-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698