...
The JS script I wrote to modify the stdlib: function assert(b) { if (!b) throw new Error; } const ignore = ["char", "short", "short", "half"]; let lines = readFile("/Volumes/Data/Desktop/stdlib.wsl").split("\n"); let result = ""; let currentFunction = null; let blockNest = 0; for (let line of lines) { if (!currentFunction) { if (line.indexOf("{") >= 0) { currentFunction = [line]; blockNest = 1; } else { let ok = true; if (line.indexOf("/*") < 0) { for (let word of ignore) { if (line.indexOf(word) >= 0) ok = false; } } if (ok) result += `${line}\n`; } continue; } currentFunction.push(line); if (line.indexOf("{") >= 0) { ++blockNest; assert(line.indexOf("}") < 0); } if (line.indexOf("}") >= 0) { assert(line.indexOf("{") < 0); --blockNest; if (!blockNest) { let functionText = currentFunction.join("\n"); let ok = true; for (let word of ignore) { if (functionText.indexOf(word) >= 0) ok = false; } if (ok) result += `${functionText}\n`; currentFunction = null; } } } print(result);
Created attachment 375242 [details] patch
I can't make inline comments, so I'll comment here. We need to keep the TextureFormats, but make sure that whenever they're read, they get padded out to wider types. It's not immediately obvious how to do this, so let's not modify this patch but file a follow-up to make sure that all the texture types work properly. Can we add a non-exhaustive test to make sure that the types don't exist and don't work?
Created attachment 375246 [details] patch for landing
Created attachment 375247 [details] patch for landing
Comment on attachment 375247 [details] patch for landing Rejecting attachment 375247 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 375247, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output: https://webkit-queues.webkit.org/results/12843123
Created attachment 375257 [details] patch for landing
Comment on attachment 375257 [details] patch for landing Clearing flags on attachment: 375257 Committed r248078: <https://trac.webkit.org/changeset/248078>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53784301>