Bug 170261 - WebAssembly: Make our calls out to JS PIC friendly
Summary: WebAssembly: Make our calls out to JS PIC friendly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks: 168264
  Show dependency treegraph
 
Reported: 2017-03-29 17:22 PDT by Saam Barati
Modified: 2017-03-31 19:09 PDT (History)
11 users (show)

See Also:


Attachments
patch (13.26 KB, patch)
2017-03-31 18:12 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2017-03-29 17:22:07 PDT
...
Comment 1 Saam Barati 2017-03-31 16:13:08 PDT
Working on this now.
Comment 2 Saam Barati 2017-03-31 18:12:33 PDT
Created attachment 306034 [details]
patch
Comment 3 Keith Miller 2017-03-31 18:27:51 PDT
Comment on attachment 306034 [details]
patch

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

r=me.

> Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.h:120
> +    static ptrdiff_t offsetOfImportWasmToJSStub(unsigned calleeCount, unsigned importIndex)
> +    {
> +        return offsetOfCallees()
> +            + (sizeof(WriteBarrier<JSWebAssemblyCallee>) * calleeCount * 2)
> +            + (sizeof(void*) * importIndex);
> +    }
> +

oh man, this is brutal.
Comment 4 Saam Barati 2017-03-31 18:32:15 PDT
Comment on attachment 306034 [details]
patch

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

>> Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.h:120
>> +
> 
> oh man, this is brutal.

Glorious object layout 🎉
Comment 5 WebKit Commit Bot 2017-03-31 19:09:55 PDT
Comment on attachment 306034 [details]
patch

Clearing flags on attachment: 306034

Committed r214711: <http://trac.webkit.org/changeset/214711>
Comment 6 WebKit Commit Bot 2017-03-31 19:09:56 PDT
All reviewed patches have been landed.  Closing bug.