Skip to content

Commit 411f1dc

Browse files
LiedtkeV8-internal LUCI CQ
authored andcommitted
[wasm] Deduplicate WasmLegacyTryCatchWithResultGenerator
One of them should be enough. :) Bug: 445356784 Change-Id: Ib0f215bcd41c2801d2b5d43c6255b17a5d979dd2 Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/8944236 Auto-Submit: Matthias Liedtke <mliedtke@google.com> Reviewed-by: Doga Yüksel <dyuksel@google.com> Commit-Queue: Matthias Liedtke <mliedtke@google.com>
1 parent 226938a commit 411f1dc

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

Sources/Fuzzilli/CodeGen/WasmCodeGenerators.swift

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,40 +1381,6 @@ public let WasmCodeGenerators: [CodeGenerator] = [
13811381
}
13821382
},
13831383

1384-
CodeGenerator(
1385-
"WasmLegacyTryCatchWithResultGenerator", inContext: .single(.wasmFunction)
1386-
) { b in
1387-
let function = b.currentWasmModule.currentWasmFunction
1388-
// Choose a few random wasm values as arguments if available.
1389-
let args = b.randomWasmBlockArguments(upTo: 5)
1390-
let parameters = args.map(b.type)
1391-
let tags = (0..<Int.random(in: 0...5)).map { _ in
1392-
b.findVariable { b.type(of: $0).isWasmTagType }
1393-
}.filter { $0 != nil }.map { $0! }
1394-
let outputTypes = b.randomWasmBlockOutputTypes(upTo: 3)
1395-
let signature = parameters => outputTypes
1396-
let recursiveCallCount = 2 + tags.count
1397-
function.wasmBuildLegacyTryWithResult(
1398-
with: signature, args: args,
1399-
body: { label, args in
1400-
b.buildRecursive(n: 4)
1401-
return outputTypes.map(function.findOrGenerateWasmVar)
1402-
},
1403-
catchClauses: tags.enumerated().map { i, tag in
1404-
(
1405-
tag,
1406-
{ _, _, _ in
1407-
b.buildRecursive(n: 4)
1408-
return outputTypes.map(function.findOrGenerateWasmVar)
1409-
}
1410-
)
1411-
},
1412-
catchAllBody: { label in
1413-
b.buildRecursive(n: 4)
1414-
return outputTypes.map(function.findOrGenerateWasmVar)
1415-
})
1416-
},
1417-
14181384
// TODO split this into a multi-part Generator.
14191385
CodeGenerator(
14201386
"WasmLegacyTryCatchWithResultGenerator", inContext: .single(.wasmFunction)

0 commit comments

Comments
 (0)