<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Reduce the use of EncodedJSValue, and use JSValue instead."
   href="https://bugs.webkit.org/show_bug.cgi?id=166658">166658</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Reduce the use of EncodedJSValue, and use JSValue instead.
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mark.lam&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Existing code uses EncodedJSValue for passing JSValues in and out of host functions.  However, it does not seem that this is necessary in most cases.  Specifically, NativeFunction, GetValueFunc, and PutValueFunc can all use JSValue with no performance implications.  Using JSValue directly (instead of EncodedJSValue) also improves type safety, and reduces the need to marshal values back and forth using JSValue::encode() and JSValue::decode().  This makes the code more easy to read and write, with no performance loss.

The 2 primary reason for code to still use EncodedJSValue are:
1. functions that require C linkage (e.g. JIT_OPERATION functions).
2. as an element storage type where using EncodedJSValue allows us to use the trivial constructor for int64_t.

Note: this patch is not exhaustive in removing all unnecessary uses of EncodedJSValue.  It merely tries to reduce it as much as possible with minimal effort.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>