This notably changes NewRuntimeJIT to NewRuntimeCompiler as well renames packages from jit to compiler. This clarifies the implementation is AOT, not JIT, at least when clarified to where it occurs (Runtime.CompileModule). In doing so, we reduce any concern that compilation will happen during function execution. We also free ourselves to create a JIT option without confusion in the future via CompileConfig or otherwise. Fixes #560 Signed-off-by: Adrian Cole <adrian@tetrate.io>
16 lines
596 B
Go
16 lines
596 B
Go
package compiler
|
|
|
|
import (
|
|
"testing"
|
|
"unsafe"
|
|
|
|
"github.com/tetratelabs/wazero/internal/testing/require"
|
|
)
|
|
|
|
func TestArchContextOffsetInArm64Engine(t *testing.T) {
|
|
var ctx callEngine
|
|
require.Equal(t, int(unsafe.Offsetof(ctx.compilerCallReturnAddress)), arm64CallEngineArchContextCompilerCallReturnAddressOffset, "fix consts in compiler_arm64.s")
|
|
require.Equal(t, int(unsafe.Offsetof(ctx.minimum32BitSignedInt)), arm64CallEngineArchContextMinimum32BitSignedIntOffset)
|
|
require.Equal(t, int(unsafe.Offsetof(ctx.minimum64BitSignedInt)), arm64CallEngineArchContextMinimum64BitSignedIntOffset)
|
|
}
|