Skip to content

Commit

Permalink
Code cleans.
Browse files Browse the repository at this point in the history
Signed-off-by: zhanluxianshen <[email protected]>
  • Loading branch information
zhanluxianshen committed Nov 29, 2024
1 parent 32614c6 commit 9339a39
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions internal/app/appbuild/appbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ func CmdBuildAction(c *cli.Context) error {

var opt = appbase.BuildOptions(c)
_, _, err := BuildApp(opt, input, outfile)
if err != nil {
return err
}
return err
}

Expand Down
1 change: 0 additions & 1 deletion internal/backends/compiler_wat/js_binding_tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class WaApp {
},
print_i32: (i) => { this._wa_print_buf += i },
print_u64: (i) => { this._wa_print_buf += i },
print_u64: (i) => { this._wa_print_buf += i },
print_i64: (i) => { this._wa_print_buf += i },
print_f32: (f) => { this._wa_print_buf += f },
print_f64: (f) => { this._wa_print_buf += f },
Expand Down
6 changes: 2 additions & 4 deletions internal/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io/fs"
"os"
"path"
pathpkg "path"
"path/filepath"
"sort"
Expand All @@ -24,7 +23,6 @@ import (
"wa-lang.org/wa/internal/types"
"wa-lang.org/wa/internal/wamime"
wasrc "wa-lang.org/wa/waroot/src"
wastd "wa-lang.org/wa/waroot/src"
)

var _loadRuntime bool = true
Expand Down Expand Up @@ -601,7 +599,7 @@ func (p *_Loader) ParseDir(pkgpath string) (filenames []string, files []*ast.Fil
f.EmbedMap = make(map[string]string)
}

vpath := path.Join(pkgpath, info.Embed)
vpath := pathpkg.Join(pkgpath, info.Embed)
data, err := fs.ReadFile(pkgVFS, vpath)
if err != nil {
continue
Expand Down Expand Up @@ -681,7 +679,7 @@ func (p *_Loader) hasExt(name string, extensions ...string) bool {
}

func (p *_Loader) isStdPkg(pkgpath string) bool {
return wastd.IsStdPkg(pkgpath)
return wasrc.IsStdPkg(pkgpath)
}

func (p *_Loader) isSelfPkg(pkgpath string) bool {
Expand Down

0 comments on commit 9339a39

Please sign in to comment.