Bug 189360 - [WHLSL] Call arguments should be copied as soon as they are evaluated
Summary: [WHLSL] Call arguments should be copied as soon as they are evaluated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thomas Denney
URL:
Keywords: InRadar
Depends on:
Blocks: 176199 189202 189326
  Show dependency treegraph
 
Reported: 2018-09-06 10:52 PDT by Thomas Denney
Modified: 2018-10-13 14:35 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.18 KB, patch)
2018-09-06 11:00 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Denney 2018-09-06 10:52:08 PDT
There is an observable bug in the interpreter whereby the shallow copy of values only occurred after all arguments to a call had been evaluated.
Comment 1 Thomas Denney 2018-09-06 11:00:18 PDT
Created attachment 349045 [details]
Patch
Comment 2 Myles C. Maxfield 2018-09-06 11:12:27 PDT
Comment on attachment 349045 [details]
Patch

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

> Tools/WebGPUShadingLanguageRI/Evaluator.js:325
> +        let result = EBuffer.allowAllocation(() => node.func.implementation(callArguments, node));

I'm confused. Where do the thunks get evaluated? I expected this patch to move code around, but instead it appears to be deleting code?
Comment 3 Myles C. Maxfield 2018-09-06 13:11:01 PDT
Comment on attachment 349045 [details]
Patch

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

>> Tools/WebGPUShadingLanguageRI/Evaluator.js:325
>> +        let result = EBuffer.allowAllocation(() => node.func.implementation(callArguments, node));
> 
> I'm confused. Where do the thunks get evaluated? I expected this patch to move code around, but instead it appears to be deleting code?

Got it. Looks good.
Comment 4 WebKit Commit Bot 2018-09-06 13:36:49 PDT
Comment on attachment 349045 [details]
Patch

Clearing flags on attachment: 349045

Committed r235753: <https://trac.webkit.org/changeset/235753>
Comment 5 WebKit Commit Bot 2018-09-06 13:36:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-09-06 13:40:26 PDT
<rdar://problem/44194725>
Comment 7 Myles C. Maxfield 2018-10-13 14:35:26 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/41