[Webkit-unassigned] [Bug 162125] Enable IC for put_by_id_with_this

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 5 08:59:48 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=162125

--- Comment #15 from Caio Lima <ticaiolima at gmail.com> ---
Comment on attachment 305938
  --> https://bugs.webkit.org/attachment.cgi?id=305938
Proposed Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305938&action=review

>> Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:4591
>> +        notCellList.append(m_jit.branchIfNotCell(JSValueRegs(thisGPR)));
> 
> Looks like a bug that you don't use this after appending to it. Please add tests. Should be an Insta crash.
> 
> That said, the more I think about it, are there any scenarios where |this|/base won't be a cell?

Oops. It should be a cachedPutByIdWithThis parameter. However, I'm following your thinking too. __proto__ can be "null" or  "object". When it is null, ```super.something``` will fail as TypeError. (https://tc39.github.io/ecma262/#sec-set-object.prototype.__proto__). If I'm not missing something, either base/this are always Cell.

>> Source/JavaScriptCore/jit/Repatch.cpp:353
>> +        if (UNLIKELY(putKind == WithThis))
> 
> I don't think you need the UNLIKELY here. It might be the case that users do use this a lot.

Done.

> Source/JavaScriptCore/runtime/JSObjectInlines.h:205
> +    if (UNLIKELY(isThisValueAltered(slot, thisObject) && slot.context() != PutPropertySlot::PutByIdWithThis))

Just got a case where this condition is not ok. Investigating a properly way to set slot properly here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170405/ca11a67e/attachment.html>


More information about the webkit-unassigned mailing list