refactor: rename interpreter to runtime and use receiver methods
- Rename pkg/interpreter to pkg/runtime - Move ReduceOnce to new pkg/normalorder package - Convert standalone functions (Substitute, Rename, GetFree, IsFree) to receiver methods on concrete expression types - Change Set from pointer receivers to value receivers - Update all references from interpreter to runtime terminology Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime/pprof"
|
||||
|
||||
"git.maximhutz.com/max/lambda/pkg/interpreter"
|
||||
"git.maximhutz.com/max/lambda/pkg/runtime"
|
||||
)
|
||||
|
||||
// Observes a reduction process, and publishes a CPU performance profile on
|
||||
@@ -19,10 +19,10 @@ type Performance struct {
|
||||
}
|
||||
|
||||
// Create a performance tracker that outputs a profile to "file".
|
||||
func NewPerformance(file string, process interpreter.Interpreter) *Performance {
|
||||
func NewPerformance(file string, process runtime.Runtime) *Performance {
|
||||
plugin := &Performance{File: file}
|
||||
process.On(interpreter.StartEvent, plugin.Start)
|
||||
process.On(interpreter.StopEvent, plugin.Stop)
|
||||
process.On(runtime.StartEvent, plugin.Start)
|
||||
process.On(runtime.StopEvent, plugin.Stop)
|
||||
|
||||
return plugin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user