Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
Summary: - as title, - removing a nit

Reviewed By: VLanvin

Differential Revision: D65830000

fbshipit-source-id: 542c31b2f8b73f9656ed70c3041b5f630d322180
  • Loading branch information
ilya-klyuchnikov authored and facebook-github-bot committed Nov 12, 2024
1 parent ba473da commit b7c5d4c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import scala.collection.mutable
import com.whatsapp.eqwalizer.io.Ipc

private object Db {
private val transValidStubs: mutable.Map[String, Option[ModuleStub]] =
private val stubs: mutable.Map[String, Option[ModuleStub]] =
mutable.Map.empty
private val loadedModules: mutable.Set[String] = mutable.Set.empty

/** module stub suitable for type-checking
*/
def getModuleStub(module: String): Option[ModuleStub] = {
loadedModules.add(module)
if (transValidStubs.contains(module))
transValidStubs(module)
if (stubs.contains(module))
stubs(module)
else {
val optStub =
Ipc.getAstBytes(module, Ipc.TransitiveStub).map(readFromArray[ModuleStub](_))
transValidStubs.put(module, optStub)
stubs.put(module, optStub)
optStub
}
}
Expand Down

0 comments on commit b7c5d4c

Please sign in to comment.