V8 Project
simplified-lowering.h
Go to the documentation of this file.
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
3 // found in the LICENSE file.
4 
5 #ifndef V8_COMPILER_SIMPLIFIED_LOWERING_H_
6 #define V8_COMPILER_SIMPLIFIED_LOWERING_H_
7 
10 #include "src/compiler/node.h"
12 
13 namespace v8 {
14 namespace internal {
15 namespace compiler {
16 
18  public:
20  virtual ~SimplifiedLowering() {}
21 
22  void LowerAllNodes();
23 
24  // TODO(titzer): These are exposed for direct testing. Use a friend class.
25  void DoLoadField(Node* node);
26  void DoStoreField(Node* node);
27  void DoLoadElement(Node* node);
28  void DoStoreElement(Node* node);
29  void DoStringAdd(Node* node);
30  void DoStringEqual(Node* node);
31  void DoStringLessThan(Node* node);
32  void DoStringLessThanOrEqual(Node* node);
33 
34  private:
36 
37  Node* SmiTag(Node* node);
38  Node* IsTagged(Node* node);
39  Node* Untag(Node* node);
40  Node* OffsetMinusTagConstant(int32_t offset);
41  Node* ComputeIndex(const ElementAccess& access, Node* index);
42  Node* StringComparison(Node* node, bool requires_ordering);
43 
44  friend class RepresentationSelector;
45 
46  Zone* zone() { return jsgraph_->zone(); }
47  JSGraph* jsgraph() { return jsgraph_; }
48  Graph* graph() { return jsgraph()->graph(); }
49  CommonOperatorBuilder* common() { return jsgraph()->common(); }
50  MachineOperatorBuilder* machine() { return jsgraph()->machine(); }
51 };
52 
53 } // namespace compiler
54 } // namespace internal
55 } // namespace v8
56 
57 #endif // V8_COMPILER_SIMPLIFIED_LOWERING_H_
MachineOperatorBuilder * machine()
Definition: js-graph.h:88
CommonOperatorBuilder * common()
Definition: js-graph.h:87
Node * ComputeIndex(const ElementAccess &access, Node *index)
Node * StringComparison(Node *node, bool requires_ordering)
int int32_t
Definition: unicode.cc:24
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20