execute executes a step which appends it to the assembler's instruction list.
(step *Step)
| 6 | |
| 7 | // execute executes a step which appends it to the assembler's instruction list. |
| 8 | func (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 | } |
no test coverage detected