Skip to content

Commit

Permalink
panic on Go1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed Apr 4, 2023
1 parent 6ce8eeb commit 4e42777
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 165 deletions.
3 changes: 0 additions & 3 deletions internal/native/dispatch_amd64.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build go1.16 && amd64
// +build go1.16,amd64

/*
* Copyright 2021 ByteDance Inc.
*
Expand Down
162 changes: 0 additions & 162 deletions internal/native/dispatch_compat.go

This file was deleted.

12 changes: 12 additions & 0 deletions loader/wrapper_c.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,25 @@ import (

var _C_Redzone = []bool{false, false, false, false}

// CFunc is a function information for C func
type CFunc struct {
// C function name
Name string

// entry pc relative to entire text segment
EntryOff uint32

// function text size in bytes
TextSize uint32

// maximum stack depth of the function
MaxStack uintptr

// PC->SP delta lists of the function
Pcsp [][2]uint32
}

// GoC is the wrapper for Go calls to C
type GoC struct {
// CName is the name of corresponding C function
CName string
Expand All @@ -51,6 +62,7 @@ type GoC struct {
GoFunc interface{}
}

// WrapGoC wraps C functions and loader it into Go stubs
func WrapGoC(text []byte, natives []CFunc, stubs []GoC, modulename string, filename string) {
funcs := make([]Func, len(natives))

Expand Down

0 comments on commit 4e42777

Please sign in to comment.