<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">EncodedJSValue was always just a work-around to convince the compiler to put a JSValue in registers (instead of on the stack, with different compilers disagreeing about where on the stack).<div class=""><br class=""></div><div class="">I agree with removing&nbsp;EncodedJSValue&nbsp;if possible.</div><div class=""><br class=""></div><div class="">Did something change to make this possible? For example, are you sure that Windows and 32bit are OK with this change?</div><div class=""><div class=""><br class=""></div><div class="">I don’t understand why C linkage would affect things: Either the compiler puts structs in registers or it doesn’t.</div><div class=""><br class=""></div><div class="">Geoff</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 3, 2017, at 2:44 PM, Filip Pizlo &lt;<a href="mailto:fpizlo@apple.com" class="">fpizlo@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">I think that this is great!</div><div class=""><br class=""></div><div class="">I agree with the policy that we should use JSValue everywhere that it would give us the same codegen/ABI (args in registers, return in registers, etc).&nbsp;<br class=""><br class="">-Filip</div><div class=""><br class="">On Jan 3, 2017, at 14:33, Mark Lam &lt;<a href="mailto:mark.lam@apple.com" class="">mark.lam@apple.com</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div class="">Over the holiday period, I looked into the possibility of giving EncodedJSValue a default constructor (because I didn’t like having to return encodedJSValue() instead of { } in lots of places), and learned why we had EncodedJSValue in the first place (i.e. for C linkage). &nbsp;This led me to discover (in my reading of the code) that we don’t really need to use EncodedJSValue for most of our host functions (those of type NativeFunction, GetValueFunc, and PutValueFunc). &nbsp;</div><div class=""><br class=""></div><div class="">I propose that we switch to using JSValue directly where we can. &nbsp;This has the benefit of:</div><div class="">1. better type safety with the use of JSValue (EncodedJSValue is a int64_t typedef).</div><div class="">2. more readable code (less marshaling back and forth with JSValue::encode()/decode()).</div><div class=""><br class=""></div><div class="">The patch for this change can be found here:</div><a href="https://bugs.webkit.org/show_bug.cgi?id=166658" class="">https://bugs.webkit.org/show_bug.cgi?id=166658</a><div class=""><br class=""></div><div class="">Perf is neutral. &nbsp;Any opinions?</div><div class=""><br class=""></div><div class="">Thanks.</div><div class=""><br class=""></div><div class="">Mark</div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">webkit-dev mailing list</span><br class=""><span class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a></span><br class=""><span class=""><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" class="">https://lists.webkit.org/mailman/listinfo/webkit-dev</a></span><br class=""></div></blockquote></div>_______________________________________________<br class="">webkit-dev mailing list<br class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a><br class="">https://lists.webkit.org/mailman/listinfo/webkit-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>