Bug 163900 - [DOMJIT] Tell IDL result type to DFG to drop type checks in AI
Summary: [DOMJIT] Tell IDL result type to DFG to drop type checks in AI
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: 162544 162980
  Show dependency treegraph
 
Reported: 2016-10-24 10:29 PDT by Yusuke Suzuki
Modified: 2016-10-28 02:06 PDT (History)
9 users (show)

See Also:


Attachments
Patch (87.96 KB, patch)
2016-10-25 15:30 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (91.81 KB, patch)
2016-10-25 15:44 PDT, Yusuke Suzuki
sam: 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 2016-10-24 10:29:47 PDT
We use heap prediction in propagation phase since it is more accurate,
but we can use IDL result type in AI to drop type checks.
Comment 1 Yusuke Suzuki 2016-10-25 15:30:47 PDT
Created attachment 292835 [details]
Patch
Comment 2 Yusuke Suzuki 2016-10-25 15:44:37 PDT
Created attachment 292837 [details]
Patch
Comment 3 Yusuke Suzuki 2016-10-25 15:44:57 PDT
Added more tests.
Comment 4 Sam Weinig 2016-10-25 22:30:03 PDT
Comment on attachment 292837 [details]
Patch

Awesome!
Comment 5 Yusuke Suzuki 2016-10-25 22:45:58 PDT
Committed r207869: <http://trac.webkit.org/changeset/207869>
Comment 6 Yusuke Suzuki 2016-10-25 22:46:20 PDT
Thanks!
Comment 7 Saam Barati 2016-10-26 00:17:30 PDT
Comment on attachment 292837 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2506
> +        "long" => "SpecInt32Only",

This shouldn't be SpecBytecodeNumber?
Comment 8 Yusuke Suzuki 2016-10-26 02:12:41 PDT
Comment on attachment 292837 [details]
Patch

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

>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2506
>> +        "long" => "SpecInt32Only",
> 
> This shouldn't be SpecBytecodeNumber?

Do you mean this `long` exceeds the range of SpecInt32Only?
According to the WebIDL spec, the long is defined as a range of int32_t.
https://www.w3.org/TR/WebIDL/#idl-long
Comment 9 Saam Barati 2016-10-28 02:06:00 PDT
(In reply to comment #8)
> Comment on attachment 292837 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=292837&action=review
> 
> >> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2506
> >> +        "long" => "SpecInt32Only",
> > 
> > This shouldn't be SpecBytecodeNumber?
> 
> Do you mean this `long` exceeds the range of SpecInt32Only?
> According to the WebIDL spec, the long is defined as a range of int32_t.
> https://www.w3.org/TR/WebIDL/#idl-long

Yeah I was worried about that but if it's int32 then we're fine :)