MCPcopy Create free account
hub / github.com/akyoto/q / execute

Method execute

src/codegen/execute.go:8–57  ·  view source on GitHub ↗

execute executes a step which appends it to the assembler's instruction list.

(step *Step)

Source from the content-addressed store, hash-verified

6
7// execute executes a step which appends it to the assembler's instruction list.
8func (f *Function) execute(step *Step) {
9 switch instr := step.Value.(type) {
10 case *ssa.BinaryOp:
11 f.executeBinaryOp(step, instr)
12 case *ssa.Bool:
13 f.executeBool(step, instr)
14 case *ssa.Branch:
15 f.executeBranch(step, instr)
16 case *ssa.Bytes:
17 f.executeBytes(step, instr)
18 case *ssa.Call:
19 f.executeCall(step, instr)
20 case *ssa.CallExtern:
21 f.executeCallExtern(step, instr)
22 case *ssa.CallPointer:
23 f.executeCallPointer(step, instr)
24 case *ssa.Cas:
25 f.executeCas(step, instr)
26 case *ssa.Copy:
27 f.executeCopy(step, instr)
28 case *ssa.Field:
29 f.executeField(step, instr)
30 case *ssa.Function:
31 f.executeFunction(step, instr)
32 case *ssa.Global:
33 f.executeGlobal(step, instr)
34 case *ssa.Int:
35 f.executeInt(step, instr)
36 case *ssa.Jump:
37 f.executeJump(step, instr)
38 case *Label:
39 f.executeLabel(instr)
40 case *ssa.Load:
41 f.executeLoad(step, instr)
42 case *ssa.Parameter:
43 f.executeParameter(step, instr)
44 case *ssa.Phi:
45 f.executePhi(instr)
46 case *ssa.Register:
47 f.executeRegister(step, instr)
48 case *ssa.Return:
49 f.executeReturn(step, instr)
50 case *ssa.Store:
51 f.executeStore(step, instr)
52 case *ssa.Syscall:
53 f.executeSyscall(step, instr)
54 case *ssa.UnaryOp:
55 f.executeUnaryOp(step, instr)
56 default:
57 panic("not implemented: " + instr.String())
58 }
59}

Callers 1

CompileToAssemblyMethod · 0.95

Calls 15

executeBinaryOpMethod · 0.95
executeBoolMethod · 0.95
executeBranchMethod · 0.95
executeBytesMethod · 0.95
executeCallMethod · 0.95
executeCallExternMethod · 0.95
executeCasMethod · 0.95
executeCopyMethod · 0.95
executeFieldMethod · 0.95
executeFunctionMethod · 0.95
executeGlobalMethod · 0.95
executeIntMethod · 0.95

Tested by

no test coverage detected