Home | History | Annotate | Download | only in compiler

Lines Matching refs:node

10 #include "src/compiler/node-matchers.h"
11 #include "src/compiler/node-properties.h"
19 Reduction JSContextSpecialization::Reduce(Node* node) {
20 switch (node->opcode()) {
22 return ReduceJSLoadContext(node);
24 return ReduceJSStoreContext(node);
31 Reduction JSContextSpecialization::SimplifyJSLoadContext(Node* node,
32 Node* new_context,
34 DCHECK_EQ(IrOpcode::kJSLoadContext, node->opcode());
35 const ContextAccess& access = ContextAccessOf(node->op());
39 new_context == NodeProperties::GetContextInput(node)) {
45 NodeProperties::ReplaceContextInput(node, new_context);
46 NodeProperties::ChangeOp(node, op);
47 return Changed(node);
50 Reduction JSContextSpecialization::SimplifyJSStoreContext(Node* node,
51 Node* new_context,
53 DCHECK_EQ(IrOpcode::kJSStoreContext, node->opcode());
54 const ContextAccess& access = ContextAccessOf(node->op());
58 new_context == NodeProperties::GetContextInput(node)) {
64 NodeProperties::ReplaceContextInput(node, new_context);
65 NodeProperties::ChangeOp(node, op);
66 return Changed(node);
69 Reduction JSContextSpecialization::ReduceJSLoadContext(Node* node) {
70 DCHECK_EQ(IrOpcode::kJSLoadContext, node->opcode());
72 const ContextAccess& access = ContextAccessOf(node->op());
76 Node* outer = NodeProperties::GetOuterContext(node, &depth);
82 // the load by folding-in the outer context node.
83 return SimplifyJSLoadContext(node, outer, depth);
94 return SimplifyJSLoadContext(node, jsgraph()->Constant(concrete), depth);
105 return SimplifyJSLoadContext(node, jsgraph()->Constant(concrete), depth);
111 Node* constant = jsgraph_->Constant(value);
112 ReplaceWithValue(node, constant);
117 Reduction JSContextSpecialization::ReduceJSStoreContext(Node* node) {
118 DCHECK_EQ(IrOpcode::kJSStoreContext, node->opcode());
120 const ContextAccess& access = ContextAccessOf(node->op());
124 // or hit a node that does not have a CreateXYZContext operator.
125 Node* outer = NodeProperties::GetOuterContext(node, &depth);
131 // the load by folding-in the outer context node.
132 return SimplifyJSStoreContext(node, outer, depth);
140 return SimplifyJSStoreContext(node, jsgraph()->Constant(concrete), depth);