• Home
  • Raw
  • Download

Lines Matching refs:gate

28 GateRef LexicalEnvSpecializationPass::VisitDependEntry(GateRef gate)  in VisitDependEntry()  argument
31 return UpdateDependChain(gate, empty); in VisitDependEntry()
34 GateRef LexicalEnvSpecializationPass::VisitGate(GateRef gate) in VisitGate() argument
36 auto opcode = acc_.GetOpCode(gate); in VisitGate()
39 EcmaOpcode ecmaOpcode = acc_.GetByteCodeOpcode(gate); in VisitGate()
41 return TrySpecializeLdLexVar(gate); in VisitGate()
43 return VisitOther(gate); in VisitGate()
46 return VisitDependSelector(gate); in VisitGate()
48 if (acc_.GetDependCount(gate) == 1) { // 1: depend in is 1 in VisitGate()
49 return VisitOther(gate); in VisitGate()
55 GateRef LexicalEnvSpecializationPass::VisitOther(GateRef gate) in VisitOther() argument
57 ASSERT(acc_.GetDependCount(gate) >= 1); in VisitOther()
58 auto depIn = acc_.GetDep(gate); in VisitOther()
63 dependChain = dependChain->UpdateNode(gate); in VisitOther()
64 return UpdateDependChain(gate, dependChain); in VisitOther()
67 GateRef LexicalEnvSpecializationPass::VisitDependSelector(GateRef gate) in VisitDependSelector() argument
69 auto state = acc_.GetState(gate); in VisitDependSelector()
72 return VisitOther(gate); in VisitDependSelector()
75 auto dependCount = acc_.GetDependCount(gate); in VisitDependSelector()
77 auto depend = acc_.GetDep(gate, i); in VisitDependSelector()
85 auto depend = acc_.GetDep(gate); in VisitDependSelector()
90 auto dependIn = acc_.GetDep(gate, i); in VisitDependSelector()
94 HasNotdomStLexVarOrCall(gate, copy->GetHeadGate()); in VisitDependSelector()
95 return UpdateDependChain(gate, copy); in VisitDependSelector()
98 GateRef LexicalEnvSpecializationPass::UpdateDependChain(GateRef gate, DependChains* dependChain) in UpdateDependChain() argument
101 auto oldDependChain = GetDependChain(gate); in UpdateDependChain()
105 dependChains_[acc_.GetId(gate)] = dependChain; in UpdateDependChain()
106 return gate; in UpdateDependChain()
109 GateRef LexicalEnvSpecializationPass::TrySpecializeLdLexVar(GateRef gate) in TrySpecializeLdLexVar() argument
111 ASSERT(acc_.GetDependCount(gate) == 1); in TrySpecializeLdLexVar()
112 auto depIn = acc_.GetDep(gate); in TrySpecializeLdLexVar()
118 auto stlexvarGate = LookupStLexvarNode(dependChain, gate); in TrySpecializeLdLexVar()
124 dependChain = dependChain->UpdateNode(gate); in TrySpecializeLdLexVar()
125 return UpdateDependChain(gate, dependChain); in TrySpecializeLdLexVar()
128 bool LexicalEnvSpecializationPass::SearchStLexVar(GateRef gate, GateRef ldLexVar, GateRef &result) in SearchStLexVar() argument
130 if (HasNotDomIllegalOp(gate)) { in SearchStLexVar()
135 if (acc_.GetOpCode(gate) != OpCode::JS_BYTECODE) { in SearchStLexVar()
139 EcmaOpcode ecmaOpcode = acc_.GetByteCodeOpcode(gate); in SearchStLexVar()
141 if (CheckStLexVar(gate, ldLexVar)) { in SearchStLexVar()
142 result = gate; in SearchStLexVar()
157 bool LexicalEnvSpecializationPass::CheckStLexVar(GateRef gate, GateRef ldldLexVar) in CheckStLexVar() argument
162 int32_t stLevel = acc_.TryGetValue(acc_.GetValueIn(gate, 0)); in CheckStLexVar()
163 int32_t stSlot = acc_.TryGetValue(acc_.GetValueIn(gate, 1)); // 1: slot in CheckStLexVar()
169 GateRef stEnv = acc_.GetValueIn(gate, 2); in CheckStLexVar()
205 void LexicalEnvSpecializationPass::HasNotdomStLexVarOrCall(GateRef gate, GateRef next) in HasNotdomStLexVarOrCall() argument
207 ASSERT(acc_.GetOpCode(gate) == OpCode::DEPEND_SELECTOR); in HasNotdomStLexVarOrCall()
210 vec.emplace_back(gate); in HasNotdomStLexVarOrCall()
251 bool LexicalEnvSpecializationPass::HasNotDomIllegalOp(GateRef gate) in HasNotDomIllegalOp() argument
253 if (HasNotDomStLexvar(gate)) { in HasNotDomIllegalOp()
257 if (HasNotDomCall(gate)) { in HasNotDomIllegalOp()
264 bool LexicalEnvSpecializationPass::HasNotDomStLexvar(GateRef gate) in HasNotDomStLexvar() argument
266 auto iter = notdomStlexvar_.find(gate); in HasNotDomStLexvar()
273 bool LexicalEnvSpecializationPass::HasNotDomCall(GateRef gate) in HasNotDomCall() argument
275 auto iter = notDomCall_.find(gate); in HasNotDomCall()
282 GateRef LexicalEnvSpecializationPass::LookupStLexvarNode(DependChains* dependChain, GateRef gate) in LookupStLexvarNode() argument
287 if (SearchStLexVar(curGate, gate, result)) { in LookupStLexvarNode()
290 if (result == gate) { in LookupStLexvarNode()
311 GateRef GetEnvSpecializationPass::VisitGate(GateRef gate) in VisitGate() argument
313 auto opcode = acc_.GetOpCode(gate); in VisitGate()
314 if (opcode == OpCode::GET_ENV && acc_.GetOpCode(acc_.GetValueIn(gate, 0)) != OpCode::ARG) { in VisitGate()
315 GateRef func = acc_.GetValueIn(gate, 0); in VisitGate()