Skip to content

Commit 5e7425d

Browse files
evicyV8-internal LUCI CQ
authored andcommitted
Add comments, fix typo
Change-Id: I2988cca3d11a89693ed79b0137b61bcf4c273dee Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/7977730 Reviewed-by: Carl Smith <[email protected]> Commit-Queue: Eva Herencsárová <[email protected]>
1 parent 5250979 commit 5e7425d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Sources/Fuzzilli/FuzzIL/TypeSystem.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// The following base types are defined:
3131
// .undefined
3232
// .integer
33-
// .biging
33+
// .bigint
3434
// .float
3535
// .boolean
3636
// .string
@@ -473,7 +473,8 @@ public struct ILType: Hashable {
473473
let definiteType = self.definiteType.intersection(other.definiteType)
474474
let possibleType = self.possibleType.union(other.possibleType)
475475

476-
// Fast union case
476+
// Fast union case.
477+
// Identity comparison avoids comparing each property of the class.
477478
if self.ext === other.ext {
478479
return ILType(definiteType: definiteType, possibleType: possibleType, ext: self.ext)
479480
}
@@ -520,7 +521,8 @@ public struct ILType: Hashable {
520521
// "add back" the definite type to the possible type (which at this point would just be String).
521522
possibleType.formUnion(definiteType)
522523

523-
// Fast intersection case
524+
// Fast intersection case.
525+
// Identity comparison avoids comparing each property of the class.
524526
if self.ext === other.ext {
525527
return ILType(definiteType: definiteType, possibleType: possibleType, ext: self.ext)
526528
}

Tests/FuzzilliTests/TypeSystemTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,7 @@ class TypeSystemTests: XCTestCase {
10581058
let primitiveTypes: [ILType] = [.undefined, .integer, .float, .string, .boolean, .bigint, .regexp]
10591059

10601060
// A set of different types used by various tests.
1061+
// TODO(cffsmith): Test and adjust types with a WasmTypeExtension.
10611062
let typeSuite: [ILType] = [.undefined,
10621063
.integer,
10631064
.float,

0 commit comments

Comments
 (0)