<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 11/22/21 4:19 PM, Gabriel Ivăncescu
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:8a1b8f6c-0213-a26b-5d0f-36806c381ebb@gmail.com">On
      22/11/2021 16:41, Jacek Caban wrote:
      <br>
      <blockquote type="cite" style="color: #007cff;">On 11/22/21 1:52
        PM, Gabriel Ivăncescu wrote:
        <br>
        <blockquote type="cite" style="color: #007cff;">On 22/11/2021
          14:22, Jacek Caban wrote:
          <br>
          <blockquote type="cite" style="color: #007cff;">Hi Gabriel,
            <br>
            <br>
            On 11/19/21 7:03 PM, Gabriel Ivăncescu wrote:
            <br>
            <blockquote type="cite" style="color: #007cff;">diff --git
              a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h
              <br>
              index 69897cd..d37fbd1 100644
              <br>
              --- a/dlls/jscript/jscript.h
              <br>
              +++ b/dlls/jscript/jscript.h
              <br>
              @@ -230,6 +230,9 @@ typedef struct {
              <br>
                    builtin_setter_t setter;
              <br>
                } builtin_prop_t;
              <br>
              +HRESULT
              jsdisp_builtin_get_default_value(script_ctx_t*,jsdisp_t*,jsval_t*)
              DECLSPEC_HIDDEN;
              <br>
              +#define JSDISP_DEFINE_BUILTIN_VALUE(value) {NULL,
              value,0, jsdisp_builtin_get_default_value}
              <br>
            </blockquote>
            <br>
            <br>
            Could we just handle DISPID_VALUE in dispex.c callers
            without using builtin_prop_t at all?
            <br>
            <br>
            <br>
            Thanks,
            <br>
            <br>
            Jacek
            <br>
            <br>
          </blockquote>
          <br>
          How are we going to handle the methods then, for the jsdisps
          that have them? For example, Function_value. Wouldn't it
          require special-casing them? I thought it's less "elegant"
          since it doesn't re-use the same code path as now, just
          different builtin data.
          <br>
        </blockquote>
        <br>
        <br>
        I meant it only for getter, Function_value is for calling
        DISPID_VALUE. If getter is the same in every builtin_info_t,
        then it means that it's redundant, which is not really elegant.
        DISPID_VALUE is special in many ways, I don't see what's wrong
        with handling it separately.
        <br>
        <br>
        <br>
        Jacek
        <br>
        <br>
      </blockquote>
      <br>
      Well, it's not redundant since it's only for DISPID_VALUE props,
      but the code handling the getters is universal to <b
        class="moz-txt-star"><span class="moz-txt-tag">*</span>all<span
          class="moz-txt-tag">*</span></b> props not just DISPID_VALUE,
      which of course is not always the same. Right now we don't add any
      code and just re-use the existing prop code.
      <br>
      <br>
      That said, if you still aren't convinced, I have a question.
      Should I remove the value_prop completely from the builtin_info_t
      and from the prop list? Right now it's always the first prop, i.e.
      zero, to match DISPID_VALUE.
      <br>
      <br>
      Then, since I have to special-case it anyway, I'll just add a
      builtin_invoke_t value_invoke instead and call it if needed in
      InvokeEx, without having an actual prop for it.</blockquote>
    <p><br>
    </p>
    <p>Yes, removing value_prop seems right. I would call just "call" or
      something that would match [[Call]] from the spec.</p>
    <p><br>
    </p>
    <p>Jacek<br>
    </p>
  </body>
</html>