Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jit(arm64): Add common 'compile'/'maybeCompile' prefix #235

Merged
merged 2 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wasm/jit/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
type compiler interface {
// String is for debugging purpose.
String() string
// emitPreamble is called before compiling any wazeroir operation.
// compilePreamble is called before compiling any wazeroir operation.
// This is used, for example, to initilize the reserved registers, etc.
emitPreamble() error
compilePreamble() error
// compile generates the byte slice of native code.
// stackPointerCeil is the max stack pointer that the target function would reach.
// staticData is compiledFunctionStaticData for the resutling native code.
Expand Down
2 changes: 1 addition & 1 deletion wasm/jit/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ func compileWasmFunction(f *wasm.FunctionInstance) (*compiledFunction, error) {
return nil, fmt.Errorf("failed to initialize assembly builder: %w", err)
}

if err := compiler.emitPreamble(); err != nil {
if err := compiler.compilePreamble(); err != nil {
return nil, fmt.Errorf("failed to emit preamble: %w", err)
}

Expand Down
2 changes: 1 addition & 1 deletion wasm/jit/jit_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -5219,7 +5219,7 @@ func (c *amd64Compiler) exit(status jitCallStatusCode) {
c.addInstruction(ret)
}

func (c *amd64Compiler) emitPreamble() (err error) {
func (c *amd64Compiler) compilePreamble() (err error) {
// We assume all function parameters are already pushed onto the stack by
// the caller.
c.pushFunctionParams()
Expand Down
Loading