mirror of
https://github.com/zhigang1992/esbuild.git
synced 2026-04-30 02:16:12 +08:00
pass around 1 pointer instead of 4
This commit is contained in:
24
internal/cache/cache.go
vendored
24
internal/cache/cache.go
vendored
@@ -32,29 +32,29 @@ import (
|
||||
// reused even if the contents of that "package.json" file have changed.
|
||||
//
|
||||
type CacheSet struct {
|
||||
SourceIndexCache *SourceIndexCache
|
||||
FSCache *FSCache
|
||||
CSSCache *CSSCache
|
||||
JSONCache *JSONCache
|
||||
JSCache *JSCache
|
||||
SourceIndexCache SourceIndexCache
|
||||
FSCache FSCache
|
||||
CSSCache CSSCache
|
||||
JSONCache JSONCache
|
||||
JSCache JSCache
|
||||
}
|
||||
|
||||
func MakeCacheSet() CacheSet {
|
||||
return CacheSet{
|
||||
SourceIndexCache: &SourceIndexCache{
|
||||
func MakeCacheSet() *CacheSet {
|
||||
return &CacheSet{
|
||||
SourceIndexCache: SourceIndexCache{
|
||||
entries: make(map[logger.Path]uint32),
|
||||
nextSourceIndex: runtime.SourceIndex + 1,
|
||||
},
|
||||
FSCache: &FSCache{
|
||||
FSCache: FSCache{
|
||||
entries: make(map[string]*fsEntry),
|
||||
},
|
||||
CSSCache: &CSSCache{
|
||||
CSSCache: CSSCache{
|
||||
entries: make(map[logger.Path]*cssCacheEntry),
|
||||
},
|
||||
JSONCache: &JSONCache{
|
||||
JSONCache: JSONCache{
|
||||
entries: make(map[logger.Path]*jsonCacheEntry),
|
||||
},
|
||||
JSCache: &JSCache{
|
||||
JSCache: JSCache{
|
||||
entries: make(map[logger.Path]*jsCacheEntry),
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user