MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / GetOpList

Method GetOpList

user/config/config_point_arg.go:127–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127func (this *PointArg) GetOpList() []uint32 {
128 // op_list 使用时生成即可
129 op_list := []uint32{}
130 // sys exit 取出的返回值要特殊处理 这里没用实际的操作
131 if this.RegIndex == REG_ARM64_MAX {
132 return op_list
133 }
134 if len(this.ExtraOpList) > 0 {
135 // 类型的最终读取地址 由 ExtraOpList 提供 记得读取之前要保存下地址
136 op_list = append(op_list, this.ExtraOpList...)
137 } else {
138 op_list = append(op_list, argtype.Add_READ_SAVE_REG(uint64(this.RegIndex)).Index)
139 op_list = append(op_list, argtype.OPC_MOVE_REG_VALUE.Index)
140 }
141
142 if this.TypeIndex != STRING && this.TypeIndex != STD_STRING && !this.IsBuffer() {
143 for _, v := range this.FilterIndexList {
144 filter_op := argtype.OPC_FILTER_VALUE.NewValue(uint64(v))
145 op_list = append(op_list, filter_op.Index)
146 }
147 }
148
149 if this.ReadMore() {
150 for _, op_key := range argtype.GetOpKeyList(this.TypeIndex) {
151 op_list = append(op_list, op_key)
152 }
153 if this.TypeIndex == STRING || this.TypeIndex == STD_STRING {
154 for _, v := range this.FilterIndexList {
155 filter_op := argtype.OPC_FILTER_STRING.NewValue(uint64(v))
156 op_list = append(op_list, filter_op.Index)
157 }
158 } else if this.IsBuffer() {
159 for _, v := range this.FilterIndexList {
160 filter_op := argtype.OPC_FILTER_BUFFER.NewValue(uint64(v))
161 op_list = append(op_list, filter_op.Index)
162 }
163 }
164 }
165 return op_list
166}
167
168func (this *PointArg) IsBuffer() bool {
169 return argtype.GetArgType(this.TypeIndex).GetParentIndex() == BUFFER

Callers

nothing calls this directly

Calls 5

IsBufferMethod · 0.95
ReadMoreMethod · 0.95
Add_READ_SAVE_REGFunction · 0.92
GetOpKeyListFunction · 0.92
NewValueMethod · 0.80

Tested by

no test coverage detected