24 switch (node->opcode()) {
25 case IrOpcode::kJSLoadContext: {
27 if (r.Changed() && r.replacement() != node) {
29 node->RemoveAllInputs();
33 case IrOpcode::kJSStoreContext: {
35 if (r.Changed() && r.replacement() != node) {
37 node->RemoveAllInputs();
62 DCHECK_EQ(IrOpcode::kJSLoadContext, node->opcode());
73 Context* context = *m.Value().handle();
74 for (
int i = access.
depth();
i > 0; --
i) {
81 if (access.
depth() == 0) {
98 if (value->IsUndefined() || value->IsTheHole()) {
110 DCHECK_EQ(IrOpcode::kJSStoreContext, node->opcode());
121 if (access.
depth() == 0) {
126 Context* context = *m.Value().handle();
127 for (
int i = access.
depth();
i > 0; --
i) {
Handle< Context > context() const
Isolate * isolate() const
JSContextSpecializer * spec_
GenericGraphVisit::Control Post(Node *node)
ContextSpecializationVisitor(JSContextSpecializer *spec)
void VisitNodeInputsFromEnd(Visitor *visitor)
void SpecializeToContext()
Reduction ReduceJSStoreContext(Node *node)
Reduction ReduceJSLoadContext(Node *node)
JSOperatorBuilder * javascript()
Node * Constant(Handle< Object > value)
const Operator * LoadContext(uint16_t depth, uint32_t index, bool immutable)
const Operator * StoreContext(uint16_t depth, uint32_t index)
static void ReplaceWithValue(Node *node, Node *value, Node *effect=NULL)
static Node * GetValueInput(Node *node, int index)
static Reduction Replace(Node *node)
static Reduction Changed(Node *node)
static Reduction NoChange()
#define DCHECK_EQ(v1, v2)
Debugger support for the V8 JavaScript engine.