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

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

Issue 768543002: [WIP] TrapHandler 2014/11/27. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/pipeline.cc ('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 class SimplifiedLowering FINAL { 17 class SimplifiedLowering FINAL {
18 public: 18 public:
19 explicit SimplifiedLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {} 19 explicit SimplifiedLowering(JSGraph* jsgraph)
20 : jsgraph_(jsgraph), simplified_(jsgraph->zone()) {}
20 ~SimplifiedLowering() {} 21 ~SimplifiedLowering() {}
21 22
22 void LowerAllNodes(); 23 void LowerAllNodes();
23 24
24 // TODO(titzer): These are exposed for direct testing. Use a friend class. 25 // TODO(titzer): These are exposed for direct testing. Use a friend class.
25 void DoLoadField(Node* node); 26 void DoLoadField(Node* node);
26 void DoStoreField(Node* node); 27 void DoStoreField(Node* node);
28 void DoLoadElement(Node* node);
29 void DoStoreElement(Node* node);
27 // TODO(turbofan): The output_type can be removed once the result of the 30 // TODO(turbofan): The output_type can be removed once the result of the
28 // representation analysis is stored in the node bounds. 31 // representation analysis is stored in the node bounds.
29 void DoLoadElement(Node* node, MachineType output_type); 32 void DoLoadBuffer(Node* node, MachineType output_type);
30 void DoStoreElement(Node* node); 33 void DoStoreBuffer(Node* node);
31 void DoStringAdd(Node* node); 34 void DoStringAdd(Node* node);
32 void DoStringEqual(Node* node); 35 void DoStringEqual(Node* node);
33 void DoStringLessThan(Node* node); 36 void DoStringLessThan(Node* node);
34 void DoStringLessThanOrEqual(Node* node); 37 void DoStringLessThanOrEqual(Node* node);
35 38
36 private: 39 private:
37 JSGraph* jsgraph_; 40 JSGraph* jsgraph_;
41 SimplifiedOperatorBuilder simplified_;
38 42
39 Node* SmiTag(Node* node); 43 Node* SmiTag(Node* node);
40 Node* IsTagged(Node* node); 44 Node* IsTagged(Node* node);
41 Node* Untag(Node* node); 45 Node* Untag(Node* node);
42 Node* OffsetMinusTagConstant(int32_t offset); 46 Node* OffsetMinusTagConstant(int32_t offset);
43 Node* ComputeIndex(const ElementAccess& access, Node* const key); 47 Node* ComputeIndex(const ElementAccess&, Node*);
48 Node* ComputeOffset(const BufferAccess&, Node*);
44 Node* StringComparison(Node* node, bool requires_ordering); 49 Node* StringComparison(Node* node, bool requires_ordering);
45 Node* Int32Div(Node* const node); 50 Node* Int32Div(Node* const node);
46 Node* Int32Mod(Node* const node); 51 Node* Int32Mod(Node* const node);
47 Node* Uint32Div(Node* const node); 52 Node* Uint32Div(Node* const node);
48 Node* Uint32Mod(Node* const node); 53 Node* Uint32Mod(Node* const node);
49 54
50 friend class RepresentationSelector; 55 friend class RepresentationSelector;
51 56
52 Zone* zone() { return jsgraph_->zone(); } 57 Zone* zone() { return jsgraph_->zone(); }
53 JSGraph* jsgraph() { return jsgraph_; } 58 JSGraph* jsgraph() { return jsgraph_; }
54 Graph* graph() { return jsgraph()->graph(); } 59 Graph* graph() { return jsgraph()->graph(); }
55 CommonOperatorBuilder* common() { return jsgraph()->common(); } 60 CommonOperatorBuilder* common() { return jsgraph()->common(); }
56 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } 61 MachineOperatorBuilder* machine() { return jsgraph()->machine(); }
62 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
57 }; 63 };
58 64
59 } // namespace compiler 65 } // namespace compiler
60 } // namespace internal 66 } // namespace internal
61 } // namespace v8 67 } // namespace v8
62 68
63 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_ 69 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698