arai-a / smoosh-sync

Automation to make jsparagus and SpiderMonkey bytecode in sync
2 stars 0 forks source link

/js/src/frontend/Stencil.cpp has been updated (e081749e) #354

Open github-actions[bot] opened 9 months ago

github-actions[bot] commented 9 months ago

Files

Changesets

Diffs

/js/src/frontend/Stencil.cpp

--- 5f7986e4be591d0f2e3d58eb53b42dafa1dcb21b/js/src/frontend/Stencil.cpp
+++ e081749eef4040050988375205004d666a6b018c/js/src/frontend/Stencil.cpp
@@ -570,17 +570,17 @@ void ScopeContext::cacheEnclosingScope(c
       MOZ_ASSERT(scopeCache->canCacheFor(scope_ref));
       return scopeCache->lookupScope(scope_ref, scopeCacheGen);
     });
     if (hasScopeCache) {
       return;
     }

     bool hasEnv = si.hasSyntacticEnvironment();
-    auto setCacthAll = [&](NameLocation loc) {
+    auto setCatchAll = [&](NameLocation loc) {
       return si.scope().match([&](auto& scope_ref) {
         using BindingMapPtr = decltype(scopeCache->createCacheFor(scope_ref));
         BindingMapPtr bindingMapPtr = scopeCache->createCacheFor(scope_ref);
         if (!bindingMapPtr) {
           oomUnsafe.crash(
               "ScopeContext::cacheEnclosingScope: scopeCache->createCacheFor");
           return;
         }
@@ -599,17 +599,17 @@ void ScopeContext::cacheEnclosingScope(c
         }
       });
     };

     switch (si.kind()) {
       case ScopeKind::Function:
         if (hasEnv) {
           if (si.scope().funHasExtensibleScope()) {
-            setCacthAll(NameLocation::Dynamic());
+            setCatchAll(NameLocation::Dynamic());
             return;
           }

           si.scope().match([&](auto& scope_ref) {
             using BindingMapPtr =
                 decltype(scopeCache->createCacheFor(scope_ref));
             using Lookup =
                 typename std::remove_pointer_t<BindingMapPtr>::Lookup;
@@ -728,31 +728,31 @@ void ScopeContext::cacheEnclosingScope(c

       case ScopeKind::Eval:
         // As an optimization, if the eval doesn't have its own var
         // environment and its immediate enclosing scope is a global
         // scope, all accesses are global.
         if (!hasEnv) {
           ScopeKind kind = si.scope().enclosing().kind();
           if (kind == ScopeKind::Global || kind == ScopeKind::NonSyntactic) {
-            setCacthAll(NameLocation::Global(BindingKind::Var));
+            setCatchAll(NameLocation::Global(BindingKind::Var));
             return;
           }
         }

-        setCacthAll(NameLocation::Dynamic());
+        setCatchAll(NameLocation::Dynamic());
         return;

       case ScopeKind::Global:
-        setCacthAll(NameLocation::Global(BindingKind::Var));
+        setCatchAll(NameLocation::Global(BindingKind::Var));
         return;

       case ScopeKind::With:
       case ScopeKind::NonSyntactic:
-        setCacthAll(NameLocation::Dynamic());
+        setCatchAll(NameLocation::Dynamic());
         return;

       case ScopeKind::WasmInstance:
       case ScopeKind::WasmFunction:
         MOZ_CRASH("No direct eval inside wasm functions");
     }
   }