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

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

Issue 1213803008: [turbofan] Right hand side of shifts needs ToUint32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/compiler/opcodes.h ('k') | src/compiler/simplified-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_SIMPLIFIED_LOWERING_H_ 5 #ifndef V8_COMPILER_SIMPLIFIED_LOWERING_H_
6 #define V8_COMPILER_SIMPLIFIED_LOWERING_H_ 6 #define V8_COMPILER_SIMPLIFIED_LOWERING_H_
7 7
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
11 #include "src/compiler/simplified-operator.h" 11 #include "src/compiler/simplified-operator.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 namespace compiler { 15 namespace compiler {
16 16
17 // Forward declarations. 17 // Forward declarations.
18 class RepresentationChanger; 18 class RepresentationChanger;
19 class SourcePositionTable; 19 class SourcePositionTable;
20 20
21 class SimplifiedLowering final { 21 class SimplifiedLowering final {
22 public: 22 public:
23 SimplifiedLowering(JSGraph* jsgraph, Zone* zone, 23 SimplifiedLowering(JSGraph* jsgraph, Zone* zone,
24 SourcePositionTable* source_positions) 24 SourcePositionTable* source_positions);
25 : jsgraph_(jsgraph), zone_(zone), source_positions_(source_positions) {}
26 ~SimplifiedLowering() {} 25 ~SimplifiedLowering() {}
27 26
28 void LowerAllNodes(); 27 void LowerAllNodes();
29 28
30 // TODO(titzer): These are exposed for direct testing. Use a friend class. 29 // TODO(titzer): These are exposed for direct testing. Use a friend class.
31 void DoAllocate(Node* node); 30 void DoAllocate(Node* node);
32 void DoLoadField(Node* node); 31 void DoLoadField(Node* node);
33 void DoStoreField(Node* node); 32 void DoStoreField(Node* node);
34 // TODO(turbofan): The output_type can be removed once the result of the 33 // TODO(turbofan): The output_type can be removed once the result of the
35 // representation analysis is stored in the node bounds. 34 // representation analysis is stored in the node bounds.
36 void DoLoadBuffer(Node* node, MachineType output_type, 35 void DoLoadBuffer(Node* node, MachineType output_type,
37 RepresentationChanger* changer); 36 RepresentationChanger* changer);
38 void DoStoreBuffer(Node* node); 37 void DoStoreBuffer(Node* node);
39 void DoLoadElement(Node* node); 38 void DoLoadElement(Node* node);
40 void DoStoreElement(Node* node); 39 void DoStoreElement(Node* node);
40 void DoShift(Node* node, Operator const* op);
41 void DoStringEqual(Node* node); 41 void DoStringEqual(Node* node);
42 void DoStringLessThan(Node* node); 42 void DoStringLessThan(Node* node);
43 void DoStringLessThanOrEqual(Node* node); 43 void DoStringLessThanOrEqual(Node* node);
44 44
45 private: 45 private:
46 JSGraph* const jsgraph_; 46 JSGraph* const jsgraph_;
47 Zone* const zone_; 47 Zone* const zone_;
48 Type* const zero_thirtyone_range_;
48 49
49 // TODO(danno): SimplifiedLowering shouldn't know anything about the source 50 // TODO(danno): SimplifiedLowering shouldn't know anything about the source
50 // positions table, but must for now since there currently is no other way to 51 // positions table, but must for now since there currently is no other way to
51 // pass down source position information to nodes created during 52 // pass down source position information to nodes created during
52 // lowering. Once this phase becomes a vanilla reducer, it should get source 53 // lowering. Once this phase becomes a vanilla reducer, it should get source
53 // position information via the SourcePositionWrapper like all other reducers. 54 // position information via the SourcePositionWrapper like all other reducers.
54 SourcePositionTable* source_positions_; 55 SourcePositionTable* source_positions_;
55 56
56 Node* SmiTag(Node* node); 57 Node* SmiTag(Node* node);
57 Node* IsTagged(Node* node); 58 Node* IsTagged(Node* node);
(...skipping 13 matching lines...) Expand all
71 Graph* graph() { return jsgraph()->graph(); } 72 Graph* graph() { return jsgraph()->graph(); }
72 CommonOperatorBuilder* common() { return jsgraph()->common(); } 73 CommonOperatorBuilder* common() { return jsgraph()->common(); }
73 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } 74 MachineOperatorBuilder* machine() { return jsgraph()->machine(); }
74 }; 75 };
75 76
76 } // namespace compiler 77 } // namespace compiler
77 } // namespace internal 78 } // namespace internal
78 } // namespace v8 79 } // namespace v8
79 80
80 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ 81 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698