arai-a / smoosh-sync

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

/js/src/frontend/Stencil.h and 2 more files have been updated (b4cb88d1) #337

Open github-actions[bot] opened 1 year ago

github-actions[bot] commented 1 year ago

Files

Changesets

Diffs

/js/src/frontend/Stencil.h

--- 295c82f2073e758f5492b96d73dddbbc697c636b/js/src/frontend/Stencil.h
+++ b4cb88d106bd62b949ef92204c648c9379e065ca/js/src/frontend/Stencil.h
@@ -602,17 +602,21 @@ class StencilModuleEntry {
   TaggedParserAtomIndex localName;
   TaggedParserAtomIndex importName;
   TaggedParserAtomIndex exportName;

   // Location used for error messages. If this is for a module request entry
   // then it is the module specifier string, otherwise the import/export spec
   // that failed. Exports may not fill these fields if an error cannot be
   // generated such as `export let x;`.
+
+  // Line number (1-origin).
   uint32_t lineno = 0;
+
+  // Column number in UTF-16 code units (0-origin).
   uint32_t column = 0;

  private:
   StencilModuleEntry(uint32_t lineno, uint32_t column)
       : lineno(lineno), column(column) {}

  public:
   // For XDR only.

/js/src/vm/BytecodeUtil-inl.h

--- c6a272593c07225b4f26ffcaabfee526d7ce186e/js/src/vm/BytecodeUtil-inl.h
+++ b4cb88d106bd62b949ef92204c648c9379e065ca/js/src/vm/BytecodeUtil-inl.h
@@ -222,18 +222,23 @@ class BytecodeRangeWithPosition : privat
       }
     }

     sn = *iter;
     isEntryPoint = lastLinePC == frontPC();
   }

   size_t initialLine;
+
+  // Line number (1-origin).
   size_t lineno;
+
+  // Column number in UTF-16 code units (0-origin).
   size_t column;
+
   const SrcNote* sn;
   jsbytecode* snpc;
   bool isEntryPoint;
   bool isBreakpoint;
   bool seenStepSeparator;
   bool wasArtifactEntryPoint;
 };

/js/src/vm/SharedStencil.h

--- 56d694dcd452b925944ade5e7492cf56aeb12daa/js/src/vm/SharedStencil.h
+++ b4cb88d106bd62b949ef92204c648c9379e065ca/js/src/vm/SharedStencil.h
@@ -214,18 +214,20 @@ struct SourceExtent {
   static constexpr FunctionKey NullFunctionKey = 0;

   uint32_t sourceStart = 0;
   uint32_t sourceEnd = 0;
   uint32_t toStringStart = 0;
   uint32_t toStringEnd = 0;

   // Line and column of |sourceStart_| position.
-  uint32_t lineno = 1;  // 1-indexed.
-  uint32_t column = 0;  // Count of Code Points
+  // Line number (1-origin).
+  uint32_t lineno = 1;
+  // Column number in UTF-16 code units (0-origin).
+  uint32_t column = 0;

   FunctionKey toFunctionKey() const {
     // In eval("x=>1"), the arrow function will have a sourceStart of 0 which
     // conflicts with the NullFunctionKey, so shift all keys by 1 instead.
     auto result = sourceStart + 1;
     MOZ_ASSERT(result != NullFunctionKey);
     return result;
   }