Something went wrong. Try again.
🌱 A minimal programming language and compiler. git.urbach.dev/cli/q
high-performance programming-language compiler
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859package codegen
import ( "git.urbach.dev/cli/q/src/ssa")
// execute executes a step which appends it to the assembler's instruction list.func (f *Function) execute(step *Step) { switch instr := step.Value.(type) { case *ssa.BinaryOp: f.executeBinaryOp(step, instr) case *ssa.Bool: f.executeBool(step, instr) case *ssa.Branch: f.executeBranch(step, instr) case *ssa.Bytes: f.executeBytes(step, instr) case *ssa.Call: f.executeCall(step, instr) case *ssa.CallExtern: f.executeCallExtern(step, instr) case *ssa.CallPointer: f.executeCallPointer(step, instr) case *ssa.Cas: f.executeCas(step, instr) case *ssa.Copy: f.executeCopy(step, instr) case *ssa.Field: f.executeField(step, instr) case *ssa.Function: f.executeFunction(step, instr) case *ssa.Global: f.executeGlobal(step, instr) case *ssa.Int: f.executeInt(step, instr) case *ssa.Jump: f.executeJump(step, instr) case *Label: f.executeLabel(instr) case *ssa.Load: f.executeLoad(step, instr) case *ssa.Parameter: f.executeParameter(step, instr) case *ssa.Phi: f.executePhi(instr) case *ssa.Register: f.executeRegister(step, instr) case *ssa.Return: f.executeReturn(step, instr) case *ssa.Store: f.executeStore(step, instr) case *ssa.Syscall: f.executeSyscall(step, instr) case *ssa.UnaryOp: f.executeUnaryOp(step, instr) default: panic("not implemented: " + instr.String()) }}