Lines Matching refs:gate
21 GateRef TSHCROptPass::VisitGate(GateRef gate)
23 AddProfiling(gate);
24 auto opcode = acc_.GetOpCode(gate);
27 return VisitTypedBinaryOp(gate);
34 void TSHCROptPass::AddProfiling(GateRef gate)
36 if (IsTypedOpProfiling() && acc_.UseForTypeOpProfilerGate(gate)) {
37 Environment env(gate, circuit_, &builder_);
38 OpCode opcode = acc_.GetOpCode(gate);
42 acc_.GetDep(gate), { constOpcode }, gate);
43 acc_.SetDep(gate, traceGate);
44 builder_.SetDepend(acc_.GetDep(gate));
48 GateRef TSHCROptPass::VisitTypedBinaryOp(GateRef gate)
50 if (acc_.HasStringType(gate)) {
51 return VisitStringBinOp(gate);
56 GateRef TSHCROptPass::VisitStringBinOp(GateRef gate)
58 TypedBinOp op = acc_.GetTypedBinaryOp(gate);
62 return VisitStringEqual(gate);
69 GateRef TSHCROptPass::VisitStringEqual(GateRef gate)
71 Environment env(gate, circuit_, &builder_);
72 GateRef left = acc_.GetValueIn(gate, 0);
73 GateRef right = acc_.GetValueIn(gate, 1);
112 bool TSHCROptPass::IsSingleCharString(GateRef gate)
114 if (acc_.IsConstString(gate)) {
115 uint32_t strId = acc_.GetStringIdFromLdaStrGate(gate);
116 auto methodOffset = acc_.TryGetMethodOffset(gate);
123 return acc_.IsSingleCharGate(gate);
126 bool TSHCROptPass::IsNotLoadStrOrStringLoadElement(GateRef gate)
128 OpCode op = acc_.GetOpCode(gate);
130 EcmaOpcode ecmaOpcode = acc_.GetByteCodeOpcode(gate);
134 return acc_.GetTypedLoadOp(gate) != TypedLoadOp::STRING_LOAD_ELEMENT;
139 GateRef TSHCROptPass::ConvertConstSingleCharToInt32(GateRef gate)
141 ASSERT(acc_.IsConstString(gate));
142 uint32_t strId = acc_.GetStringIdFromLdaStrGate(gate);
143 auto methodOffset = acc_.TryGetMethodOffset(gate);