Bug 172225 - [JSC] Make get_by_val & string "499" to number 499
Summary: [JSC] Make get_by_val & string "499" to number 499
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-17 09:24 PDT by Yusuke Suzuki
Modified: 2017-05-21 23:02 PDT (History)
7 users (show)

See Also:


Attachments
Patch (15.20 KB, patch)
2017-05-19 21:07 PDT, Yusuke Suzuki
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-05-17 09:24:11 PDT
...
Comment 1 Yusuke Suzuki 2017-05-17 09:26:12 PDT
And we should convert GetByVal(..., String:"499") to GetByVal(..., Int32:499).
Comment 2 Yusuke Suzuki 2017-05-19 06:27:08 PDT
(In reply to Yusuke Suzuki from comment #1)
> And we should convert GetByVal(..., String:"499") to GetByVal(...,
> Int32:499).

I would like to do it in a separate patch.
https://bugs.webkit.org/show_bug.cgi?id=172358
Comment 3 Yusuke Suzuki 2017-05-19 21:07:15 PDT
Created attachment 310757 [details]
Patch
Comment 4 Saam Barati 2017-05-21 14:37:52 PDT
Comment on attachment 310757 [details]
Patch

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

r=me

> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:585
> +            if (leftHandSideNeedsCopy(rightHasAssignments, rightIsPure)) {
> +                RefPtr<RegisterID> dst = newTemporary();
> +                emitNodeForProperty(dst.get(), n);
> +                return dst;
> +            }

Do you have a test for this?
Comment 5 Yusuke Suzuki 2017-05-21 22:32:47 PDT
Comment on attachment 310757 [details]
Patch

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

Thanks!

>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:585
>> +            }
> 
> Do you have a test for this?

Nice, added.
Comment 6 Yusuke Suzuki 2017-05-21 22:33:56 PDT
Committed r217199: <http://trac.webkit.org/changeset/217199>
Comment 7 Yusuke Suzuki 2017-05-21 23:00:51 PDT
Committed r217201: <http://trac.webkit.org/changeset/217201>