mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
compiler: refactor starting new goroutines
This commit is contained in:
committed by
Ron Evans
parent
405ec2a563
commit
c1521fe12e
@@ -1071,7 +1071,7 @@ func (c *Compiler) parseInstr(frame *Frame, instr ssa.Instruction) {
|
||||
panic("StaticCallee returned an unexpected value")
|
||||
}
|
||||
params = append(params, context) // context parameter
|
||||
c.emitStartGoroutine(calleeFn.LLVMFn, params)
|
||||
frame.createGoInstruction(calleeFn.LLVMFn, params)
|
||||
} else if !instr.Call.IsInvoke() {
|
||||
// This is a function pointer.
|
||||
// At the moment, two extra params are passed to the newly started
|
||||
@@ -1089,7 +1089,7 @@ func (c *Compiler) parseInstr(frame *Frame, instr ssa.Instruction) {
|
||||
default:
|
||||
panic("unknown scheduler type")
|
||||
}
|
||||
c.emitStartGoroutine(funcPtr, params)
|
||||
frame.createGoInstruction(funcPtr, params)
|
||||
} else {
|
||||
c.addError(instr.Pos(), "todo: go on interface call")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user