mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
compiler: remove parentHandle from calling convention
This removes the parentHandle argument from the internal calling convention. It was formerly used to implment coroutines. Now that coroutines have been removed, it is no longer necessary.
This commit is contained in:
@@ -967,9 +967,7 @@ func (b *builder) createFunction() {
|
||||
// method).
|
||||
var context llvm.Value
|
||||
if !b.info.exported {
|
||||
parentHandle := b.llvmFn.LastParam()
|
||||
parentHandle.SetName("parentHandle")
|
||||
context = llvm.PrevParam(parentHandle)
|
||||
context = b.llvmFn.LastParam()
|
||||
context.SetName("context")
|
||||
}
|
||||
if len(b.fn.FreeVars) != 0 {
|
||||
@@ -1505,9 +1503,6 @@ func (b *builder) createFunctionCall(instr *ssa.CallCommon) (llvm.Value, error)
|
||||
// This function takes a context parameter.
|
||||
// Add it to the end of the parameter list.
|
||||
params = append(params, context)
|
||||
|
||||
// Parent coroutine handle.
|
||||
params = append(params, llvm.Undef(b.i8ptrType))
|
||||
}
|
||||
|
||||
return b.createCall(callee, params, ""), nil
|
||||
|
||||
Reference in New Issue
Block a user