arai-a / smoosh-sync

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

/js/src/frontend/Stencil.cpp and one more file have been updated (750908d9) #346

Open github-actions[bot] opened 10 months ago

github-actions[bot] commented 10 months ago

Files

Changesets

Diffs

/js/src/frontend/Stencil.cpp

--- 4091bed4a0aae7772537e08e6cb49bf0bc7434c9/js/src/frontend/Stencil.cpp
+++ 750908d92ab10765bbf1d6c8674a698f90ee5e6d/js/src/frontend/Stencil.cpp
@@ -92,17 +92,17 @@ static ParserBindingIter InputBindingIte

 static ParserBindingIter InputBindingIter(const FakeStencilGlobalScope&) {
   MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("No bindings on empty global.");
 }

 InputName InputScript::displayAtom() const {
   return script_.match(
       [](BaseScript* ptr) {
-        return InputName(ptr, ptr->function()->displayAtom());
+        return InputName(ptr, ptr->function()->fullDisplayAtom());
       },
       [](const ScriptStencilRef& ref) {
         return InputName(ref, ref.scriptData().functionAtom);
       });
 }

 TaggedParserAtomIndex InputName::internInto(FrontendContext* fc,
                                             ParserAtomsTable& parserAtoms,
@@ -1524,19 +1524,19 @@ bool CompilationSyntaxParseCache::copySc
     gc::Cell* cell = gcthings[i].asCell();
     JSFunction* fun = &cell->as<JSObject>()->as<JSFunction>();
     gcThingsData[i] = TaggedScriptThingIndex(ScriptIndex(i));
     new (mozilla::KnownNotNull, &scriptData[i]) ScriptStencil();
     ScriptStencil& data = scriptData[i];
     new (mozilla::KnownNotNull, &scriptExtra[i]) ScriptStencilExtra();
     ScriptStencilExtra& extra = scriptExtra[i];

-    if (fun->displayAtom()) {
+    if (fun->fullDisplayAtom()) {
       TaggedParserAtomIndex displayAtom =
-          parseAtoms.internJSAtom(fc, atomCache, fun->displayAtom());
+          parseAtoms.internJSAtom(fc, atomCache, fun->fullDisplayAtom());
       if (!displayAtom) {
         return false;
       }
       data.functionAtom = displayAtom;
     }
     data.functionFlags = fun->flags();

     BaseScript* lazy = fun->baseScript();
@@ -2397,17 +2397,17 @@ static void UpdateEmittedInnerFunctions(
       BaseScript* script = fun->baseScript();

       ScopeIndex index = scriptStencil.lazyFunctionEnclosingScopeIndex();
       Scope* scope = gcOutput.getScopeNoBaseIndex(index);
       script->setEnclosingScope(scope);

       // Inferred and Guessed names are computed by BytecodeEmitter and so may
       // need to be applied to existing JSFunctions during delazification.
-      if (fun->displayAtom() == nullptr) {
+      if (fun->fullDisplayAtom() == nullptr) {
         JSAtom* funcAtom = nullptr;
         if (scriptStencil.functionFlags.hasInferredName() ||
             scriptStencil.functionFlags.hasGuessedAtom()) {
           funcAtom =
               atomCache.getExistingAtomAt(cx, scriptStencil.functionAtom);
           MOZ_ASSERT(funcAtom);
         }
         if (scriptStencil.functionFlags.hasInferredName()) {
@@ -4269,16 +4269,19 @@ void js::DumpFunctionFlagsItems(js::JSON
           json.value("BASESCRIPT");
           break;
         case FunctionFlags::Flags::SELFHOSTLAZY:
           json.value("SELFHOSTLAZY");
           break;
         case FunctionFlags::Flags::CONSTRUCTOR:
           json.value("CONSTRUCTOR");
           break;
+        case FunctionFlags::Flags::LAZY_ACCESSOR_NAME:
+          json.value("LAZY_ACCESSOR_NAME");
+          break;
         case FunctionFlags::Flags::LAMBDA:
           json.value("LAMBDA");
           break;
         case FunctionFlags::Flags::WASM_JIT_ENTRY:
           json.value("WASM_JIT_ENTRY");
           break;
         case FunctionFlags::Flags::HAS_INFERRED_NAME:
           json.value("HAS_INFERRED_NAME");

/js/src/vm/BytecodeUtil.cpp

--- 7c627064647b6afab488b7811c66335dd278b7bc/js/src/vm/BytecodeUtil.cpp
+++ 750908d92ab10765bbf1d6c8674a698f90ee5e6d/js/src/vm/BytecodeUtil.cpp
@@ -2644,17 +2644,17 @@ JSString* JS::GetPCCountScriptSummary(JS
     return nullptr;
   }
   if (!JSONStringProperty(sp, json, "file", filenameStr)) {
     return nullptr;
   }
   json.property("line", script->lineno());

   if (JSFunction* fun = script->function()) {
-    if (JSAtom* atom = fun->displayAtom()) {
+    if (JSAtom* atom = fun->fullDisplayAtom()) {
       if (!JSONStringProperty(sp, json, "name", atom)) {
         return nullptr;
       }
     }
   }

   uint64_t total = 0;