1. 25 10月, 2021 6 次提交
    • N
      Fix accidentally quadratic behavior in _modify · a9f97e9e
      Nicolas Williams 提交于
      We need to be careful to not grab an extra reference when mutating data
      structures because that means we make extra copies.  Doing that every
      time in `_modify` is really painful, as that function implements `|=`
      and all modify-assign operators.
      
      `jv_setpath()` also grabs additional references, so this is not the only
      fix needed for the modify-assign operators to not be accidentally
      quadratic.
      
      We have to use `LOADVN` in order to make this fix possible, so we should
      really byte-code `_modify` rather than jq-code it.  However, as a
      stop-gap to make this fix easier, I'm adding syntax for referring to a
      `$binding` such that you get `LOADVN` instead of `LOADV`.
      
      This syntax is not meant to be used outside jq's internals!  Therefore
      it is not documented.  I promise to break it later, so don't use it!
      
      TBD, but later:
      
       - Optimize `_modify` for the case where `update` outputs more than one
         value.
      
         This is trivial: add a `setpath($p; null)` in the middle of `_modify`
         before calling `update`.  But unfortunately the VM retains a
         reference to `value_at_path` for path expression checking, and fixing
         that will require more work.
      a9f97e9e
    • N
      Fix accidentally quadratic behavior in setpath · 0c3455d3
      Nicolas Williams 提交于
      We need to be careful to not grab an extra reference when mutating
      data structures because that means we make extra copies.  Doing that
      every time in `jv_setpath()` is really painful, as that function is used
      in `_modify/2`, which is used in `|=` and all modify-assign operators.
      
      `_modify` also grabs additional references, so this is not the only fix
      needed for the modify-assign operators to not be accidentally quadratic.
      0c3455d3
    • N
      Fix LOADV/LOADVN refcount printing · 1a1804af
      Nicolas Williams 提交于
      1a1804af
    • N
      Fix crash in LOADVN when stack grows · 582717a7
      Nicolas Williams 提交于
      This `stack_push()` call in LOADVN invalidates `var`:
      
             jv* var = frame_local_var(jq, v, level);
             jv_free(stack_popn(jq));
      ------>stack_push(jq, *var);
             *var = jv_null();
             ^^^^^^
      
      We have to re-compute `var`:
      
             jv* var = frame_local_var(jq, v, level);
             jv_free(stack_popn(jq));
             stack_push(jq, *var);
      ------>var = frame_local_var(jq, v, level);
             *var = jv_null();
      582717a7
    • N
      Appveyor: Get Appveyor building again · 07dc653a
      Nicolas Williams 提交于
      07dc653a
    • N
      Update docs/Pipenv.lock · d79fe7fd
      Nicolas Williams 提交于
      d79fe7fd
  2. 07 9月, 2021 1 次提交
  3. 04 9月, 2021 1 次提交
  4. 02 5月, 2021 6 次提交
  5. 20 12月, 2020 2 次提交
  6. 18 12月, 2020 1 次提交
  7. 09 6月, 2020 1 次提交
  8. 27 5月, 2020 3 次提交
  9. 04 3月, 2020 1 次提交
  10. 03 3月, 2020 1 次提交
  11. 02 3月, 2020 3 次提交
  12. 15 1月, 2020 1 次提交
  13. 11 1月, 2020 1 次提交
  14. 08 1月, 2020 2 次提交
  15. 03 1月, 2020 5 次提交
  16. 31 12月, 2019 4 次提交
  17. 30 12月, 2019 1 次提交